More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 6,491 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Add Whitelisted | 8348829 | 1843 days ago | IN | 0 ETH | 0.00068254 | ||||
Set Rate | 8334817 | 1845 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8334542 | 1845 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8334260 | 1845 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8334000 | 1845 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8333727 | 1845 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8333470 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8333195 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8332914 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8332644 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8332373 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8332091 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8331825 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8331278 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8331031 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8330471 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8330196 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8329929 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8329668 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8329423 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8329155 | 1846 days ago | IN | 0 ETH | 0.00051828 | ||||
Set Rate | 8328899 | 1846 days ago | IN | 0 ETH | 0.00016837 | ||||
Set Rate | 8328613 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8328363 | 1846 days ago | IN | 0 ETH | 0.00033828 | ||||
Set Rate | 8327830 | 1846 days ago | IN | 0 ETH | 0.00033828 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
8249957 | 1858 days ago | 2 ETH | ||||
8243725 | 1859 days ago | 0.922 ETH | ||||
8242890 | 1860 days ago | 0.7 ETH | ||||
8201277 | 1866 days ago | 4 ETH | ||||
8166772 | 1871 days ago | 1.5 ETH | ||||
8164791 | 1872 days ago | 2.15 ETH | ||||
8164678 | 1872 days ago | 1 ETH | ||||
8163856 | 1872 days ago | 1.11 ETH | ||||
8163407 | 1872 days ago | 3 ETH | ||||
8163405 | 1872 days ago | 1.61 ETH | ||||
8163237 | 1872 days ago | 0.99183777 ETH | ||||
8163117 | 1872 days ago | 5 ETH | ||||
8163109 | 1872 days ago | 1.385 ETH | ||||
8163102 | 1872 days ago | 4 ETH | ||||
8163069 | 1872 days ago | 1.46 ETH | ||||
8163064 | 1872 days ago | 4.415 ETH | ||||
8163059 | 1872 days ago | 2 ETH | ||||
8163054 | 1872 days ago | 1.45 ETH | ||||
8162915 | 1872 days ago | 1 ETH | ||||
8162869 | 1872 days ago | 8.4 ETH | ||||
8162865 | 1872 days ago | 1.49 ETH | ||||
8162797 | 1872 days ago | 2.5 ETH | ||||
8162769 | 1872 days ago | 1 ETH | ||||
8162722 | 1872 days ago | 1.6 ETH | ||||
8162712 | 1872 days ago | 1.6 ETH |
Loading...
Loading
Contract Name:
KicksCrowdsale
Compiler Version
v0.5.0+commit.1d4f565a
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-03-14 */ pragma solidity ^0.5.0; /** * @title Math * @dev Assorted math operations */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Calculates the average of two numbers. Since these are integers, * averages of an even and odd number cannot be represented, and will be * rounded down. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title 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 { using SafeMath for uint256; function safeTransfer(IERC20 token, address to, uint256 value) internal { require(token.transfer(to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { require(token.transferFrom(from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require((value == 0) || (token.allowance(msg.sender, spender) == 0)); require(token.approve(spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); require(token.approve(spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value); require(token.approve(spender, newAllowance)); } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for * all accounts just by listening to said events. Note that this isn't required by the specification, and other * compliant implementations may not do it. */ contract 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 An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) public view returns (uint256) { return _allowed[owner][spender]; } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public returns (bool) { _transfer(msg.sender, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) public returns (bool) { _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); emit Approval(from, msg.sender, _allowed[from][msg.sender]); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub(subtractedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { _allowed[account][msg.sender] = _allowed[account][msg.sender].sub(value); _burn(account, value); emit Approval(account, msg.sender, _allowed[account][msg.sender]); } } /** * @title Helps contracts guard against reentrancy attacks. * @author Remco Bloemen <remco@2π.com>, Eenae <[email protected]> * @dev If you mark a function `nonReentrant`, you should also * mark it `external`. */ contract ReentrancyGuard { /// @dev counter to allow mutex lock with only one SSTORE operation uint256 private _guardCounter; constructor () internal { // The counter starts at one to prevent changing it from zero to a non-zero // value, which is a more expensive operation. _guardCounter = 1; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { _guardCounter += 1; uint256 localCounter = _guardCounter; _; require(localCounter == _guardCounter); } } /** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The external interface represents the basic interface for purchasing tokens, and conform * the base architecture for crowdsales. They are *not* intended to be modified / overridden. * The internal interface conforms the extensible and modifiable surface of crowdsales. Override * the methods to add functionality. Consider using 'super' where appropriate to concatenate * behavior. */ contract Crowdsale is ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for IERC20; // The token being sold IERC20 private _token; // Address where funds are collected address payable private _wallet; // How many token units a buyer gets per wei. // The rate is the conversion between wei and the smallest and indivisible token unit. // So, if you are using a rate of 1 with a ERC20Detailed token with 3 decimals called TOK // 1 wei will give you 1 unit, or 0.001 TOK. uint256 private _rate; // Amount of wei raised uint256 private _weiRaised; /** * Event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); /** * @param rate Number of token units a buyer gets per wei * @dev The rate is the conversion between wei and the smallest and indivisible * token unit. So, if you are using a rate of 1 with a ERC20Detailed token * with 3 decimals called TOK, 1 wei will give you 1 unit, or 0.001 TOK. * @param wallet Address where collected funds will be forwarded to * @param token Address of the token being sold */ constructor (uint256 rate, address payable wallet, IERC20 token) public { require(rate > 0); require(wallet != address(0)); require(address(token) != address(0)); _rate = rate; _wallet = wallet; _token = token; } /** * @dev fallback function ***DO NOT OVERRIDE*** * Note that other contracts will transfer fund with a base gas stipend * of 2300, which is not enough to call buyTokens. Consider calling * buyTokens directly when purchasing tokens from a contract. */ function () external payable { buyTokens(msg.sender); } /** * @return the token being sold. */ function token() public view returns (IERC20) { return _token; } /** * @return the address where funds are collected. */ function wallet() public view returns (address payable) { return _wallet; } /** * @return the number of token units a buyer gets per wei. */ function rate() public view returns (uint256) { return _rate; } /** * @return the amount of wei raised. */ function weiRaised() public view returns (uint256) { return _weiRaised; } /** * @dev low level token purchase ***DO NOT OVERRIDE*** * This function has a non-reentrancy guard, so it shouldn't be called by * another `nonReentrant` function. * @param beneficiary Recipient of the token purchase */ function buyTokens(address beneficiary) public nonReentrant payable { uint256 weiAmount = msg.value; _preValidatePurchase(beneficiary, weiAmount); // calculate token amount to be created uint256 tokens = _getTokenAmount(weiAmount); // update state _weiRaised = _weiRaised.add(weiAmount); _processPurchase(beneficiary, tokens); emit TokensPurchased(msg.sender, beneficiary, weiAmount, tokens); _updatePurchasingState(beneficiary, weiAmount); _forwardFunds(); _postValidatePurchase(beneficiary, weiAmount); } /** * @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met. * Use `super` in contracts that inherit from Crowdsale to extend their validations. * Example from CappedCrowdsale.sol's _preValidatePurchase method: * super._preValidatePurchase(beneficiary, weiAmount); * require(weiRaised().add(weiAmount) <= cap); * @param beneficiary Address performing the token purchase * @param weiAmount Value in wei involved in the purchase */ function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal view { require(beneficiary != address(0)); require(weiAmount != 0); } /** * @dev Validation of an executed purchase. Observe state and use revert statements to undo rollback when valid * conditions are not met. * @param beneficiary Address performing the token purchase * @param weiAmount Value in wei involved in the purchase */ function _postValidatePurchase(address beneficiary, uint256 weiAmount) internal view { // solhint-disable-previous-line no-empty-blocks } /** * @dev Source of tokens. Override this method to modify the way in which the crowdsale ultimately gets and sends * its tokens. * @param beneficiary Address performing the token purchase * @param tokenAmount Number of tokens to be emitted */ function _deliverTokens(address beneficiary, uint256 tokenAmount) internal { _token.safeTransfer(beneficiary, tokenAmount); } /** * @dev Executed when a purchase has been validated and is ready to be executed. Doesn't necessarily emit/send * tokens. * @param beneficiary Address receiving the tokens * @param tokenAmount Number of tokens to be purchased */ function _processPurchase(address beneficiary, uint256 tokenAmount) internal { _deliverTokens(beneficiary, tokenAmount); } /** * @dev Override for extensions that require an internal state to check for validity (current user contributions, * etc.) * @param beneficiary Address receiving the tokens * @param weiAmount Value in wei involved in the purchase */ function _updatePurchasingState(address beneficiary, uint256 weiAmount) internal { // solhint-disable-previous-line no-empty-blocks } /** * @dev Override to extend the way in which ether is converted to tokens. * @param weiAmount Value in wei to be converted into tokens * @return Number of tokens that can be purchased with the specified _weiAmount */ function _getTokenAmount(uint256 weiAmount) internal view returns (uint256) { return weiAmount.mul(_rate); } /** * @dev Determines how ETH is stored/forwarded on purchases. */ function _forwardFunds() internal { _wallet.transfer(msg.value); } } /** * @title AllowanceCrowdsale * @dev Extension of Crowdsale where tokens are held by a wallet, which approves an allowance to the crowdsale. */ contract AllowanceCrowdsale is Crowdsale { using SafeMath for uint256; using SafeERC20 for IERC20; address private _tokenWallet; /** * @dev Constructor, takes token wallet address. * @param tokenWallet Address holding the tokens, which has approved allowance to the crowdsale */ constructor (address tokenWallet) public { require(tokenWallet != address(0)); _tokenWallet = tokenWallet; } /** * @return the address of the wallet that will hold the tokens. */ function tokenWallet() public view returns (address) { return _tokenWallet; } /** * @dev Checks the amount of tokens left in the allowance. * @return Amount of tokens left in the allowance */ function remainingTokens() public view returns (uint256) { return Math.min(token().balanceOf(_tokenWallet), token().allowance(_tokenWallet, address(this))); } /** * @dev Overrides parent behavior by transferring tokens from wallet. * @param beneficiary Token purchaser * @param tokenAmount Amount of tokens purchased */ function _deliverTokens(address beneficiary, uint256 tokenAmount) internal { token().safeTransferFrom(_tokenWallet, beneficiary, tokenAmount); } } /** * @title TimedCrowdsale * @dev Crowdsale accepting contributions only within a time frame. */ contract TimedCrowdsale is Crowdsale { using SafeMath for uint256; uint256 private _openingTime; uint256 private _closingTime; /** * @dev Reverts if not in crowdsale time range. */ modifier onlyWhileOpen { require(isOpen()); _; } /** * @dev Constructor, takes crowdsale opening and closing times. * @param openingTime Crowdsale opening time * @param closingTime Crowdsale closing time */ constructor (uint256 openingTime, uint256 closingTime) public { // solhint-disable-next-line not-rely-on-time require(openingTime >= block.timestamp); require(closingTime > openingTime); _openingTime = openingTime; _closingTime = closingTime; } /** * @return the crowdsale opening time. */ function openingTime() public view returns (uint256) { return _openingTime; } /** * @return the crowdsale closing time. */ function closingTime() public view returns (uint256) { return _closingTime; } /** * @return true if the crowdsale is open, false otherwise. */ function isOpen() public view returns (bool) { // solhint-disable-next-line not-rely-on-time return block.timestamp >= _openingTime && block.timestamp <= _closingTime; } /** * @dev Checks whether the period in which the crowdsale is open has already elapsed. * @return Whether crowdsale period has elapsed */ function hasClosed() public view returns (bool) { // solhint-disable-next-line not-rely-on-time return block.timestamp > _closingTime; } /** * @dev Extend parent behavior requiring to be within contributing period * @param beneficiary Token purchaser * @param weiAmount Amount of wei contributed */ function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal onlyWhileOpen view { super._preValidatePurchase(beneficiary, weiAmount); } } /** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } /** * @title Roles * @dev Library for managing addresses assigned to a Role. */ library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); require(!has(role, account)); role.bearer[account] = true; } /** * @dev remove an account's access to this role */ function remove(Role storage role, address account) internal { require(account != address(0)); require(has(role, account)); role.bearer[account] = false; } /** * @dev check if an account has this role * @return bool */ function has(Role storage role, address account) internal view returns (bool) { require(account != address(0)); return role.bearer[account]; } } /** * @title WhitelistAdminRole * @dev WhitelistAdmins are responsible for assigning and removing Whitelisted accounts. */ contract WhitelistAdminRole { using Roles for Roles.Role; event WhitelistAdminAdded(address indexed account); event WhitelistAdminRemoved(address indexed account); Roles.Role private _whitelistAdmins; constructor () internal { _addWhitelistAdmin(msg.sender); } modifier onlyWhitelistAdmin() { require(isWhitelistAdmin(msg.sender)); _; } function isWhitelistAdmin(address account) public view returns (bool) { return _whitelistAdmins.has(account); } function addWhitelistAdmin(address account) public onlyWhitelistAdmin { _addWhitelistAdmin(account); } function renounceWhitelistAdmin() public { _removeWhitelistAdmin(msg.sender); } function _addWhitelistAdmin(address account) internal { _whitelistAdmins.add(account); emit WhitelistAdminAdded(account); } function _removeWhitelistAdmin(address account) internal { _whitelistAdmins.remove(account); emit WhitelistAdminRemoved(account); } } /** * @title WhitelistedRole * @dev Whitelisted accounts have been approved by a WhitelistAdmin to perform certain actions (e.g. participate in a * crowdsale). This role is special in that the only accounts that can add it are WhitelistAdmins (who can also remove * it), and not Whitelisteds themselves. */ contract WhitelistedRole is WhitelistAdminRole { using Roles for Roles.Role; event WhitelistedAdded(address indexed account); event WhitelistedRemoved(address indexed account); Roles.Role private _whitelisteds; modifier onlyWhitelisted() { require(isWhitelisted(msg.sender)); _; } function isWhitelisted(address account) public view returns (bool) { return _whitelisteds.has(account); } function addWhitelisted(address account) public onlyWhitelistAdmin { _addWhitelisted(account); } function removeWhitelisted(address account) public onlyWhitelistAdmin { _removeWhitelisted(account); } function renounceWhitelisted() public { _removeWhitelisted(msg.sender); } function _addWhitelisted(address account) internal { _whitelisteds.add(account); emit WhitelistedAdded(account); } function _removeWhitelisted(address account) internal { _whitelisteds.remove(account); emit WhitelistedRemoved(account); } } contract KicksCrowdsale is Crowdsale, TimedCrowdsale, AllowanceCrowdsale, WhitelistedRole { using SafeMath for uint256; uint256 private _rate; uint256 private _kickCap = 33333333333333333333333333; // $50M uint256 private _kickMinPay = 100 ether; uint256 private _kickPurchased = 0; uint256 private _bonus20capBoundary = 800000000000000000000000; // $1.2M uint256 private _bonus10capBoundary = 1533333333333333333333333; // $2.3M address private _manualSeller; address private _rateSetter; address private _whitelistAdmin; bool private _KYC = false; event Bonus(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); event ChangeRate(uint256 rate); constructor( uint256 rate, // eth to kick rate ERC20 token, // the kick token address address payable wallet, // accumulation eth address address tokenWallet, // kick storage address address manualSeller, // can sell tokens address rateSetter, // can change eth rate uint256 openingTime, uint256 closingTime ) Crowdsale(rate, wallet, token) AllowanceCrowdsale(tokenWallet) TimedCrowdsale(openingTime, closingTime) public { _rate = rate; _manualSeller = manualSeller; _rateSetter = rateSetter; _whitelistAdmin = msg.sender; } /** * Base crowdsale override */ function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal view { if (_KYC) { require(isWhitelisted(beneficiary), 'Only whitelisted'); } uint256 kickAmount = weiAmount.mul(_rate); require(kickAmount >= _kickMinPay, 'Min purchase 100 kick'); require(_kickPurchased.add(kickAmount) <= _kickCap, 'Cap has been reached'); super._preValidatePurchase(beneficiary, weiAmount); } function calcBonus(uint256 tokenAmount) internal view returns (uint256) { uint256 bonus = 0; if (_kickPurchased.add(tokenAmount) <= _bonus20capBoundary) { bonus = tokenAmount.mul(20).div(100); } else if (_kickPurchased.add(tokenAmount) <= _bonus10capBoundary) { bonus = tokenAmount.mul(10).div(100); } return bonus; } function _getTokenAmount(uint256 weiAmount) internal view returns (uint256) { uint256 tokenAmount = weiAmount.mul(_rate); return tokenAmount.add(calcBonus(tokenAmount)); } function _updatePurchasingState(address beneficiary, uint256 weiAmount) internal { uint256 tokenAmount = weiAmount.mul(_rate); uint256 bonus = calcBonus(tokenAmount); if (bonus != 0) { emit Bonus(msg.sender, beneficiary, weiAmount, bonus); tokenAmount = tokenAmount.add(bonus); } _kickPurchased = _kickPurchased.add(tokenAmount); } /** * Manual sell */ function manualSell(address beneficiary, uint256 weiAmount) public onlyWhileOpen { require(msg.sender == _manualSeller); _preValidatePurchase(beneficiary, weiAmount); uint256 tokens = _getTokenAmount(weiAmount); _processPurchase(beneficiary, tokens); emit TokensPurchased(msg.sender, beneficiary, weiAmount, tokens); _updatePurchasingState(beneficiary, weiAmount); _postValidatePurchase(beneficiary, weiAmount); } /** * Change eth rate */ function setRate(uint256 rate) public { require(msg.sender == _rateSetter); _rate = rate; emit ChangeRate(rate); } /** * Change KYC status */ function onKYC() public { require(msg.sender == _whitelistAdmin); require(!_KYC); _KYC = true; } function offKYC() public { require(msg.sender == _whitelistAdmin); require(_KYC); _KYC = false; } /** * Getters */ function rate() public view returns (uint256) { return _rate; } function kickCap() public view returns (uint256) { return _kickCap; } function kickMinPay() public view returns (uint256) { return _kickMinPay; } function kickPurchased() public view returns (uint256) { return _kickPurchased; } function bonus20capBoundary() public view returns (uint256) { return _bonus20capBoundary; } function bonus10capBoundary() public view returns (uint256) { return _bonus10capBoundary; } function KYC() public view returns (bool) { return _KYC; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addWhitelisted","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"hasClosed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"removeWhitelisted","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"rate","type":"uint256"}],"name":"setRate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isWhitelisted","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"kickMinPay","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weiRaised","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOpen","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"onKYC","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"closingTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceWhitelistAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"wallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"kickPurchased","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"offKYC","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"bonus10capBoundary","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addWhitelistAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"bonus20capBoundary","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"KYC","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"},{"name":"weiAmount","type":"uint256"}],"name":"manualSell","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"openingTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isWhitelistAdmin","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"remainingTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenWallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceWhitelisted","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"}],"name":"buyTokens","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"kickCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"rate","type":"uint256"},{"name":"token","type":"address"},{"name":"wallet","type":"address"},{"name":"tokenWallet","type":"address"},{"name":"manualSeller","type":"address"},{"name":"rateSetter","type":"address"},{"name":"openingTime","type":"uint256"},{"name":"closingTime","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"purchaser","type":"address"},{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Bonus","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"rate","type":"uint256"}],"name":"ChangeRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"WhitelistedAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"WhitelistedRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"WhitelistAdminAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"WhitelistAdminRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"purchaser","type":"address"},{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"TokensPurchased","type":"event"}]
Contract Creation Code
60806040526a1b929b9eed599ba1555555600b5568056bc75e2d63100000600c556000600d5569a968163f0a57b4000000600e556a0144b22aa37e7d6e555555600f556000601260146101000a81548160ff0219169083151502179055503480156200006a57600080fd5b506040516101008062001f0f83398101806040526101008110156200008e57600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050508482828a898b60016000819055506000831115156200010357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156200014057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200017d57600080fd5b8260038190555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050504282101515156200021957600080fd5b81811115156200022857600080fd5b81600581905550806006819055505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200027557600080fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620002d133620003a9640100000000026401000000009004565b87600a8190555083601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505050506200056b565b620003cd81600862000413640100000000026200166c179091906401000000009004565b8073ffffffffffffffffffffffffffffffffffffffff167f22380c05984257a1cb900161c713dd71d39e74820f1aea43bd3f1bdd2096129960405160405180910390a250565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200045057600080fd5b6200046b8282620004d6640100000000026401000000009004565b1515156200047857600080fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156200051457600080fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611994806200057b6000396000f3fe60806040526004361061016a576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806310154bad146101755780631515bc2b146101c6578063291d9549146101f55780632c4e722e1461024657806334fcf437146102715780633af32abf146102ac5780633c2483ca146103155780634042b66f1461034057806347535d7b1461036b57806349adac231461039a5780634b6753bc146103b15780634c5a628c146103dc578063521eb273146103f35780636155037c1461044a5780636f511bd31461047557806372f4bd3f1461048c5780637362d9c8146104b7578063941f0c8714610508578063a12a6bb014610533578063a85ffe4f14610562578063b7a8807c146105bd578063bb5f747b146105e8578063bf58390314610651578063bff99c6c1461067c578063d6cd9473146106d3578063ec8ac4d8146106ea578063fc0c546a1461072e578063fec8e4a514610785575b610173336107b0565b005b34801561018157600080fd5b506101c46004803603602081101561019857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108a6565b005b3480156101d257600080fd5b506101db6108c6565b604051808215151515815260200191505060405180910390f35b34801561020157600080fd5b506102446004803603602081101561021857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108d2565b005b34801561025257600080fd5b5061025b6108f2565b6040518082815260200191505060405180910390f35b34801561027d57600080fd5b506102aa6004803603602081101561029457600080fd5b81019080803590602001909291905050506108fc565b005b3480156102b857600080fd5b506102fb600480360360208110156102cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610999565b604051808215151515815260200191505060405180910390f35b34801561032157600080fd5b5061032a6109b6565b6040518082815260200191505060405180910390f35b34801561034c57600080fd5b506103556109c0565b6040518082815260200191505060405180910390f35b34801561037757600080fd5b506103806109ca565b604051808215151515815260200191505060405180910390f35b3480156103a657600080fd5b506103af6109e5565b005b3480156103bd57600080fd5b506103c6610a7a565b6040518082815260200191505060405180910390f35b3480156103e857600080fd5b506103f1610a84565b005b3480156103ff57600080fd5b50610408610a8f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561045657600080fd5b5061045f610ab9565b6040518082815260200191505060405180910390f35b34801561048157600080fd5b5061048a610ac3565b005b34801561049857600080fd5b506104a1610b57565b6040518082815260200191505060405180910390f35b3480156104c357600080fd5b50610506600480360360208110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b61565b005b34801561051457600080fd5b5061051d610b81565b6040518082815260200191505060405180910390f35b34801561053f57600080fd5b50610548610b8b565b604051808215151515815260200191505060405180910390f35b34801561056e57600080fd5b506105bb6004803603604081101561058557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba2565b005b3480156105c957600080fd5b506105d2610cb8565b6040518082815260200191505060405180910390f35b3480156105f457600080fd5b506106376004803603602081101561060b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cc2565b604051808215151515815260200191505060405180910390f35b34801561065d57600080fd5b50610666610cdf565b6040518082815260200191505060405180910390f35b34801561068857600080fd5b50610691610f1c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106df57600080fd5b506106e8610f46565b005b61072c6004803603602081101561070057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b0565b005b34801561073a57600080fd5b50610743610f51565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561079157600080fd5b5061079a610f7b565b6040518082815260200191505060405180910390f35b6001600080828254019250508190555060008054905060003490506107d58382610f85565b60006107e082611148565b90506107f78260045461118590919063ffffffff16565b60048190555061080784826111a6565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f6faf93231a456e552dbc9961f58d9713ee4f2e69d15f1975b050ef0911053a7b8484604051808381526020018281526020019250505060405180910390a361087e84836111b4565b610886611288565b61089084836112f3565b5050600054811415156108a257600080fd5b5050565b6108af33610cc2565b15156108ba57600080fd5b6108c3816112f7565b50565b60006006544211905090565b6108db33610cc2565b15156108e657600080fd5b6108ef81611351565b50565b6000600a54905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561095857600080fd5b80600a819055507f5a75aa1ccd5244c76a14e60301b7bc29e02263de78b6af4606269d5e1db08513816040518082815260200191505060405180910390a150565b60006109af8260096113ab90919063ffffffff16565b9050919050565b6000600c54905090565b6000600454905090565b600060055442101580156109e057506006544211155b905090565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a4157600080fd5b601260149054906101000a900460ff16151515610a5d57600080fd5b6001601260146101000a81548160ff021916908315150217905550565b6000600654905090565b610a8d3361143f565b565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600d54905090565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b1f57600080fd5b601260149054906101000a900460ff161515610b3a57600080fd5b6000601260146101000a81548160ff021916908315150217905550565b6000600f54905090565b610b6a33610cc2565b1515610b7557600080fd5b610b7e81611499565b50565b6000600e54905090565b6000601260149054906101000a900460ff16905090565b610baa6109ca565b1515610bb557600080fd5b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c1157600080fd5b610c1b8282610f85565b6000610c2682611148565b9050610c3283826111a6565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f6faf93231a456e552dbc9961f58d9713ee4f2e69d15f1975b050ef0911053a7b8484604051808381526020018281526020019250505060405180910390a3610ca983836111b4565b610cb383836112f3565b505050565b6000600554905090565b6000610cd88260086113ab90919063ffffffff16565b9050919050565b6000610f17610cec610f51565b73ffffffffffffffffffffffffffffffffffffffff166370a08231600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610da657600080fd5b505afa158015610dba573d6000803e3d6000fd5b505050506040513d6020811015610dd057600080fd5b8101908080519060200190929190505050610de9610f51565b73ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16306040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610ed757600080fd5b505afa158015610eeb573d6000803e3d6000fd5b505050506040513d6020811015610f0157600080fd5b81019080805190602001909291905050506114f3565b905090565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610f4f33611351565b565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600b54905090565b601260149054906101000a900460ff161561101857610fa382610999565b1515611017576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4f6e6c792077686974656c69737465640000000000000000000000000000000081525060200191505060405180910390fd5b5b600061102f600a548361150c90919063ffffffff16565b9050600c5481101515156110ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4d696e20707572636861736520313030206b69636b000000000000000000000081525060200191505060405180910390fd5b600b546110c382600d5461118590919063ffffffff16565b11151515611139576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f43617020686173206265656e207265616368656400000000000000000000000081525060200191505060405180910390fd5b611143838361154a565b505050565b600080611160600a548461150c90919063ffffffff16565b905061117d61116e8261156b565b8261118590919063ffffffff16565b915050919050565b600080828401905083811015151561119c57600080fd5b8091505092915050565b6111b08282611612565b5050565b60006111cb600a548361150c90919063ffffffff16565b905060006111d88261156b565b9050600081141515611267578373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f11a039550cd7911b4cd65a69f27ebee7908939ac8f7b25b47b3df44ac58b06148584604051808381526020018281526020019250505060405180910390a3611264818361118590919063ffffffff16565b91505b61127c82600d5461118590919063ffffffff16565b600d8190555050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156112f0573d6000803e3d6000fd5b50565b5050565b61130b81600961166c90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fee1504a83b6d4a361f4c1dc78ab59bfa30d6a3b6612c403e86bb01ef2984295f60405160405180910390a250565b61136581600961171c90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f270d9b30cf5b0793bbfd54c9d5b94aeb49462b8148399000265144a8722da6b660405160405180910390a250565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156113e857600080fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61145381600861171c90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f0a8eb35e5ca14b3d6f28e4abf2f128dbab231a58b56e89beb5d636115001e16560405160405180910390a250565b6114ad81600861166c90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f22380c05984257a1cb900161c713dd71d39e74820f1aea43bd3f1bdd2096129960405160405180910390a250565b60008183106115025781611504565b825b905092915050565b60008083141561151f5760009050611544565b6000828402905082848281151561153257fe5b0414151561153f57600080fd5b809150505b92915050565b6115526109ca565b151561155d57600080fd5b61156782826117cb565b5050565b60008060009050600e5461158a84600d5461118590919063ffffffff16565b1115156115bf576115b860646115aa60148661150c90919063ffffffff16565b61181b90919063ffffffff16565b9050611609565b600f546115d784600d5461118590919063ffffffff16565b1115156116085761160560646115f7600a8661150c90919063ffffffff16565b61181b90919063ffffffff16565b90505b5b80915050919050565b611668600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383611642610f51565b73ffffffffffffffffffffffffffffffffffffffff16611845909392919063ffffffff16565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156116a857600080fd5b6116b282826113ab565b1515156116be57600080fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561175857600080fd5b61176282826113ab565b151561176d57600080fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561180757600080fd5b6000811415151561181757600080fd5b5050565b6000808211151561182b57600080fd5b6000828481151561183857fe5b0490508091505092915050565b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd8484846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561191c57600080fd5b505af1158015611930573d6000803e3d6000fd5b505050506040513d602081101561194657600080fd5b8101908080519060200190929190505050151561196257600080fd5b5050505056fea165627a7a723058202ad8d0fa11dd1a8114f8da7a5f8021de25878765bd9f4afe47b251168c03710d00290000000000000000000000000000000000000000000000000000000000000059000000000000000000000000d91a6162f146ef85922d9a15ee6eb14a003445860000000000000000000000007e1b507d216e83726380fdf742ff29e64f5e4ded0000000000000000000000007e1b507d216e83726380fdf742ff29e64f5e4ded00000000000000000000000028455527fab535711a3c341b9283147ded67af8e000000000000000000000000a813f4acbdb713578ff279b2c215964a8e1b803f000000000000000000000000000000000000000000000000000000005c8edf81000000000000000000000000000000000000000000000000000000005d422b7f
Deployed Bytecode
0x60806040526004361061016a576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806310154bad146101755780631515bc2b146101c6578063291d9549146101f55780632c4e722e1461024657806334fcf437146102715780633af32abf146102ac5780633c2483ca146103155780634042b66f1461034057806347535d7b1461036b57806349adac231461039a5780634b6753bc146103b15780634c5a628c146103dc578063521eb273146103f35780636155037c1461044a5780636f511bd31461047557806372f4bd3f1461048c5780637362d9c8146104b7578063941f0c8714610508578063a12a6bb014610533578063a85ffe4f14610562578063b7a8807c146105bd578063bb5f747b146105e8578063bf58390314610651578063bff99c6c1461067c578063d6cd9473146106d3578063ec8ac4d8146106ea578063fc0c546a1461072e578063fec8e4a514610785575b610173336107b0565b005b34801561018157600080fd5b506101c46004803603602081101561019857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108a6565b005b3480156101d257600080fd5b506101db6108c6565b604051808215151515815260200191505060405180910390f35b34801561020157600080fd5b506102446004803603602081101561021857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108d2565b005b34801561025257600080fd5b5061025b6108f2565b6040518082815260200191505060405180910390f35b34801561027d57600080fd5b506102aa6004803603602081101561029457600080fd5b81019080803590602001909291905050506108fc565b005b3480156102b857600080fd5b506102fb600480360360208110156102cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610999565b604051808215151515815260200191505060405180910390f35b34801561032157600080fd5b5061032a6109b6565b6040518082815260200191505060405180910390f35b34801561034c57600080fd5b506103556109c0565b6040518082815260200191505060405180910390f35b34801561037757600080fd5b506103806109ca565b604051808215151515815260200191505060405180910390f35b3480156103a657600080fd5b506103af6109e5565b005b3480156103bd57600080fd5b506103c6610a7a565b6040518082815260200191505060405180910390f35b3480156103e857600080fd5b506103f1610a84565b005b3480156103ff57600080fd5b50610408610a8f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561045657600080fd5b5061045f610ab9565b6040518082815260200191505060405180910390f35b34801561048157600080fd5b5061048a610ac3565b005b34801561049857600080fd5b506104a1610b57565b6040518082815260200191505060405180910390f35b3480156104c357600080fd5b50610506600480360360208110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b61565b005b34801561051457600080fd5b5061051d610b81565b6040518082815260200191505060405180910390f35b34801561053f57600080fd5b50610548610b8b565b604051808215151515815260200191505060405180910390f35b34801561056e57600080fd5b506105bb6004803603604081101561058557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba2565b005b3480156105c957600080fd5b506105d2610cb8565b6040518082815260200191505060405180910390f35b3480156105f457600080fd5b506106376004803603602081101561060b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cc2565b604051808215151515815260200191505060405180910390f35b34801561065d57600080fd5b50610666610cdf565b6040518082815260200191505060405180910390f35b34801561068857600080fd5b50610691610f1c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106df57600080fd5b506106e8610f46565b005b61072c6004803603602081101561070057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b0565b005b34801561073a57600080fd5b50610743610f51565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561079157600080fd5b5061079a610f7b565b6040518082815260200191505060405180910390f35b6001600080828254019250508190555060008054905060003490506107d58382610f85565b60006107e082611148565b90506107f78260045461118590919063ffffffff16565b60048190555061080784826111a6565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f6faf93231a456e552dbc9961f58d9713ee4f2e69d15f1975b050ef0911053a7b8484604051808381526020018281526020019250505060405180910390a361087e84836111b4565b610886611288565b61089084836112f3565b5050600054811415156108a257600080fd5b5050565b6108af33610cc2565b15156108ba57600080fd5b6108c3816112f7565b50565b60006006544211905090565b6108db33610cc2565b15156108e657600080fd5b6108ef81611351565b50565b6000600a54905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561095857600080fd5b80600a819055507f5a75aa1ccd5244c76a14e60301b7bc29e02263de78b6af4606269d5e1db08513816040518082815260200191505060405180910390a150565b60006109af8260096113ab90919063ffffffff16565b9050919050565b6000600c54905090565b6000600454905090565b600060055442101580156109e057506006544211155b905090565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a4157600080fd5b601260149054906101000a900460ff16151515610a5d57600080fd5b6001601260146101000a81548160ff021916908315150217905550565b6000600654905090565b610a8d3361143f565b565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600d54905090565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b1f57600080fd5b601260149054906101000a900460ff161515610b3a57600080fd5b6000601260146101000a81548160ff021916908315150217905550565b6000600f54905090565b610b6a33610cc2565b1515610b7557600080fd5b610b7e81611499565b50565b6000600e54905090565b6000601260149054906101000a900460ff16905090565b610baa6109ca565b1515610bb557600080fd5b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c1157600080fd5b610c1b8282610f85565b6000610c2682611148565b9050610c3283826111a6565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f6faf93231a456e552dbc9961f58d9713ee4f2e69d15f1975b050ef0911053a7b8484604051808381526020018281526020019250505060405180910390a3610ca983836111b4565b610cb383836112f3565b505050565b6000600554905090565b6000610cd88260086113ab90919063ffffffff16565b9050919050565b6000610f17610cec610f51565b73ffffffffffffffffffffffffffffffffffffffff166370a08231600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610da657600080fd5b505afa158015610dba573d6000803e3d6000fd5b505050506040513d6020811015610dd057600080fd5b8101908080519060200190929190505050610de9610f51565b73ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16306040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610ed757600080fd5b505afa158015610eeb573d6000803e3d6000fd5b505050506040513d6020811015610f0157600080fd5b81019080805190602001909291905050506114f3565b905090565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610f4f33611351565b565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600b54905090565b601260149054906101000a900460ff161561101857610fa382610999565b1515611017576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f4f6e6c792077686974656c69737465640000000000000000000000000000000081525060200191505060405180910390fd5b5b600061102f600a548361150c90919063ffffffff16565b9050600c5481101515156110ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4d696e20707572636861736520313030206b69636b000000000000000000000081525060200191505060405180910390fd5b600b546110c382600d5461118590919063ffffffff16565b11151515611139576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f43617020686173206265656e207265616368656400000000000000000000000081525060200191505060405180910390fd5b611143838361154a565b505050565b600080611160600a548461150c90919063ffffffff16565b905061117d61116e8261156b565b8261118590919063ffffffff16565b915050919050565b600080828401905083811015151561119c57600080fd5b8091505092915050565b6111b08282611612565b5050565b60006111cb600a548361150c90919063ffffffff16565b905060006111d88261156b565b9050600081141515611267578373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f11a039550cd7911b4cd65a69f27ebee7908939ac8f7b25b47b3df44ac58b06148584604051808381526020018281526020019250505060405180910390a3611264818361118590919063ffffffff16565b91505b61127c82600d5461118590919063ffffffff16565b600d8190555050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156112f0573d6000803e3d6000fd5b50565b5050565b61130b81600961166c90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fee1504a83b6d4a361f4c1dc78ab59bfa30d6a3b6612c403e86bb01ef2984295f60405160405180910390a250565b61136581600961171c90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f270d9b30cf5b0793bbfd54c9d5b94aeb49462b8148399000265144a8722da6b660405160405180910390a250565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156113e857600080fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61145381600861171c90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f0a8eb35e5ca14b3d6f28e4abf2f128dbab231a58b56e89beb5d636115001e16560405160405180910390a250565b6114ad81600861166c90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f22380c05984257a1cb900161c713dd71d39e74820f1aea43bd3f1bdd2096129960405160405180910390a250565b60008183106115025781611504565b825b905092915050565b60008083141561151f5760009050611544565b6000828402905082848281151561153257fe5b0414151561153f57600080fd5b809150505b92915050565b6115526109ca565b151561155d57600080fd5b61156782826117cb565b5050565b60008060009050600e5461158a84600d5461118590919063ffffffff16565b1115156115bf576115b860646115aa60148661150c90919063ffffffff16565b61181b90919063ffffffff16565b9050611609565b600f546115d784600d5461118590919063ffffffff16565b1115156116085761160560646115f7600a8661150c90919063ffffffff16565b61181b90919063ffffffff16565b90505b5b80915050919050565b611668600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383611642610f51565b73ffffffffffffffffffffffffffffffffffffffff16611845909392919063ffffffff16565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156116a857600080fd5b6116b282826113ab565b1515156116be57600080fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561175857600080fd5b61176282826113ab565b151561176d57600080fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561180757600080fd5b6000811415151561181757600080fd5b5050565b6000808211151561182b57600080fd5b6000828481151561183857fe5b0490508091505092915050565b8373ffffffffffffffffffffffffffffffffffffffff166323b872dd8484846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561191c57600080fd5b505af1158015611930573d6000803e3d6000fd5b505050506040513d602081101561194657600080fd5b8101908080519060200190929190505050151561196257600080fd5b5050505056fea165627a7a723058202ad8d0fa11dd1a8114f8da7a5f8021de25878765bd9f4afe47b251168c03710d0029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000059000000000000000000000000d91a6162f146ef85922d9a15ee6eb14a003445860000000000000000000000007e1b507d216e83726380fdf742ff29e64f5e4ded0000000000000000000000007e1b507d216e83726380fdf742ff29e64f5e4ded00000000000000000000000028455527fab535711a3c341b9283147ded67af8e000000000000000000000000a813f4acbdb713578ff279b2c215964a8e1b803f000000000000000000000000000000000000000000000000000000005c8edf81000000000000000000000000000000000000000000000000000000005d422b7f
-----Decoded View---------------
Arg [0] : rate (uint256): 89
Arg [1] : token (address): 0xD91a6162F146EF85922d9A15eE6eB14A00344586
Arg [2] : wallet (address): 0x7e1B507d216E83726380FdF742ff29E64F5e4DED
Arg [3] : tokenWallet (address): 0x7e1B507d216E83726380FdF742ff29E64F5e4DED
Arg [4] : manualSeller (address): 0x28455527FAb535711A3C341b9283147dEd67aF8E
Arg [5] : rateSetter (address): 0xA813F4ACBdB713578Ff279b2c215964A8E1B803f
Arg [6] : openingTime (uint256): 1552867201
Arg [7] : closingTime (uint256): 1564617599
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000059
Arg [1] : 000000000000000000000000d91a6162f146ef85922d9a15ee6eb14a00344586
Arg [2] : 0000000000000000000000007e1b507d216e83726380fdf742ff29e64f5e4ded
Arg [3] : 0000000000000000000000007e1b507d216e83726380fdf742ff29e64f5e4ded
Arg [4] : 00000000000000000000000028455527fab535711a3c341b9283147ded67af8e
Arg [5] : 000000000000000000000000a813f4acbdb713578ff279b2c215964a8e1b803f
Arg [6] : 000000000000000000000000000000000000000000000000000000005c8edf81
Arg [7] : 000000000000000000000000000000000000000000000000000000005d422b7f
Swarm Source
bzzr://2ad8d0fa11dd1a8114f8da7a5f8021de25878765bd9f4afe47b251168c03710d
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.