Contract 0x66416d0f07b0cf1cd423b001f181e511f94689c8

 

TxHash Block Age From To Value [TxFee]
0xda7b8646622a8ef69081affcee65f40caf0ed7bd4b56f90bd282225bacad2f634965177422 days 3 hrs ago0x6b5129c9b0023cb9d0bbaad69c4c581c80a4914e IN  FolioNinjaToken0 Ether0.000517503
0x820e2be923a7ce6de42fd28d4072851b26b0b25d52cccef029f76e8e04f975bb4965171422 days 3 hrs ago0x6b5129c9b0023cb9d0bbaad69c4c581c80a4914e IN  FolioNinjaToken0 Ether0.00047187
0x9b47d83aa59e3f906919242893475006a596fb798f96df8770cf3b8a014656d24640355478 days 21 hrs ago0xf0da9d73c0366eb8299c89e6788de4cd6715dce1 IN  FolioNinjaToken0 Ether0.0063
0x839bccd34a05294a7fcb099e224e0700bbdc6de3342379d240e7d010752e73384576832489 days 4 hrs ago0xc6116beb9a4db8e12315fc88ca3646b419e206f1 IN  FolioNinjaToken0 Ether0.000473214
0x51b30a56cdd9e106c67d2333b7c6b8e2537287c3427e60c3463ac1a514c8b4394576718489 days 4 hrs ago0xc6116beb9a4db8e12315fc88ca3646b419e206f1 IN  FolioNinjaToken0 Ether0.00048972
0x090a92a3fade20d42574289d01d36d8a5cdf86f6bea2f0b9df6fe1f11e824a074520330498 days 6 hrs ago0x9264acf177749cf61f790bbfe0933f4ebcfdd3c7 IN  FolioNinjaToken0 Ether0.00110103
0xdb53a51367244c0dff160ae93b9094e730f70f61c07b0a5536e803f60ccaa7104501524501 days 6 hrs ago0x003c6df13f3c95f12e0f3e2c82e3980d9732558b IN  FolioNinjaToken0 Ether0.00110103
0x1c73301a95531e885bf5058b12c36284186ce12b33ee45a795a17ec6b07106cf4402637517 days 5 hrs ago0x47ce083d284866029727712fadc411b233a9cc47 IN  FolioNinjaToken0 Ether0.00072
0x702c0dc9eb4e9efceb2fae903a216b3e1b81d3920cdb2dc789cd26fbd4c0f1024366085523 days 23 hrs ago0x9264acf177749cf61f790bbfe0933f4ebcfdd3c7 IN  FolioNinjaToken0 Ether0.00252
0x1176f36efc38dae5948c381f87a8d93f873a1d17cd50328526ef64b3fff823c14366041523 days 23 hrs ago0x9264acf177749cf61f790bbfe0933f4ebcfdd3c7 IN  FolioNinjaToken0 Ether0.00126
[ Download CSV Export 

Latest 1 internal transaction Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0x992d16d5b9d3790b837a16b435cf2f70bbd71aa88ce38d89a3fe78766f08a2e24208337572 days 14 hrs ago0xd3e74ac8ecb37649488e6c918452e04e51eccf19  Contract Creation0 Ether
[ Download CSV Export 

Contract Source Code Verified (Exact Match)

Contract Name:
FolioNinjaToken

Compiler Version
v0.4.8+commit.60cc1668

Optimization Enabled:
Yes

Runs (Optimizer):
200

Contract Source Code

pragma solidity ^0.4.8;

// folio.ninja ERC20 Token & Crowdsale Contract
// Contact: [email protected]
// Cap of 12,632,000 Tokens
// 632,000 Tokens to Foundation
// 25,000 ETH Cap that goes to Developers
// Allows subsequent contribution / minting if cap not reached.

contract Assertive {
  function assert(bool assertion) internal {
      if (!assertion) throw;
  }
}

contract SafeMath is Assertive{
    function safeMul(uint a, uint b) internal returns (uint) {
        uint c = a * b;
        assert(a == 0 || c / a == b);
        return c;
    }

    function safeSub(uint a, uint b) internal returns (uint) {
        assert(b <= a);
        return a - b;
    }

    function safeAdd(uint a, uint b) internal returns (uint) {
        uint c = a + b;
        assert(c>=a && c>=b);
        return c;
    }
}

contract ERC20Protocol {
    function totalSupply() constant returns (uint256 totalSupply) {}
    function balanceOf(address _owner) constant returns (uint256 balance) {}
    function transfer(address _to, uint256 _value) returns (bool success) {}
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
    function approve(address _spender, uint256 _value) returns (bool success) {}
    function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}

    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}

contract ERC20 is ERC20Protocol {
    function transfer(address _to, uint256 _value) returns (bool success) {
        if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
            balances[msg.sender] -= _value;
            balances[_to] += _value;
            Transfer(msg.sender, _to, _value);
            return true;
        } else { 
            return false;
        }
    }

    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
        if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
            balances[_to] += _value;
            balances[_from] -= _value;
            allowed[_from][msg.sender] -= _value;
            Transfer(_from, _to, _value);
            return true;
        } else { 
            return false;
        }
    }

    function balanceOf(address _owner) constant returns (uint256 balance) {
        return balances[_owner];
    }

    function approve(address _spender, uint256 _value) returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
        return allowed[_owner][_spender];
    }

    mapping (address => uint256) balances;

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

    uint256 public totalSupply;
}

// Folio Ninja Token Contract
contract FolioNinjaToken is ERC20, SafeMath {
    // Consant token specific fields
    string public constant name = "folio.ninja";
    string public constant symbol = "FLN";
    uint public constant decimals = 18;
    uint public constant MAX_TOTAL_TOKEN_AMOUNT = 12632000 * 10 ** decimals;

    // Fields that are only changed in constructor
    address public minter; // Contribution contract
    address public FOUNDATION_WALLET; // Can change to other minting contribution contracts but only until total amount of token minted
    uint public startTime; // Contribution start time in seconds
    uint public endTime; // Contribution end time in seconds

    // MODIFIERS
    modifier only_minter {
        assert(msg.sender == minter);
        _;
    }

    modifier only_foundation {
        assert(msg.sender == FOUNDATION_WALLET);
        _;
    }

    modifier is_later_than(uint x) {
        assert(now > x);
        _;
    }

    modifier max_total_token_amount_not_reached(uint amount) {
        assert(safeAdd(totalSupply, amount) <= MAX_TOTAL_TOKEN_AMOUNT);
        _;
    }

    // METHODS
    function FolioNinjaToken(address setMinter, address setFoundation, uint setStartTime, uint setEndTime) {
        minter = setMinter;
        FOUNDATION_WALLET = setFoundation;
        startTime = setStartTime;
        endTime = setEndTime;
    }

    /// Pre: Address of contribution contract (minter) is set
    /// Post: Mints token
    function mintToken(address recipient, uint amount)
        external
        only_minter
        max_total_token_amount_not_reached(amount)
    {
        balances[recipient] = safeAdd(balances[recipient], amount);
        totalSupply = safeAdd(totalSupply, amount);
    }

    /// Pre: Prevent transfers until contribution period is over.
    /// Post: Transfer FLN from msg.sender
    /// Note: ERC20 interface
    function transfer(address recipient, uint amount)
        is_later_than(endTime)
        returns (bool success)
    {
        return super.transfer(recipient, amount);
    }

    /// Pre: Prevent transfers until contribution period is over.
    /// Post: Transfer FLN from arbitrary address
    /// Note: ERC20 interface
    function transferFrom(address sender, address recipient, uint amount)
        is_later_than(endTime)
        returns (bool success)
    {
        return super.transferFrom(sender, recipient, amount);
    }

    /// Pre: minting address is set. Restricted to foundation.
    /// Post: New minter can now create tokens up to MAX_TOTAL_TOKEN_AMOUNT.
    /// Note: This allows additional contribution periods at a later stage, while still using the same ERC20 compliant contract.
    function changeMintingAddress(address newMintingAddress) only_foundation { minter = newMintingAddress; }

    /// Pre: foundation address is set. Restricted to foundation.
    /// Post: New address set. This address controls the setting of the minter address
    function changeFoundationAddress(address newFoundationAddress) only_foundation { FOUNDATION_WALLET = newFoundationAddress; }
}

/// @title Contribution Contract
contract Contribution is SafeMath {
    // FIELDS

    // Constant fields
    uint public constant ETHER_CAP = 25000 ether; // Max amount raised during first contribution; targeted amount AUD 7M
    uint public constant MAX_CONTRIBUTION_DURATION = 8 weeks; // Max amount in seconds of contribution period

    // Price Rates
    uint public constant PRICE_RATE_FIRST = 480;
    uint public constant PRICE_RATE_SECOND = 460;
    uint public constant PRICE_RATE_THIRD = 440;
    uint public constant PRICE_RATE_FOURTH = 400;

    // Foundation Holdings
    uint public constant FOUNDATION_TOKENS = 632000 ether;

    // Fields that are only changed in constructor
    address public FOUNDATION_WALLET; // folio.ninja foundation wallet
    address public DEV_WALLET; // folio.ninja multisig wallet

    uint public startTime; // Contribution start time in seconds
    uint public endTime; // Contribution end time in seconds

    FolioNinjaToken public folioToken; // Contract of the ERC20 compliant folio.ninja token

    // Fields that can be changed by functions
    uint public etherRaised; // This will keep track of the Ether raised during the contribution
    bool public halted; // The foundation address can set this to true to halt the contribution due to an emergency

    // EVENTS
    event TokensBought(address indexed sender, uint eth, uint amount);

    // MODIFIERS
    modifier only_foundation {
        assert(msg.sender == FOUNDATION_WALLET);
        _;
    }

    modifier is_not_halted {
        assert(!halted);
        _;
    }

    modifier ether_cap_not_reached {
        assert(safeAdd(etherRaised, msg.value) <= ETHER_CAP);
        _;
    }

    modifier is_not_earlier_than(uint x) {
        assert(now >= x);
        _;
    }

    modifier is_earlier_than(uint x) {
        assert(now < x);
        _;
    }

    // CONSTANT METHODS

    /// Pre: startTime, endTime specified in constructor,
    /// Post: Price rate at given blockTime; One ether equals priceRate() of FLN tokens
    function priceRate() constant returns (uint) {
        // Four price tiers
        if (startTime <= now && now < startTime + 1 weeks)
            return PRICE_RATE_FIRST;
        if (startTime + 1 weeks <= now && now < startTime + 2 weeks)
            return PRICE_RATE_SECOND;
        if (startTime + 2 weeks <= now && now < startTime + 3 weeks)
            return PRICE_RATE_THIRD;
        if (startTime + 3 weeks <= now && now < endTime)
            return PRICE_RATE_FOURTH;
        // Should not be called before or after contribution period
        assert(false);
    }

    // NON-CONSTANT METHODS
    function Contribution(address setDevWallet, address setFoundationWallet, uint setStartTime) {
        DEV_WALLET = setDevWallet;
        FOUNDATION_WALLET = setFoundationWallet;
        startTime = setStartTime;
        endTime = startTime + MAX_CONTRIBUTION_DURATION;
        folioToken = new FolioNinjaToken(this, FOUNDATION_WALLET, startTime, endTime); // Create Folio Ninja Token Contract

        // Mint folio.ninja foundation tokens
        folioToken.mintToken(FOUNDATION_WALLET, FOUNDATION_TOKENS);
    }

    /// Pre: N/a
    /// Post: Bought folio.ninja tokens according to priceRate() and msg.value
    function () payable { buyRecipient(msg.sender); }

    /// Pre: N/a
    /// Post: Bought folio ninja tokens according to priceRate() and msg.value on behalf of recipient
    function buyRecipient(address recipient)
        payable
        is_not_earlier_than(startTime)
        is_earlier_than(endTime)
        is_not_halted
        ether_cap_not_reached
    {
        uint amount = safeMul(msg.value, priceRate());
        folioToken.mintToken(recipient, amount);
        etherRaised = safeAdd(etherRaised, msg.value);
        assert(DEV_WALLET.send(msg.value));
        TokensBought(recipient, msg.value, amount);
    }

    /// Pre: Emergency situation that requires contribution period to stop.
    /// Post: Contributing not possible anymore.
    function halt() only_foundation { halted = true; }

    /// Pre: Emergency situation resolved.
    /// Post: Contributing becomes possible again.
    function unhalt() only_foundation { halted = false; }

    /// Pre: Restricted to foundation.
    /// Post: New address set. To halt contribution and/or change minter in FolioNinjaToken contract.
    function changeFoundationAddress(address newFoundationAddress) only_foundation { FOUNDATION_WALLET = newFoundationAddress; }

    /// Pre: Restricted to foundation.
    /// Post: New address set. To change beneficiary of contributions
    function changeDevAddress(address newDevAddress) only_foundation { DEV_WALLET = newDevAddress; }
}

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"minter","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"FOUNDATION_WALLET","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"endTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newFoundationAddress","type":"address"}],"name":"changeFoundationAddress","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newMintingAddress","type":"address"}],"name":"changeMintingAddress","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"startTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"mintToken","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"MAX_TOTAL_TOKEN_AMOUNT","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"setMinter","type":"address"},{"name":"setFoundation","type":"address"},{"name":"setStartTime","type":"uint256"},{"name":"setEndTime","type":"uint256"}],"payable":false,"type":"constructor"},{"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"},{"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"}]

Contract Creation Code

606060405234610000576040516080806109af83398101604090815281516020830151918301516060909301519092905b60038054600160a060020a03808716600160a060020a0319928316179092556004805492861692909116919091179055600582905560068190555b505050505b6109308061007f6000396000f300606060405236156100d55763ffffffff60e060020a60003504166306fdde0381146100da5780630754617214610167578063095ea7b31461019057806318160ddd146101c057806323b872dd146101df5780632a7caaec14610215578063313ce5671461023e5780633197cbb61461025d5780634b11452c1461027c57806351892f071461029757806370a08231146102b257806378e97925146102dd57806379c65068146102fc57806395d89b411461031a578063a89c5be0146103a7578063a9059cbb146103c6578063dd62ed3e146103f6575b610000565b34610000576100e7610427565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b346100005761017461045e565b60408051600160a060020a039092168252519081900360200190f35b34610000576101ac600160a060020a036004351660243561046d565b604080519115158252519081900360200190f35b34610000576101cd6104d8565b60408051918252519081900360200190f35b34610000576101ac600160a060020a03600435811690602435166044356104de565b604080519115158252519081900360200190f35b3461000057610174610505565b60408051600160a060020a039092168252519081900360200190f35b34610000576101cd610514565b60408051918252519081900360200190f35b34610000576101cd610519565b60408051918252519081900360200190f35b3461000057610295600160a060020a036004351661051f565b005b3461000057610295600160a060020a0360043516610567565b005b34610000576101cd600160a060020a03600435166105af565b60408051918252519081900360200190f35b34610000576101cd6105ce565b60408051918252519081900360200190f35b3461000057610295600160a060020a03600435166024356105d4565b005b34610000576100e7610664565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576101cd61069b565b60408051918252519081900360200190f35b34610000576101ac600160a060020a03600435166024356106aa565b604080519115158252519081900360200190f35b34610000576101cd600160a060020a03600435811690602435166106cf565b60408051918252519081900360200190f35b60408051808201909152600b81527f666f6c696f2e6e696e6a61000000000000000000000000000000000000000000602082015281565b600354600160a060020a031681565b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b60006006546104ee8142116106fc565b6104f985858561070c565b91505b5b509392505050565b600454600160a060020a031681565b601281565b60065481565b60045461053a9033600160a060020a039081169116146106fc565b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b6004546105829033600160a060020a039081169116146106fc565b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600160a060020a0381166000908152602081905260409020545b919050565b60055481565b6003546105ef9033600160a060020a039081169116146106fc565b806106106012600a0a62c0bfc00261060960025484610819565b11156106fc565b600160a060020a0383166000908152602081905260409020546106339083610819565b600160a060020a0384166000908152602081905260409020556002546106599083610819565b6002555b5b505b5050565b60408051808201909152600381527f464c4e0000000000000000000000000000000000000000000000000000000000602082015281565b6a0a72ee17969ba12700000081565b60006006546106ba8142116106fc565b6106c48484610841565b91505b5b5092915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b80151561056357610000565b5b50565b600160a060020a03831660009081526020819052604081205482901080159061075c5750600160a060020a0380851660009081526001602090815260408083203390941683529290522054829010155b80156107815750600160a060020a038316600090815260208190526040902054828101115b1561080d57600160a060020a0380841660008181526020818152604080832080548801905588851680845281842080548990039055600183528184203390961684529482529182902080548790039055815186815291519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3506001610811565b5060005b5b9392505050565b60008282016108368482108015906108315750838210155b6106fc565b8091505b5092915050565b600160a060020a0333166000908152602081905260408120548290108015906108835750600160a060020a038316600090815260208190526040902054828101115b156108f557600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060016104d2565b5060006104d2565b5b929150505600a165627a7a723058201f50db0e2df13aeaaf01b3cd65286b3aadc078567971733dd07664b3b36ba9640029000000000000000000000000d3e74ac8ecb37649488e6c918452e04e51eccf1900000000000000000000000034dc53e22c406e667a0cb6da664f18a3593084090000000000000000000000000000000000000000000000000000000059b410000000000000000000000000000000000000000000000000000000000059fde400

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000d3e74ac8ecb37649488e6c918452e04e51eccf1900000000000000000000000034dc53e22c406e667a0cb6da664f18a3593084090000000000000000000000000000000000000000000000000000000059b410000000000000000000000000000000000000000000000000000000000059fde400

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000d3e74ac8ecb37649488e6c918452e04e51eccf19
Arg [1] : 00000000000000000000000034dc53e22c406e667a0cb6da664f18a359308409
Arg [2] : 0000000000000000000000000000000000000000000000000000000059b41000
Arg [3] : 0000000000000000000000000000000000000000000000000000000059fde400

Swarm Source

bzzr://1f50db0e2df13aeaaf01b3cd65286b3aadc078567971733dd07664b3b36ba964
Block Age Transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.