ETH Price: $3,569.23 (+8.25%)

Token

McFly (MFL)
 

Overview

Max Total Supply

105,569,845.785429864254243852 MFL

Holders

115

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
McFlyToken

Compiler Version
v0.4.18+commit.9cf6e910

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2017-11-06
*/

pragma solidity ^0.4.15;

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;
  }
}

contract Ownable {
  address public owner;


  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() {
    owner = msg.sender;
  }


  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }


  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) onlyOwner public {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}

contract ERC20Basic {
  uint256 public totalSupply;
  function balanceOf(address who) public constant returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

contract BasicToken is ERC20Basic {
  using SafeMath for uint256;

  mapping(address => uint256) balances;

  /**
  * @dev transfer token for a specified address
  * @param _to The address to transfer to.
  * @param _value The amount to be transferred.
  */
  function transfer(address _to, uint256 _value) public returns (bool) {
    require(_to != address(0));

    // SafeMath.sub will throw if there is not enough balance.
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    return true;
  }

  /**
  * @dev Gets the balance of the specified address.
  * @param _owner The address to query the the balance of.
  * @return An uint256 representing the amount owned by the passed address.
  */
  function balanceOf(address _owner) public constant returns (uint256 balance) {
    return balances[_owner];
  }

}

contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) public constant returns (uint256);
  function transferFrom(address from, address to, uint256 value) public returns (bool);
  function approve(address spender, uint256 value) public returns (bool);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

contract StandardToken is ERC20, BasicToken {

  mapping (address => mapping (address => uint256)) allowed;


  /**
   * @dev Transfer tokens from one address to another
   * @param _from address The address which you want to send tokens from
   * @param _to address The address which you want to transfer to
   * @param _value uint256 the amount of tokens to be transferred
   */
  function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
    require(_to != address(0));

    uint256 _allowance = allowed[_from][msg.sender];

    // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
    // require (_value <= _allowance);

    balances[_from] = balances[_from].sub(_value);
    balances[_to] = balances[_to].add(_value);
    allowed[_from][msg.sender] = _allowance.sub(_value);
    Transfer(_from, _to, _value);
    return true;
  }

  /**
   * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
   *
   * Beware that changing an allowance with this method brings the risk that someone may use both the old
   * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
   * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
   * @param _spender The address which will spend the funds.
   * @param _value The amount of tokens to be spent.
   */
  function approve(address _spender, uint256 _value) public returns (bool) {
    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }

  /**
   * @dev Function to check the amount of tokens that an owner allowed to a spender.
   * @param _owner address The address which owns the funds.
   * @param _spender address The address which will spend the funds.
   * @return A uint256 specifying the amount of tokens still available for the spender.
   */
  function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
    return allowed[_owner][_spender];
  }

  /**
   * approve should be called when allowed[_spender] == 0. To increment
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol
   */
  function increaseApproval (address _spender, uint _addedValue)
    returns (bool success) {
    allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
    Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

  function decreaseApproval (address _spender, uint _subtractedValue)
    returns (bool success) {
    uint oldValue = allowed[msg.sender][_spender];
    if (_subtractedValue > oldValue) {
      allowed[msg.sender][_spender] = 0;
    } else {
      allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
    }
    Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

}

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(0x0, _to, _amount);
    return true;
  }

  /**
   * @dev Function to stop minting new tokens.
   * @return True if the operation was successful.
   */
  function finishMinting() onlyOwner public returns (bool) {
    mintingFinished = true;
    MintFinished();
    return true;
  }
}

contract McFlyToken is MintableToken {

    string public constant name = 'McFly';
    string public constant symbol = 'MFL';
    uint8 public constant decimals = 18;

    mapping(address=>bool) whitelist;

    event Burn(address indexed from, uint256 value);
    event AllowTransfer(address from);

    modifier canTransfer() {
        require(mintingFinished || whitelist[msg.sender]);
        _;        
    }

    function allowTransfer(address from) onlyOwner {
        AllowTransfer(from);
        whitelist[from] = true;
    }

    function transferFrom(address from, address to, uint256 value) canTransfer returns (bool) {
        return super.transferFrom(from, to, value);
    }

    function transfer(address to, uint256 value) canTransfer returns (bool) {
        return super.transfer(to, value);
    }

    function burn(address from) onlyOwner returns (bool) {
        Transfer(from, 0x0, balances[from]);
        Burn(from, balances[from]);

        balances[0x0] += balances[from];
        balances[from] = 0;
    }
}

contract MultiOwners {

    event AccessGrant(address indexed owner);
    event AccessRevoke(address indexed owner);
    
    mapping(address => bool) owners;
    address public publisher;


    function MultiOwners() {
        owners[msg.sender] = true;
        publisher = msg.sender;
    }

    modifier onlyOwner() { 
        require(owners[msg.sender] == true);
        _; 
    }

    function isOwner() constant returns (bool) {
        return owners[msg.sender] ? true : false;
    }

    function checkOwner(address maybe_owner) constant returns (bool) {
        return owners[maybe_owner] ? true : false;
    }


    function grant(address _owner) onlyOwner {
        owners[_owner] = true;
        AccessGrant(_owner);
    }

    function revoke(address _owner) onlyOwner {
        require(_owner != publisher);
        require(msg.sender != _owner);

        owners[_owner] = false;
        AccessRevoke(_owner);
    }
}

contract Haltable is MultiOwners {
    bool public halted;

    modifier stopInEmergency {
        require(!halted);
        _;
    }

    modifier onlyInEmergency {
        require(halted);
        _;
    }

    // called by the owner on emergency, triggers stopped state
    function halt() external onlyOwner {
        halted = true;
    }

    // called by the owner on end of emergency, returns to normal state
    function unhalt() external onlyOwner onlyInEmergency {
        halted = false;
    }

}

contract McFlyCrowdsale is MultiOwners, Haltable {
    using SafeMath for uint256;

    // min wei per tx for TLP 1.1
    uint256 public minimalWeiTLP1 = 1e17; // 0.1 ETH
    uint256 public priceTLP1 = 1e14; // 0.0001 ETH

    // min wei per tx for TLP 1.2
    uint256 public minimalWeiTLP2 = 2e17; // 0.2 ETH
    uint256 public priceTLP2 = 2e14; // 0.0002 ETH

    // Total ETH received during WAVES, TLP1.1 and TLP1.2
    uint256 public totalETH;

    // Token
    McFlyToken public token;

    // Withdraw wallet
    address public wallet;

    // start and end timestamp for TLP 1.1, endTimeTLP1 calculate from startTimeTLP1
    uint256 public startTimeTLP1;
    uint256 public endTimeTLP1;
    uint256 daysTLP1 = 12 days;

    // start and end timestamp for TLP 1.2, endTimeTLP2 calculate from startTimeTLP2
    uint256 public startTimeTLP2;
    uint256 public endTimeTLP2;
    uint256 daysTLP2 = 24 days;

    // Percents
    uint256 fundPercents = 15;
    uint256 teamPercents = 10;
    uint256 reservedPercents = 10;
    uint256 bountyOnlinePercents = 2;
    uint256 bountyOfflinePercents = 3;
    uint256 advisoryPercents = 5;
    
    // Cap
    // maximum possible tokens for minting
    uint256 public hardCapInTokens = 1800e24; // 1,800,000,000 MFL

    // maximum possible tokens for sell 
    uint256 public mintCapInTokens = hardCapInTokens.mul(70).div(100); // 1,260,000,000 MFL

    // maximum possible tokens for fund minting
    uint256 public fundTokens = hardCapInTokens.mul(fundPercents).div(100); // 270,000,000 MFL
    uint256 public fundTotalSupply;
    address public fundMintingAgent;

    // Rewards
    // WAVES
    // maximum possible tokens to convert from WAVES
    uint256 public wavesTokens = 100e24; // 100,000,000 MFL
    address public wavesAgent;

    // Team 10%
    uint256 teamVestingPeriodInSeconds = 31 days;
    uint256 teamVestingPeriodsCount = 12;
    uint256 _teamTokens;
    uint256 public teamTotalSupply;
    address public teamWallet;

    // Bounty 5% (2% + 3%)
    // Bounty online 2%
    uint256 _bountyOnlineTokens;
    address public bountyOnlineWallet;

    // Bounty offline 3%
    uint256 _bountyOfflineTokens;
    address public bountyOfflineWallet;

    // Advisory 5%
    uint256 _advisoryTokens;
    address public advisoryWallet;

    // Reserved for future 10%
    uint256 _reservedTokens;
    address public reservedWallet;


    event TokenPurchase(address indexed beneficiary, uint256 value, uint256 amount);
    event TransferOddEther(address indexed beneficiary, uint256 value);
    event FundMinting(address indexed beneficiary, uint256 value);
    event TeamVesting(address indexed beneficiary, uint256 period, uint256 value);
    event SetFundMintingAgent(address new_agent);
    event SetStartTimeTLP1(uint256 new_startTimeTLP1);
    event SetStartTimeTLP2(uint256 new_startTimeTLP2);


    modifier validPurchase() {
        bool nonZeroPurchase = msg.value != 0;
        
        require(withinPeriod() && nonZeroPurchase);

        _;        
    }

    function McFlyCrowdsale(
        uint256 _startTimeTLP1,
        uint256 _startTimeTLP2,
        address _wallet,
        address _wavesAgent,
        address _fundMintingAgent,
        address _teamWallet,
        address _bountyOnlineWallet,
        address _bountyOfflineWallet,
        address _advisoryWallet,
        address _reservedWallet
    ) {
        require(_startTimeTLP1 >= block.timestamp);
        require(_startTimeTLP2 > _startTimeTLP1);
        require(_wallet != 0x0);
        require(_wavesAgent != 0x0);
        require(_fundMintingAgent != 0x0);
        require(_teamWallet != 0x0);
        require(_bountyOnlineWallet != 0x0);
        require(_bountyOfflineWallet != 0x0);
        require(_advisoryWallet != 0x0);
        require(_reservedWallet != 0x0);

        token = new McFlyToken();

        startTimeTLP1 = _startTimeTLP1; 
        endTimeTLP1 = startTimeTLP1.add(daysTLP1);

        require(endTimeTLP1 < _startTimeTLP2);

        startTimeTLP2 = _startTimeTLP2; 
        endTimeTLP2 = startTimeTLP2.add(daysTLP2);

        wavesAgent = _wavesAgent;
        fundMintingAgent = _fundMintingAgent;

        wallet = _wallet;
        teamWallet = _teamWallet;
        bountyOnlineWallet = _bountyOnlineWallet;
        bountyOfflineWallet = _bountyOfflineWallet;
        advisoryWallet = _advisoryWallet;
        reservedWallet = _reservedWallet;

        totalETH = wavesTokens.mul(priceTLP1.mul(65).div(100)).div(1e18); // 6500 for 100,000,000 MFL from WAVES
        token.mint(wavesAgent, wavesTokens);
        token.allowTransfer(wavesAgent);
    }

    function withinPeriod() constant public returns (bool) {
        bool withinPeriodTLP1 = (now >= startTimeTLP1 && now <= endTimeTLP1);
        bool withinPeriodTLP2 = (now >= startTimeTLP2 && now <= endTimeTLP2);
        return withinPeriodTLP1 || withinPeriodTLP2;
    }

    // @return false if crowdsale event was ended
    function running() constant public returns (bool) {
        return withinPeriod() && !token.mintingFinished();
    }

    function teamTokens() constant public returns (uint256) {
        if(_teamTokens > 0) {
            return _teamTokens;
        }
        return token.totalSupply().mul(teamPercents).div(70);
    }

    function bountyOnlineTokens() constant public returns (uint256) {
        if(_bountyOnlineTokens > 0) {
            return _bountyOnlineTokens;
        }
        return token.totalSupply().mul(bountyOnlinePercents).div(70);
    }

    function bountyOfflineTokens() constant public returns (uint256) {
        if(_bountyOfflineTokens > 0) {
            return _bountyOfflineTokens;
        }
        return token.totalSupply().mul(bountyOfflinePercents).div(70);
    }

    function advisoryTokens() constant public returns (uint256) {
        if(_advisoryTokens > 0) {
            return _advisoryTokens;
        }
        return token.totalSupply().mul(advisoryPercents).div(70);
    }

    function reservedTokens() constant public returns (uint256) {
        if(_reservedTokens > 0) {
            return _reservedTokens;
        }
        return token.totalSupply().mul(reservedPercents).div(70);
    }

    // @return current stage name
    function stageName() constant public returns (string) {
        bool beforePeriodTLP1 = (now < startTimeTLP1);
        bool withinPeriodTLP1 = (now >= startTimeTLP1 && now <= endTimeTLP1);
        bool betweenPeriodTLP1andTLP2 = (now >= endTimeTLP1 && now <= startTimeTLP2);
        bool withinPeriodTLP2 = (now >= startTimeTLP2 && now <= endTimeTLP2);

        if(beforePeriodTLP1) {
            return 'Not started';
        }

        if(withinPeriodTLP1) {
            return 'TLP1.1';
        } 

        if(betweenPeriodTLP1andTLP2) {
            return 'Between TLP1.1 and TLP1.2';
        }

        if(withinPeriodTLP2) {
            return 'TLP1.2';
        }

        return 'Finished';
    }

    /*
     * @dev fallback for processing ether
     */
    function() payable {
        return buyTokens(msg.sender);
    }

    /*
     * @dev change agent for waves minting
     * @praram agent - new agent address
     */
    function setFundMintingAgent(address agent) onlyOwner {
        fundMintingAgent = agent;
        SetFundMintingAgent(agent);
    }

    /*
     * @dev set TLP1.2 start date
     * @param _at — new start date
     */
    function setStartTimeTLP2(uint256 _at) onlyOwner {
        require(block.timestamp < startTimeTLP2); // forbid change time when TLP1.2 is active
        require(block.timestamp < _at); // should be great than current block timestamp
        require(endTimeTLP1 < _at); // should be great than end TLP1.1

        startTimeTLP2 = _at;
        endTimeTLP2 = startTimeTLP2.add(daysTLP2);
        SetStartTimeTLP2(_at);
    }

    /*
     * @dev set TLP1.1 start date
     * @param _at - new start date
     */
    function setStartTimeTLP1(uint256 _at) onlyOwner {
        require(block.timestamp < startTimeTLP1); // forbid change time when TLP1.1 is active
        require(block.timestamp < _at); // should be great than current block timestamp

        startTimeTLP1 = _at;
        endTimeTLP1 = startTimeTLP1.add(daysTLP1);
        SetStartTimeTLP1(_at);
    }

    /*
     * @dev Large Token Holder minting 
     * @param to - mint to address
     * @param amount - how much mint
     */
    function fundMinting(address to, uint256 amount) stopInEmergency {
        require(msg.sender == fundMintingAgent || isOwner());
        require(block.timestamp <= startTimeTLP2);
        require(fundTotalSupply + amount <= fundTokens);
        require(token.totalSupply() + amount <= mintCapInTokens);

        fundTotalSupply = fundTotalSupply.add(amount);
        FundMinting(to, amount);
        token.mint(to, amount);
    }

    /*
     * @dev calculate amount
     * @param  _value - ether to be converted to tokens
     * @param  at - current time
     * @param  _totalSupply - total supplied tokens
     * @return tokens amount that we should send to our dear investor
     * @return odd ethers amount, which contract should send back
     */
    function calcAmountAt(
        uint256 amount,
        uint256 at,
        uint256 _totalSupply
    ) public constant returns (uint256, uint256) {
        uint256 estimate;
        uint256 discount;
        uint256 price;

        if(at >= startTimeTLP1 && at <= endTimeTLP1) {
            /*
                35% 0.0650 | 1 ETH -> 1 / (100-35) * 100 / 0.1 * 1000 = 15384.61538461538 MFL
                30% 0.0700 | 1 ETH -> 1 / (100-30) * 100 / 0.1 * 1000 = 14285.714287 MFL
                15% 0.0850 | 1 ETH -> 1 / (100-15) * 100 / 0.1 * 1000 = 11764.705882352941 MFL
                 0% 0.1000 | 1 ETH -> 1 / (100-0) * 100  / 0.1 * 1000 = 10000 MFL
            */
            require(amount >= minimalWeiTLP1);

            price = priceTLP1;

            if(at < startTimeTLP1 + 3 days) {
                discount = 65; //  100-35 = 0.065 ETH per 1000 MFL

            } else if(at < startTimeTLP1 + 6 days) {
                discount = 70; //  100-30 = 0.07 ETH per 1000 MFL

            } else if(at < startTimeTLP1 + 9 days) {
                discount = 85; //  100-15 = 0.085 ETH per 1000 MFL

            } else if(at < startTimeTLP1 + 12 days) {
                discount = 100; // 100 = 0.1 ETH per 1000 MFL

            } else {
                revert();
            }

        } else if(at >= startTimeTLP2 && at <= endTimeTLP2) {
            /*
                 -40% 0.12 | 1 ETH -> 1 / (100-40) * 100 / 0.2 * 1000 = 8333.3333333333 MFL
                 -30% 0.14 | 1 ETH -> 1 / (100-30) * 100 / 0.2 * 1000 = 7142.8571428571 MFL
                 -20% 0.16 | 1 ETH -> 1 / (100-20) * 100 / 0.2 * 1000 = 6250 MFL
                 -10% 0.18 | 1 ETH -> 1 / (100-10) * 100 / 0.2 * 1000 = 5555.5555555556 MFL
                   0% 0.20 | 1 ETH -> 1 / (100-0) * 100 / 0.2 * 1000  = 5000 MFL
                  10% 0.22 | 1 ETH -> 1 / (100+10) * 100 / 0.2 * 1000 = 4545.4545454545 MFL
                  20% 0.24 | 1 ETH -> 1 / (100+20) * 100 / 0.2 * 1000 = 4166.6666666667 MFL
                  30% 0.26 | 1 ETH -> 1 / (100+30) * 100 / 0.2 * 1000 = 3846.1538461538 MFL
            */
            require(amount >= minimalWeiTLP2);

            price = priceTLP2;

            if(at < startTimeTLP2 + 3 days) {
                discount = 60; // 100-40 = 0.12 ETH per 1000 MFL

            } else if(at < startTimeTLP2 + 6 days) {
                discount = 70; // 100-30 = 0.14 ETH per 1000 MFL

            } else if(at < startTimeTLP2 + 9 days) {
                discount = 80; // 100-20 = 0.16 ETH per 1000 MFL

            } else if(at < startTimeTLP2 + 12 days) {
                discount = 90; // 100-10 = 0.18 ETH per 1000 MFL

            } else if(at < startTimeTLP2 + 15 days) {
                discount = 100; // 100 = 0.2 ETH per 1000 MFL

            } else if(at < startTimeTLP2 + 18 days) {
                discount = 110; // 100+10 = 0.22 ETH per 1000 MFL

            } else if(at < startTimeTLP2 + 21 days) {
                discount = 120; // 100+20 = 0.24 ETH per 1000 MFL

            } else if(at < startTimeTLP2 + 24 days) {
                discount = 130; // 100+30 = 0.26 ETH per 1000 MFL

            } else {
                revert();
            }
        } else {
            revert();
        }

        price = price.mul(discount).div(100);
        estimate = _totalSupply.add(amount.mul(1e18).div(price));

        if(estimate > mintCapInTokens) {
            return (
                mintCapInTokens.sub(_totalSupply),
                estimate.sub(mintCapInTokens).mul(price).div(1e18)
            );
        }
        return (estimate.sub(_totalSupply), 0);
    }

    /*
     * @dev sell token and send to contributor address
     * @param contributor address
     */
    function buyTokens(address contributor) payable stopInEmergency validPurchase public {
        uint256 amount;
        uint256 odd_ethers;
        uint256 ethers;
        
        (amount, odd_ethers) = calcAmountAt(msg.value, block.timestamp, token.totalSupply());
  
        require(contributor != 0x0) ;
        require(amount + token.totalSupply() <= mintCapInTokens);

        ethers = (msg.value - odd_ethers);

        token.mint(contributor, amount); // fail if minting is finished
        TokenPurchase(contributor, ethers, amount);
        totalETH += ethers;

        if(odd_ethers > 0) {
            require(odd_ethers < msg.value);
            TransferOddEther(contributor, odd_ethers);
            contributor.transfer(odd_ethers);
        }

        wallet.transfer(ethers);
    }

    function teamWithdraw() public {
        require(token.mintingFinished());
        require(msg.sender == teamWallet || isOwner());

        uint256 currentPeriod = (block.timestamp).sub(endTimeTLP2).div(teamVestingPeriodInSeconds);
        if(currentPeriod > teamVestingPeriodsCount) {
            currentPeriod = teamVestingPeriodsCount;
        }
        uint256 tokenAvailable = _teamTokens.mul(currentPeriod).div(teamVestingPeriodsCount).sub(teamTotalSupply);

        require(teamTotalSupply + tokenAvailable <= _teamTokens);

        teamTotalSupply = teamTotalSupply.add(tokenAvailable);

        TeamVesting(teamWallet, currentPeriod, tokenAvailable);
        token.transfer(teamWallet, tokenAvailable);

    }

    function finishCrowdsale() onlyOwner public {
        require(now > endTimeTLP2 || mintCapInTokens == token.totalSupply());
        require(!token.mintingFinished());

        uint256 _totalSupply = token.totalSupply();

        // rewards
        _teamTokens = _totalSupply.mul(teamPercents).div(70); // 180,000,000 MFL
        token.mint(this, _teamTokens); // mint to contract address

        _reservedTokens = _totalSupply.mul(reservedPercents).div(70); // 180,000,000 MFL
        token.mint(reservedWallet, _reservedTokens);

        _advisoryTokens = _totalSupply.mul(advisoryPercents).div(70); // 90,000,000 MFL
        token.mint(advisoryWallet, _advisoryTokens);

        _bountyOfflineTokens = _totalSupply.mul(bountyOfflinePercents).div(70); // 54,000,000 MFL
        token.mint(bountyOfflineWallet, _bountyOfflineTokens);

        _bountyOnlineTokens = _totalSupply.mul(bountyOnlinePercents).div(70); // 36,000,000 MFL
        token.mint(bountyOnlineWallet, _bountyOnlineTokens);

        token.finishMinting();
   }

}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"mintingFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"mint","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finishMinting","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"}],"name":"burn","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"}],"name":"allowTransfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"}],"name":"AllowTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[],"name":"MintFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]

606060405260038054600160a860020a03191633600160a060020a0316179055610d0e8061002e6000396000f3006060604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b811461010057806306fdde0314610127578063095ea7b3146101b157806318160ddd146101d357806323b872dd146101f8578063313ce5671461022057806340c10f1914610249578063661884631461026b57806370a082311461028d5780637d64bcb4146102ac57806389afcb44146102bf5780638da5cb5b146102de57806395d89b411461030d578063a9059cbb14610320578063b3490bfc14610342578063d73dd62314610363578063dd62ed3e14610385578063f2fde38b146103aa575b600080fd5b341561010b57600080fd5b6101136103c9565b604051901515815260200160405180910390f35b341561013257600080fd5b61013a6103d9565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561017657808201518382015260200161015e565b50505050905090810190601f1680156101a35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101bc57600080fd5b610113600160a060020a0360043516602435610410565b34156101de57600080fd5b6101e661047c565b60405190815260200160405180910390f35b341561020357600080fd5b610113600160a060020a0360043581169060243516604435610482565b341561022b57600080fd5b6102336104d3565b60405160ff909116815260200160405180910390f35b341561025457600080fd5b610113600160a060020a03600435166024356104d8565b341561027657600080fd5b610113600160a060020a03600435166024356105d3565b341561029857600080fd5b6101e6600160a060020a03600435166106cd565b34156102b757600080fd5b6101136106e8565b34156102ca57600080fd5b610113600160a060020a036004351661075c565b34156102e957600080fd5b6102f161084a565b604051600160a060020a03909116815260200160405180910390f35b341561031857600080fd5b61013a610859565b341561032b57600080fd5b610113600160a060020a0360043516602435610890565b341561034d57600080fd5b610361600160a060020a03600435166108df565b005b341561036e57600080fd5b610113600160a060020a036004351660243561095b565b341561039057600080fd5b6101e6600160a060020a03600435811690602435166109ff565b34156103b557600080fd5b610361600160a060020a0360043516610a2a565b60035460a060020a900460ff1681565b60408051908101604052600581527f4d63466c79000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b60035460009060a060020a900460ff16806104b55750600160a060020a03331660009081526004602052604090205460ff165b15156104c057600080fd5b6104cb848484610ac5565b949350505050565b601281565b60035460009033600160a060020a039081169116146104f657600080fd5b60035460a060020a900460ff161561050d57600080fd5b600054610520908363ffffffff610bdd16565b6000908155600160a060020a03841681526001602052604090205461054b908363ffffffff610bdd16565b600160a060020a0384166000818152600160205260409081902092909255907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859084905190815260200160405180910390a282600160a060020a03166000600080516020610cc38339815191528460405190815260200160405180910390a350600192915050565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561063057600160a060020a033381166000908152600260209081526040808320938816835292905290812055610667565b610640818463ffffffff610bec16565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526001602052604090205490565b60035460009033600160a060020a0390811691161461070657600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790557fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a150600190565b60035460009033600160a060020a0390811691161461077a57600080fd5b600160a060020a03821660008181526001602052604080822054919291600080516020610cc3833981519152915190815260200160405180910390a3600160a060020a03821660008181526001602052604090819020547fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5915190815260200160405180910390a2600160a060020a0391909116600090815260016020526040812080547fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49805490910190555590565b600354600160a060020a031681565b60408051908101604052600381527f4d464c0000000000000000000000000000000000000000000000000000000000602082015281565b60035460009060a060020a900460ff16806108c35750600160a060020a03331660009081526004602052604090205460ff165b15156108ce57600080fd5b6108d88383610bfe565b9392505050565b60035433600160a060020a039081169116146108fa57600080fd5b7fcc25b8a957df0a0b6c4413850c122a29ee10048018cd63f00e453e1bba64943a81604051600160a060020a03909116815260200160405180910390a1600160a060020a03166000908152600460205260409020805460ff19166001179055565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610993908363ffffffff610bdd16565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60035433600160a060020a03908116911614610a4557600080fd5b600160a060020a0381161515610a5a57600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600080600160a060020a0384161515610add57600080fd5b50600160a060020a03808516600081815260026020908152604080832033909516835293815283822054928252600190529190912054610b23908463ffffffff610bec16565b600160a060020a038087166000908152600160205260408082209390935590861681522054610b58908463ffffffff610bdd16565b600160a060020a038516600090815260016020526040902055610b81818463ffffffff610bec16565b600160a060020a0380871660008181526002602090815260408083203386168452909152908190209390935590861691600080516020610cc38339815191529086905190815260200160405180910390a3506001949350505050565b6000828201838110156108d857fe5b600082821115610bf857fe5b50900390565b6000600160a060020a0383161515610c1557600080fd5b600160a060020a033316600090815260016020526040902054610c3e908363ffffffff610bec16565b600160a060020a033381166000908152600160205260408082209390935590851681522054610c73908363ffffffff610bdd16565b600160a060020a038085166000818152600160205260409081902093909355913390911690600080516020610cc38339815191529085905190815260200160405180910390a3506001929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058205d9dbeec6170bfb3d366b5c52e52309bdda13fea849408aa27f91bb97130c22d0029

Deployed Bytecode

0x6060604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b811461010057806306fdde0314610127578063095ea7b3146101b157806318160ddd146101d357806323b872dd146101f8578063313ce5671461022057806340c10f1914610249578063661884631461026b57806370a082311461028d5780637d64bcb4146102ac57806389afcb44146102bf5780638da5cb5b146102de57806395d89b411461030d578063a9059cbb14610320578063b3490bfc14610342578063d73dd62314610363578063dd62ed3e14610385578063f2fde38b146103aa575b600080fd5b341561010b57600080fd5b6101136103c9565b604051901515815260200160405180910390f35b341561013257600080fd5b61013a6103d9565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561017657808201518382015260200161015e565b50505050905090810190601f1680156101a35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101bc57600080fd5b610113600160a060020a0360043516602435610410565b34156101de57600080fd5b6101e661047c565b60405190815260200160405180910390f35b341561020357600080fd5b610113600160a060020a0360043581169060243516604435610482565b341561022b57600080fd5b6102336104d3565b60405160ff909116815260200160405180910390f35b341561025457600080fd5b610113600160a060020a03600435166024356104d8565b341561027657600080fd5b610113600160a060020a03600435166024356105d3565b341561029857600080fd5b6101e6600160a060020a03600435166106cd565b34156102b757600080fd5b6101136106e8565b34156102ca57600080fd5b610113600160a060020a036004351661075c565b34156102e957600080fd5b6102f161084a565b604051600160a060020a03909116815260200160405180910390f35b341561031857600080fd5b61013a610859565b341561032b57600080fd5b610113600160a060020a0360043516602435610890565b341561034d57600080fd5b610361600160a060020a03600435166108df565b005b341561036e57600080fd5b610113600160a060020a036004351660243561095b565b341561039057600080fd5b6101e6600160a060020a03600435811690602435166109ff565b34156103b557600080fd5b610361600160a060020a0360043516610a2a565b60035460a060020a900460ff1681565b60408051908101604052600581527f4d63466c79000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b60035460009060a060020a900460ff16806104b55750600160a060020a03331660009081526004602052604090205460ff165b15156104c057600080fd5b6104cb848484610ac5565b949350505050565b601281565b60035460009033600160a060020a039081169116146104f657600080fd5b60035460a060020a900460ff161561050d57600080fd5b600054610520908363ffffffff610bdd16565b6000908155600160a060020a03841681526001602052604090205461054b908363ffffffff610bdd16565b600160a060020a0384166000818152600160205260409081902092909255907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859084905190815260200160405180910390a282600160a060020a03166000600080516020610cc38339815191528460405190815260200160405180910390a350600192915050565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561063057600160a060020a033381166000908152600260209081526040808320938816835292905290812055610667565b610640818463ffffffff610bec16565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526001602052604090205490565b60035460009033600160a060020a0390811691161461070657600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790557fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a150600190565b60035460009033600160a060020a0390811691161461077a57600080fd5b600160a060020a03821660008181526001602052604080822054919291600080516020610cc3833981519152915190815260200160405180910390a3600160a060020a03821660008181526001602052604090819020547fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5915190815260200160405180910390a2600160a060020a0391909116600090815260016020526040812080547fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49805490910190555590565b600354600160a060020a031681565b60408051908101604052600381527f4d464c0000000000000000000000000000000000000000000000000000000000602082015281565b60035460009060a060020a900460ff16806108c35750600160a060020a03331660009081526004602052604090205460ff165b15156108ce57600080fd5b6108d88383610bfe565b9392505050565b60035433600160a060020a039081169116146108fa57600080fd5b7fcc25b8a957df0a0b6c4413850c122a29ee10048018cd63f00e453e1bba64943a81604051600160a060020a03909116815260200160405180910390a1600160a060020a03166000908152600460205260409020805460ff19166001179055565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610993908363ffffffff610bdd16565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60035433600160a060020a03908116911614610a4557600080fd5b600160a060020a0381161515610a5a57600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600080600160a060020a0384161515610add57600080fd5b50600160a060020a03808516600081815260026020908152604080832033909516835293815283822054928252600190529190912054610b23908463ffffffff610bec16565b600160a060020a038087166000908152600160205260408082209390935590861681522054610b58908463ffffffff610bdd16565b600160a060020a038516600090815260016020526040902055610b81818463ffffffff610bec16565b600160a060020a0380871660008181526002602090815260408083203386168452909152908190209390935590861691600080516020610cc38339815191529086905190815260200160405180910390a3506001949350505050565b6000828201838110156108d857fe5b600082821115610bf857fe5b50900390565b6000600160a060020a0383161515610c1557600080fd5b600160a060020a033316600090815260016020526040902054610c3e908363ffffffff610bec16565b600160a060020a033381166000908152600160205260408082209390935590851681522054610c73908363ffffffff610bdd16565b600160a060020a038085166000818152600160205260409081902093909355913390911690600080516020610cc38339815191529085905190815260200160405180910390a3506001929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058205d9dbeec6170bfb3d366b5c52e52309bdda13fea849408aa27f91bb97130c22d0029

Swarm Source

bzzr://5d9dbeec6170bfb3d366b5c52e52309bdda13fea849408aa27f91bb97130c22d
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.