ETH Price: $3,134.86 (+1.09%)

Contract

0xf8Fc0cc97d01A47E0Ba66B167B120A8A0DeAb949
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer52924222018-03-21 1:21:052432 days ago1521595265IN
SmartIFT: Token Sale
0 ETH0.000073143
Transfer45589452017-11-15 19:09:372557 days ago1510772977IN
SmartIFT: Token Sale
0.1 ETH0.00044121
Close42748992017-09-15 0:41:212619 days ago1505436081IN
SmartIFT: Token Sale
0 ETH0.000944923
Transfer42747922017-09-14 23:57:502619 days ago1505433470IN
SmartIFT: Token Sale
30 ETH0.0006409915
Transfer42747922017-09-14 23:57:502619 days ago1505433470IN
SmartIFT: Token Sale
1.2 ETH0.0117149921
Transfer42747922017-09-14 23:57:502619 days ago1505433470IN
SmartIFT: Token Sale
0.5 ETH0.0010683225
Transfer42747892017-09-14 23:54:502619 days ago1505433290IN
SmartIFT: Token Sale
0.3 ETH0.0008973921
Transfer42747782017-09-14 23:51:182619 days ago1505433078IN
SmartIFT: Token Sale
0.24 ETH0.0116978821
Transfer42747732017-09-14 23:48:582619 days ago1505432938IN
SmartIFT: Token Sale
0.23 ETH0.0139056725
Transfer42747722017-09-14 23:48:372619 days ago1505432917IN
SmartIFT: Token Sale
130 ETH0.013885325
Transfer42747712017-09-14 23:48:262619 days ago1505432906IN
SmartIFT: Token Sale
25.01 ETH0.0008973921
Transfer42747662017-09-14 23:46:192619 days ago1505432779IN
SmartIFT: Token Sale
1 ETH0.002218384
Transfer42747602017-09-14 23:45:002619 days ago1505432700IN
SmartIFT: Token Sale
7.46 ETH0.0004273310
Transfer42747422017-09-14 23:38:442619 days ago1505432324IN
SmartIFT: Token Sale
0.9 ETH0.0010683225
Transfer42747412017-09-14 23:38:002619 days ago1505432280IN
SmartIFT: Token Sale
10 ETH0.0008973921
Transfer42747282017-09-14 23:33:482619 days ago1505432028IN
SmartIFT: Token Sale
0.29403137 ETH0.0117878821
Transfer42747272017-09-14 23:33:382619 days ago1505432018IN
SmartIFT: Token Sale
1.16460649 ETH0.0012569725
Transfer42747072017-09-14 23:26:382619 days ago1505431598IN
SmartIFT: Token Sale
10 ETH0.0007691918
Transfer42747042017-09-14 23:26:042619 days ago1505431564IN
SmartIFT: Token Sale
1.9 ETH0.0006409915
Transfer42746962017-09-14 23:23:252619 days ago1505431405IN
SmartIFT: Token Sale
1 ETH0.011612321
Transfer42746912017-09-14 23:21:172619 days ago1505431277IN
SmartIFT: Token Sale
10 ETH0.0110430420
Transfer42746852017-09-14 23:16:352619 days ago1505430995IN
SmartIFT: Token Sale
5.3 ETH0.0012819930
Transfer42746722017-09-14 23:11:592619 days ago1505430719IN
SmartIFT: Token Sale
0.5 ETH0.0014956535
Transfer42746702017-09-14 23:11:272619 days ago1505430687IN
SmartIFT: Token Sale
1 ETH0.0008973921
Transfer42746552017-09-14 23:06:182619 days ago1505430378IN
SmartIFT: Token Sale
2.24817097 ETH0.0117365421
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
42748992017-09-15 0:41:212619 days ago1505436081
SmartIFT: Token Sale
7,229.35 ETH
42747282017-09-14 23:33:482619 days ago1505432028
SmartIFT: Token Sale
0.00403137 ETH
42747272017-09-14 23:33:382619 days ago1505432018
SmartIFT: Token Sale
0.00460649 ETH
42746552017-09-14 23:06:182619 days ago1505430378
SmartIFT: Token Sale
0.00817097 ETH
42746092017-09-14 22:40:232619 days ago1505428823
SmartIFT: Token Sale
0.00436002 ETH
42746012017-09-14 22:36:222619 days ago1505428582
SmartIFT: Token Sale
0.00340046 ETH
42745942017-09-14 22:33:312619 days ago1505428411
SmartIFT: Token Sale
0.00206244 ETH
42745812017-09-14 22:28:292619 days ago1505428109
SmartIFT: Token Sale
0.00266466 ETH
42745462017-09-14 22:16:592619 days ago1505427419
SmartIFT: Token Sale
0.008 ETH
42745412017-09-14 22:14:392619 days ago1505427279
SmartIFT: Token Sale
0.004 ETH
42744952017-09-14 21:59:332619 days ago1505426373
SmartIFT: Token Sale
0.008 ETH
42744852017-09-14 21:55:472619 days ago1505426147
SmartIFT: Token Sale
0.00774081 ETH
42744132017-09-14 21:25:092619 days ago1505424309
SmartIFT: Token Sale
0.00758211 ETH
42742622017-09-14 20:25:542619 days ago1505420754
SmartIFT: Token Sale
0.0082468 ETH
42741782017-09-14 19:52:452619 days ago1505418765
SmartIFT: Token Sale
0.008 ETH
42741002017-09-14 19:22:502619 days ago1505416970
SmartIFT: Token Sale
0.00832536 ETH
42740212017-09-14 18:53:302619 days ago1505415210
SmartIFT: Token Sale
0.009 ETH
42739322017-09-14 18:12:392619 days ago1505412759
SmartIFT: Token Sale
0.002 ETH
42739162017-09-14 18:06:512619 days ago1505412411
SmartIFT: Token Sale
0.004 ETH
42739052017-09-14 18:02:492619 days ago1505412169
SmartIFT: Token Sale
0.001 ETH
42734982017-09-14 15:24:162619 days ago1505402656
SmartIFT: Token Sale
0.007159 ETH
42733902017-09-14 14:44:542619 days ago1505400294
SmartIFT: Token Sale
0.00836991 ETH
42729992017-09-14 12:03:552619 days ago1505390635
SmartIFT: Token Sale
0.00523792 ETH
42729882017-09-14 11:57:492619 days ago1505390269
SmartIFT: Token Sale
0.00116563 ETH
42729012017-09-14 11:21:362619 days ago1505388096
SmartIFT: Token Sale
0.0082 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
IcoPhaseManagement

Compiler Version
v0.4.11+commit.68ef5810

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2017-07-17
*/

pragma solidity ^0.4.11;

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
  function mul(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal constant returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

  function sub(uint256 a, uint256 b) internal constant returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  function add(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

/* The authentication manager details user accounts that have access to certain priviledges and keeps a permanent ledger of who has and has had these rights. */
contract AuthenticationManager {
    /* Map addresses to admins */
    mapping (address => bool) adminAddresses;

    /* Map addresses to account readers */
    mapping (address => bool) accountReaderAddresses;

    /* Details of all admins that have ever existed */
    address[] adminAudit;

    /* Details of all account readers that have ever existed */
    address[] accountReaderAudit;

    /* Fired whenever an admin is added to the contract. */
    event AdminAdded(address addedBy, address admin);

    /* Fired whenever an admin is removed from the contract. */
    event AdminRemoved(address removedBy, address admin);

    /* Fired whenever an account-reader contract is added. */
    event AccountReaderAdded(address addedBy, address account);

    /* Fired whenever an account-reader contract is removed. */
    event AccountReaderRemoved(address removedBy, address account);

    /* When this contract is first setup we use the creator as the first admin */    
    function AuthenticationManager() {
        /* Set the first admin to be the person creating the contract */
        adminAddresses[msg.sender] = true;
        AdminAdded(0, msg.sender);
        adminAudit.length++;
        adminAudit[adminAudit.length - 1] = msg.sender;
    }

    /* Gets the contract version for validation */
    function contractVersion() constant returns(uint256) {
        // Admin contract identifies as 100YYYYMMDDHHMM
        return 100201707171503;
    }

    /* Gets whether or not the specified address is currently an admin */
    function isCurrentAdmin(address _address) constant returns (bool) {
        return adminAddresses[_address];
    }

    /* Gets whether or not the specified address has ever been an admin */
    function isCurrentOrPastAdmin(address _address) constant returns (bool) {
        for (uint256 i = 0; i < adminAudit.length; i++)
            if (adminAudit[i] == _address)
                return true;
        return false;
    }

    /* Gets whether or not the specified address is currently an account reader */
    function isCurrentAccountReader(address _address) constant returns (bool) {
        return accountReaderAddresses[_address];
    }

    /* Gets whether or not the specified address has ever been an admin */
    function isCurrentOrPastAccountReader(address _address) constant returns (bool) {
        for (uint256 i = 0; i < accountReaderAudit.length; i++)
            if (accountReaderAudit[i] == _address)
                return true;
        return false;
    }

    /* Adds a user to our list of admins */
    function addAdmin(address _address) {
        /* Ensure we're an admin */
        if (!isCurrentAdmin(msg.sender))
            throw;

        // Fail if this account is already admin
        if (adminAddresses[_address])
            throw;
        
        // Add the user
        adminAddresses[_address] = true;
        AdminAdded(msg.sender, _address);
        adminAudit.length++;
        adminAudit[adminAudit.length - 1] = _address;
    }

    /* Removes a user from our list of admins but keeps them in the history audit */
    function removeAdmin(address _address) {
        /* Ensure we're an admin */
        if (!isCurrentAdmin(msg.sender))
            throw;

        /* Don't allow removal of self */
        if (_address == msg.sender)
            throw;

        // Fail if this account is already non-admin
        if (!adminAddresses[_address])
            throw;

        /* Remove this admin user */
        adminAddresses[_address] = false;
        AdminRemoved(msg.sender, _address);
    }

    /* Adds a user/contract to our list of account readers */
    function addAccountReader(address _address) {
        /* Ensure we're an admin */
        if (!isCurrentAdmin(msg.sender))
            throw;

        // Fail if this account is already in the list
        if (accountReaderAddresses[_address])
            throw;
        
        // Add the user
        accountReaderAddresses[_address] = true;
        AccountReaderAdded(msg.sender, _address);
        accountReaderAudit.length++;
        accountReaderAudit[adminAudit.length - 1] = _address;
    }

    /* Removes a user/contracts from our list of account readers but keeps them in the history audit */
    function removeAccountReader(address _address) {
        /* Ensure we're an admin */
        if (!isCurrentAdmin(msg.sender))
            throw;

        // Fail if this account is already not in the list
        if (!accountReaderAddresses[_address])
            throw;

        /* Remove this admin user */
        accountReaderAddresses[_address] = false;
        AccountReaderRemoved(msg.sender, _address);
    }
}

/* The SIFT itself is a simple extension of the ERC20 that allows for granting other SIFT contracts special rights to act on behalf of all transfers. */
contract SmartInvestmentFundToken {
    using SafeMath for uint256;

    /* Map all our our balances for issued tokens */
    mapping (address => uint256) balances;

    /* Map between users and their approval addresses and amounts */
    mapping(address => mapping (address => uint256)) allowed;

    /* List of all token holders */
    address[] allTokenHolders;

    /* The name of the contract */
    string public name;

    /* The symbol for the contract */
    string public symbol;

    /* How many DPs are in use in this contract */
    uint8 public decimals;

    /* Defines the current supply of the token in its own units */
    uint256 totalSupplyAmount = 0;

    /* Defines the address of the ICO contract which is the only contract permitted to mint tokens. */
    address public icoContractAddress;

    /* Defines whether or not the fund is closed. */
    bool public isClosed;

    /* Defines the contract handling the ICO phase. */
    IcoPhaseManagement icoPhaseManagement;

    /* Defines the admin contract we interface with for credentails. */
    AuthenticationManager authenticationManager;

    /* Fired when the fund is eventually closed. */
    event FundClosed();
    
    /* Our transfer event to fire whenever we shift SMRT around */
    event Transfer(address indexed from, address indexed to, uint256 value);
    
    /* Our approval event when one user approves another to control */
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);

    /* Create a new instance of this fund with links to other contracts that are required. */
    function SmartInvestmentFundToken(address _icoContractAddress, address _authenticationManagerAddress) {
        // Setup defaults
        name = "Smart Investment Fund Token";
        symbol = "SIFT";
        decimals = 0;

        /* Setup access to our other contracts and validate their versions */
        icoPhaseManagement = IcoPhaseManagement(_icoContractAddress);
        if (icoPhaseManagement.contractVersion() != 300201707171440)
            throw;
        authenticationManager = AuthenticationManager(_authenticationManagerAddress);
        if (authenticationManager.contractVersion() != 100201707171503)
            throw;
        
        /* Store our special addresses */
        icoContractAddress = _icoContractAddress;
    }

    modifier onlyPayloadSize(uint numwords) {
        assert(msg.data.length == numwords * 32 + 4);
        _;
    } 

    /* This modifier allows a method to only be called by account readers */
    modifier accountReaderOnly {
        if (!authenticationManager.isCurrentAccountReader(msg.sender)) throw;
        _;
    }

    modifier fundSendablePhase {
        // If it's in ICO phase, forbid it
        if (icoPhaseManagement.icoPhase())
            throw;

        // If it's abandoned, forbid it
        if (icoPhaseManagement.icoAbandoned())
            throw;

        // We're good, funds can now be transferred
        _;
    }

    /* Gets the contract version for validation */
    function contractVersion() constant returns(uint256) {
        /* SIFT contract identifies as 500YYYYMMDDHHMM */
        return 500201707171440;
    }
    
    /* Transfer funds between two addresses that are not the current msg.sender - this requires approval to have been set separately and follows standard ERC20 guidelines */
    function transferFrom(address _from, address _to, uint256 _amount) fundSendablePhase onlyPayloadSize(3) returns (bool) {
        if (balances[_from] >= _amount && allowed[_from][msg.sender] >= _amount && _amount > 0 && balances[_to].add(_amount) > balances[_to]) {
            bool isNew = balances[_to] == 0;
            balances[_from] = balances[_from].sub(_amount);
            allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount);
            balances[_to] = balances[_to].add(_amount);
            if (isNew)
                tokenOwnerAdd(_to);
            if (balances[_from] == 0)
                tokenOwnerRemove(_from);
            Transfer(_from, _to, _amount);
            return true;
        }
        return false;
    }

    /* Returns the total number of holders of this currency. */
    function tokenHolderCount() accountReaderOnly constant returns (uint256) {
        return allTokenHolders.length;
    }

    /* Gets the token holder at the specified index. */
    function tokenHolder(uint256 _index) accountReaderOnly constant returns (address) {
        return allTokenHolders[_index];
    }
 
    /* Adds an approval for the specified account to spend money of the message sender up to the defined limit */
    function approve(address _spender, uint256 _amount) fundSendablePhase onlyPayloadSize(2) returns (bool success) {
        allowed[msg.sender][_spender] = _amount;
        Approval(msg.sender, _spender, _amount);
        return true;
    }

    /* Gets the current allowance that has been approved for the specified spender of the owner address */
    function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
        return allowed[_owner][_spender];
    }

    /* Gets the total supply available of this token */
    function totalSupply() constant returns (uint256) {
        return totalSupplyAmount;
    }

    /* Gets the balance of a specified account */
    function balanceOf(address _owner) constant returns (uint256 balance) {
        return balances[_owner];
    }

    /* Transfer the balance from owner's account to another account */
    function transfer(address _to, uint256 _amount) fundSendablePhase onlyPayloadSize(2) returns (bool) {
        /* Check if sender has balance and for overflows */
        if (balances[msg.sender] < _amount || balances[_to].add(_amount) < balances[_to])
            return false;

        /* Do a check to see if they are new, if so we'll want to add it to our array */
        bool isRecipientNew = balances[_to] < 1;

        /* Add and subtract new balances */
        balances[msg.sender] = balances[msg.sender].sub(_amount);
        balances[_to] = balances[_to].add(_amount);

        /* Consolidate arrays if they are new or if sender now has empty balance */
        if (isRecipientNew)
            tokenOwnerAdd(_to);
        if (balances[msg.sender] < 1)
            tokenOwnerRemove(msg.sender);

        /* Fire notification event */
        Transfer(msg.sender, _to, _amount);
        return true;
    }

    /* If the specified address is not in our owner list, add them - this can be called by descendents to ensure the database is kept up to date. */
    function tokenOwnerAdd(address _addr) internal {
        /* First check if they already exist */
        uint256 tokenHolderCount = allTokenHolders.length;
        for (uint256 i = 0; i < tokenHolderCount; i++)
            if (allTokenHolders[i] == _addr)
                /* Already found so we can abort now */
                return;
        
        /* They don't seem to exist, so let's add them */
        allTokenHolders.length++;
        allTokenHolders[allTokenHolders.length - 1] = _addr;
    }

    /* If the specified address is in our owner list, remove them - this can be called by descendents to ensure the database is kept up to date. */
    function tokenOwnerRemove(address _addr) internal {
        /* Find out where in our array they are */
        uint256 tokenHolderCount = allTokenHolders.length;
        uint256 foundIndex = 0;
        bool found = false;
        uint256 i;
        for (i = 0; i < tokenHolderCount; i++)
            if (allTokenHolders[i] == _addr) {
                foundIndex = i;
                found = true;
                break;
            }
        
        /* If we didn't find them just return */
        if (!found)
            return;
        
        /* We now need to shuffle down the array */
        for (i = foundIndex; i < tokenHolderCount - 1; i++)
            allTokenHolders[i] = allTokenHolders[i + 1];
        allTokenHolders.length--;
    }

    /* Mint new tokens - this can only be done by special callers (i.e. the ICO management) during the ICO phase. */
    function mintTokens(address _address, uint256 _amount) onlyPayloadSize(2) {
        /* Ensure we are the ICO contract calling */
        if (msg.sender != icoContractAddress || !icoPhaseManagement.icoPhase())
            throw;

        /* Mint the tokens for the new address*/
        bool isNew = balances[_address] == 0;
        totalSupplyAmount = totalSupplyAmount.add(_amount);
        balances[_address] = balances[_address].add(_amount);
        if (isNew)
            tokenOwnerAdd(_address);
        Transfer(0, _address, _amount);
    }
}


/* The SIFT itself is a simple extension of the ERC20 that allows for granting other SIFT contracts special rights to act on behalf of all transfers. */

contract IcoPhaseManagement {
    using SafeMath for uint256;
    
    /* Defines whether or not we are in the ICO phase */
    bool public icoPhase = true;

    /* Defines whether or not the ICO has been abandoned */
    bool public icoAbandoned = false;

    /* Defines whether or not the SIFT contract address has yet been set.  */
    bool siftContractDefined = false;
    
    /* Defines the sale price during ICO */
    uint256 constant icoUnitPrice = 10 finney;

    /* If an ICO is abandoned and some withdrawals fail then this map allows people to request withdrawal of locked-in ether. */
    mapping(address => uint256) public abandonedIcoBalances;

    /* Defines our interface to the SIFT contract. */
    SmartInvestmentFundToken smartInvestmentFundToken;

    /* Defines the admin contract we interface with for credentails. */
    AuthenticationManager authenticationManager;

    /* Defines the time that the ICO starts. */
    uint256 constant public icoStartTime = 1501545600; // August 1st 2017 at 00:00:00 UTC

    /* Defines the time that the ICO ends. */
    uint256 constant public icoEndTime = 1505433600; // September 15th 2017 at 00:00:00 UTC

    /* Defines our event fired when the ICO is closed */
    event IcoClosed();

    /* Defines our event fired if the ICO is abandoned */
    event IcoAbandoned(string details);
    
    /* Ensures that once the ICO is over this contract cannot be used until the point it is destructed. */
    modifier onlyDuringIco {
        bool contractValid = siftContractDefined && !smartInvestmentFundToken.isClosed();
        if (!contractValid || (!icoPhase && !icoAbandoned)) throw;
        _;
    }

    /* This modifier allows a method to only be called by current admins */
    modifier adminOnly {
        if (!authenticationManager.isCurrentAdmin(msg.sender)) throw;
        _;
    }

    /* Create the ICO phase managerment and define the address of the main SIFT contract. */
    function IcoPhaseManagement(address _authenticationManagerAddress) {
        /* A basic sanity check */
        if (icoStartTime >= icoEndTime)
            throw;

        /* Setup access to our other contracts and validate their versions */
        authenticationManager = AuthenticationManager(_authenticationManagerAddress);
        if (authenticationManager.contractVersion() != 100201707171503)
            throw;
    }

    /* Set the SIFT contract address as a one-time operation.  This happens after all the contracts are created and no
       other functionality can be used until this is set. */
    function setSiftContractAddress(address _siftContractAddress) adminOnly {
        /* This can only happen once in the lifetime of this contract */
        if (siftContractDefined)
            throw;

        /* Setup access to our other contracts and validate their versions */
        smartInvestmentFundToken = SmartInvestmentFundToken(_siftContractAddress);
        if (smartInvestmentFundToken.contractVersion() != 500201707171440)
            throw;
        siftContractDefined = true;
    }

    /* Gets the contract version for validation */
    function contractVersion() constant returns(uint256) {
        /* ICO contract identifies as 300YYYYMMDDHHMM */
        return 300201707171440;
    }

    /* Close the ICO phase and transition to execution phase */
    function close() adminOnly onlyDuringIco {
        // Forbid closing contract before the end of ICO
        if (now <= icoEndTime)
            throw;

        // Close the ICO
        icoPhase = false;
        IcoClosed();

        // Withdraw funds to the caller
        if (!msg.sender.send(this.balance))
            throw;
    }
    
    /* Handle receiving ether in ICO phase - we work out how much the user has bought, allocate a suitable balance and send their change */
    function () onlyDuringIco payable {
        // Forbid funding outside of ICO
        if (now < icoStartTime || now > icoEndTime)
            throw;

        /* Determine how much they've actually purhcased and any ether change */
        uint256 tokensPurchased = msg.value / icoUnitPrice;
        uint256 purchaseTotalPrice = tokensPurchased * icoUnitPrice;
        uint256 change = msg.value.sub(purchaseTotalPrice);

        /* Increase their new balance if they actually purchased any */
        if (tokensPurchased > 0)
            smartInvestmentFundToken.mintTokens(msg.sender, tokensPurchased);

        /* Send change back to recipient */
        if (change > 0 && !msg.sender.send(change))
            throw;
    }

    /* Abandons the ICO and returns funds to shareholders.  Any failed funds can be separately withdrawn once the ICO is abandoned. */
    function abandon(string details) adminOnly onlyDuringIco {
        // Forbid closing contract before the end of ICO
        if (now <= icoEndTime)
            throw;

        /* If already abandoned throw an error */
        if (icoAbandoned)
            throw;

        /* Work out a refund per share per share */
        uint256 paymentPerShare = this.balance / smartInvestmentFundToken.totalSupply();

        /* Enum all accounts and send them refund */
        uint numberTokenHolders = smartInvestmentFundToken.tokenHolderCount();
        uint256 totalAbandoned = 0;
        for (uint256 i = 0; i < numberTokenHolders; i++) {
            /* Calculate how much goes to this shareholder */
            address addr = smartInvestmentFundToken.tokenHolder(i);
            uint256 etherToSend = paymentPerShare * smartInvestmentFundToken.balanceOf(addr);
            if (etherToSend < 1)
                continue;

            /* Allocate appropriate amount of fund to them */
            abandonedIcoBalances[addr] = abandonedIcoBalances[addr].add(etherToSend);
            totalAbandoned = totalAbandoned.add(etherToSend);
        }

        /* Audit the abandonment */
        icoAbandoned = true;
        IcoAbandoned(details);

        // There should be no money left, but withdraw just incase for manual resolution
        uint256 remainder = this.balance.sub(totalAbandoned);
        if (remainder > 0)
            if (!msg.sender.send(remainder))
                // Add this to the callers balance for emergency refunds
                abandonedIcoBalances[msg.sender] = abandonedIcoBalances[msg.sender].add(remainder);
    }

    /* Allows people to withdraw funds that failed to send during the abandonment of the ICO for any reason. */
    function abandonedFundWithdrawal() {
        // This functionality only exists if an ICO was abandoned
        if (!icoAbandoned || abandonedIcoBalances[msg.sender] == 0)
            throw;
        
        // Attempt to send them to funds
        uint256 funds = abandonedIcoBalances[msg.sender];
        abandonedIcoBalances[msg.sender] = 0;
        if (!msg.sender.send(funds))
            throw;
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[],"name":"abandonedFundWithdrawal","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"close","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_siftContractAddress","type":"address"}],"name":"setSiftContractAddress","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"icoPhase","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"icoEndTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"contractVersion","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"icoStartTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"icoAbandoned","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"abandonedIcoBalances","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"details","type":"string"}],"name":"abandon","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"_authenticationManagerAddress","type":"address"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[],"name":"IcoClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"details","type":"string"}],"name":"IcoAbandoned","type":"event"}]

60606040526000805462ffff001960ff19909116600117169055341561002157fe5b604051602080610eb983398101604052515b5b60038054600160a060020a031916600160a060020a038381169190911791829055604080516000602091820181905282517fa0a8e4600000000000000000000000000000000000000000000000000000000081529251949093169363a0a8e460936004808501948390030190829087803b15156100ad57fe5b6102c65a03f115156100bb57fe5b505060405151655b2207296eaf1490506100d55760006000fd5b5b505b610dd2806100e76000396000f300606060405236156100a15763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166335213a69811461028857806343d726d61461029a57806343e1eb82146102ac57806368955fb1146102ca5780637e1055b6146102ee578063a0a8e46014610310578063a7c3d71b14610332578063c2f0d93f14610354578063c6cbd5f014610378578063ce1c93af146103a6575b6102865b6000600060006000600060029054906101000a900460ff1680156101405750600254604080516000602091820181905282517fc2b6b58c0000000000000000000000000000000000000000000000000000000081529251600160a060020a039094169363c2b6b58c9360048082019493918390030190829087803b151561012857fe5b6102c65a03f1151561013657fe5b5050604051511590505b9050801580610165575060005460ff161580156101655750600054610100900460ff16155b5b156101715760006000fd5b63597fc48042108061018657506359bb180042115b156101915760006000fd5b662386f26fc10000345b049350662386f26fc10000840292506101ba348463ffffffff6103fe16565b9150600084111561024157600254604080517ff0dda65c000000000000000000000000000000000000000000000000000000008152600160a060020a033381166004830152602482018890529151919092169163f0dda65c91604480830192600092919082900301818387803b151561022f57fe5b6102c65a03f1151561023d57fe5b5050505b6000821180156102735750604051600160a060020a0333169083156108fc029084906000818181858888f19350505050155b1561027e5760006000fd5b5b5b50505050565b005b341561029057fe5b610286610415565b005b34156102a257fe5b610286610498565b005b34156102b457fe5b610286600160a060020a0360043516610666565b005b34156102d257fe5b6102da6107d2565b604080519115158252519081900360200190f35b34156102f657fe5b6102fe6107db565b60408051918252519081900360200190f35b341561031857fe5b6102fe6107e3565b60408051918252519081900360200190f35b341561033a57fe5b6102fe6107ef565b60408051918252519081900360200190f35b341561035c57fe5b6102da6107f7565b604080519115158252519081900360200190f35b341561038057fe5b6102fe600160a060020a0360043516610805565b60408051918252519081900360200190f35b34156103ae57fe5b610286600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375094965061081795505050505050565b005b60008282111561040a57fe5b508082035b92915050565b60008054610100900460ff1615806104435750600160a060020a033316600090815260016020526040902054155b1561044e5760006000fd5b50600160a060020a033316600081815260016020526040808220805490839055905190929183156108fc02918491818181858888f1935050505015156104945760006000fd5b5b50565b600354604080516000602091820181905282517fbbb896ad000000000000000000000000000000000000000000000000000000008152600160a060020a0333811660048301529351939094169363bbb896ad936024808301949391928390030190829087803b151561050657fe5b6102c65a03f1151561051457fe5b505060405151151590506105285760006000fd5b6000805462010000900460ff1680156105b85750600254604080516000602091820181905282517fc2b6b58c0000000000000000000000000000000000000000000000000000000081529251600160a060020a039094169363c2b6b58c9360048082019493918390030190829087803b15156105a057fe5b6102c65a03f115156105ae57fe5b5050604051511590505b90508015806105dd575060005460ff161580156105dd5750600054610100900460ff16155b5b156105e95760006000fd5b6359bb180042116105fa5760006000fd5b6000805460ff191681556040517f5e04d124c56129382e672952415fc39c773434a5bf8eba7f572a7672e76fe4439190a1604051600160a060020a0333811691309091163180156108fc02916000818181858888f1935050505015156104945760006000fd5b5b5b505b565b600354604080516000602091820181905282517fbbb896ad000000000000000000000000000000000000000000000000000000008152600160a060020a0333811660048301529351939094169363bbb896ad936024808301949391928390030190829087803b15156106d457fe5b6102c65a03f115156106e257fe5b505060405151151590506106f65760006000fd5b60005462010000900460ff161561070d5760006000fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080516000602091820181905282517fa0a8e4600000000000000000000000000000000000000000000000000000000081529251949093169363a0a8e460936004808501948390030190829087803b151561079357fe5b6102c65a03f115156107a157fe5b5050604051516601c6ee49126e701490506107bc5760006000fd5b6000805462ff00001916620100001790555b5b50565b60005460ff1681565b6359bb180081565b66011108281dee705b90565b63597fc48081565b600054610100900460ff1681565b60016020526000908152604090205481565b600354604080516000602091820181905282517fbbb896ad000000000000000000000000000000000000000000000000000000008152600160a060020a03338116600483015293519194859485948594859485948594169263bbb896ad9260248084019382900301818787803b151561088c57fe5b6102c65a03f1151561089a57fe5b505060405151151590506108ae5760006000fd5b6000805462010000900460ff16801561093e5750600254604080516000602091820181905282517fc2b6b58c0000000000000000000000000000000000000000000000000000000081529251600160a060020a039094169363c2b6b58c9360048082019493918390030190829087803b151561092657fe5b6102c65a03f1151561093457fe5b5050604051511590505b9050801580610963575060005460ff161580156109635750600054610100900460ff16155b5b1561096f5760006000fd5b6359bb180042116109805760006000fd5b600054610100900460ff16156109965760006000fd5b600254604080516000602091820181905282517f18160ddd0000000000000000000000000000000000000000000000000000000081529251600160a060020a03909416936318160ddd9360048082019493918390030190829087803b15156109fa57fe5b6102c65a03f11515610a0857fe5b5050604051519050600160a060020a03301631811515610a2457fe5b049750600260009054906101000a9004600160a060020a0316600160a060020a031663d13e58466000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401809050602060405180830381600087803b1515610a9b57fe5b6102c65a03f11515610aa957fe5b505060405151975060009650869550505b86851015610c3857600254604080516000602091820181905282517f862a4bf2000000000000000000000000000000000000000000000000000000008152600481018a90529251600160a060020a039094169363862a4bf29360248082019493918390030190829087803b1515610b2d57fe5b6102c65a03f11515610b3b57fe5b50506040805180516002546000602093840181905284517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a0380851660048301529551939a509490911694506370a08231936024808201949392918390030190829087803b1515610bb157fe5b6102c65a03f11515610bbf57fe5b50506040515189029350506001831015610bd857610c2d565b600160a060020a038416600090815260016020526040902054610c01908463ffffffff610d8c16565b600160a060020a038516600090815260016020526040902055610c2a868463ffffffff610d8c16565b95505b600190940193610aba565b6000805461ff0019166101001790556040805160208082528b51818301528b517f9166b10ac45c5649d97c0d46ba2c919bd0e4b263909c07c707dab4f1ded2b4d3938d9392839291830191908501908083838215610cb1575b805182526020831115610cb157601f199092019160209182019101610c91565b505050905090810190601f168015610cdd5780820380516001836020036101000a031916815260200191505b509250505060405180910390a1610d04600160a060020a033016318763ffffffff6103fe16565b91506000821115610d7d57604051600160a060020a0333169083156108fc029084906000818181858888f193505050501515610d7d57600160a060020a033316600090815260016020526040902054610d63908363ffffffff610d8c16565b600160a060020a0333166000908152600160205260409020555b5b5b5b505b5050505050505050565b600082820183811015610d9b57fe5b8091505b50929150505600a165627a7a723058202d9f1d52861e18d917197915bcd37099d521cab864770053331a6cfc51d0f2200029000000000000000000000000c6a3746aa3fec176559f0865fd5240159402a81f

Deployed Bytecode

0x606060405236156100a15763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166335213a69811461028857806343d726d61461029a57806343e1eb82146102ac57806368955fb1146102ca5780637e1055b6146102ee578063a0a8e46014610310578063a7c3d71b14610332578063c2f0d93f14610354578063c6cbd5f014610378578063ce1c93af146103a6575b6102865b6000600060006000600060029054906101000a900460ff1680156101405750600254604080516000602091820181905282517fc2b6b58c0000000000000000000000000000000000000000000000000000000081529251600160a060020a039094169363c2b6b58c9360048082019493918390030190829087803b151561012857fe5b6102c65a03f1151561013657fe5b5050604051511590505b9050801580610165575060005460ff161580156101655750600054610100900460ff16155b5b156101715760006000fd5b63597fc48042108061018657506359bb180042115b156101915760006000fd5b662386f26fc10000345b049350662386f26fc10000840292506101ba348463ffffffff6103fe16565b9150600084111561024157600254604080517ff0dda65c000000000000000000000000000000000000000000000000000000008152600160a060020a033381166004830152602482018890529151919092169163f0dda65c91604480830192600092919082900301818387803b151561022f57fe5b6102c65a03f1151561023d57fe5b5050505b6000821180156102735750604051600160a060020a0333169083156108fc029084906000818181858888f19350505050155b1561027e5760006000fd5b5b5b50505050565b005b341561029057fe5b610286610415565b005b34156102a257fe5b610286610498565b005b34156102b457fe5b610286600160a060020a0360043516610666565b005b34156102d257fe5b6102da6107d2565b604080519115158252519081900360200190f35b34156102f657fe5b6102fe6107db565b60408051918252519081900360200190f35b341561031857fe5b6102fe6107e3565b60408051918252519081900360200190f35b341561033a57fe5b6102fe6107ef565b60408051918252519081900360200190f35b341561035c57fe5b6102da6107f7565b604080519115158252519081900360200190f35b341561038057fe5b6102fe600160a060020a0360043516610805565b60408051918252519081900360200190f35b34156103ae57fe5b610286600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375094965061081795505050505050565b005b60008282111561040a57fe5b508082035b92915050565b60008054610100900460ff1615806104435750600160a060020a033316600090815260016020526040902054155b1561044e5760006000fd5b50600160a060020a033316600081815260016020526040808220805490839055905190929183156108fc02918491818181858888f1935050505015156104945760006000fd5b5b50565b600354604080516000602091820181905282517fbbb896ad000000000000000000000000000000000000000000000000000000008152600160a060020a0333811660048301529351939094169363bbb896ad936024808301949391928390030190829087803b151561050657fe5b6102c65a03f1151561051457fe5b505060405151151590506105285760006000fd5b6000805462010000900460ff1680156105b85750600254604080516000602091820181905282517fc2b6b58c0000000000000000000000000000000000000000000000000000000081529251600160a060020a039094169363c2b6b58c9360048082019493918390030190829087803b15156105a057fe5b6102c65a03f115156105ae57fe5b5050604051511590505b90508015806105dd575060005460ff161580156105dd5750600054610100900460ff16155b5b156105e95760006000fd5b6359bb180042116105fa5760006000fd5b6000805460ff191681556040517f5e04d124c56129382e672952415fc39c773434a5bf8eba7f572a7672e76fe4439190a1604051600160a060020a0333811691309091163180156108fc02916000818181858888f1935050505015156104945760006000fd5b5b5b505b565b600354604080516000602091820181905282517fbbb896ad000000000000000000000000000000000000000000000000000000008152600160a060020a0333811660048301529351939094169363bbb896ad936024808301949391928390030190829087803b15156106d457fe5b6102c65a03f115156106e257fe5b505060405151151590506106f65760006000fd5b60005462010000900460ff161561070d5760006000fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080516000602091820181905282517fa0a8e4600000000000000000000000000000000000000000000000000000000081529251949093169363a0a8e460936004808501948390030190829087803b151561079357fe5b6102c65a03f115156107a157fe5b5050604051516601c6ee49126e701490506107bc5760006000fd5b6000805462ff00001916620100001790555b5b50565b60005460ff1681565b6359bb180081565b66011108281dee705b90565b63597fc48081565b600054610100900460ff1681565b60016020526000908152604090205481565b600354604080516000602091820181905282517fbbb896ad000000000000000000000000000000000000000000000000000000008152600160a060020a03338116600483015293519194859485948594859485948594169263bbb896ad9260248084019382900301818787803b151561088c57fe5b6102c65a03f1151561089a57fe5b505060405151151590506108ae5760006000fd5b6000805462010000900460ff16801561093e5750600254604080516000602091820181905282517fc2b6b58c0000000000000000000000000000000000000000000000000000000081529251600160a060020a039094169363c2b6b58c9360048082019493918390030190829087803b151561092657fe5b6102c65a03f1151561093457fe5b5050604051511590505b9050801580610963575060005460ff161580156109635750600054610100900460ff16155b5b1561096f5760006000fd5b6359bb180042116109805760006000fd5b600054610100900460ff16156109965760006000fd5b600254604080516000602091820181905282517f18160ddd0000000000000000000000000000000000000000000000000000000081529251600160a060020a03909416936318160ddd9360048082019493918390030190829087803b15156109fa57fe5b6102c65a03f11515610a0857fe5b5050604051519050600160a060020a03301631811515610a2457fe5b049750600260009054906101000a9004600160a060020a0316600160a060020a031663d13e58466000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401809050602060405180830381600087803b1515610a9b57fe5b6102c65a03f11515610aa957fe5b505060405151975060009650869550505b86851015610c3857600254604080516000602091820181905282517f862a4bf2000000000000000000000000000000000000000000000000000000008152600481018a90529251600160a060020a039094169363862a4bf29360248082019493918390030190829087803b1515610b2d57fe5b6102c65a03f11515610b3b57fe5b50506040805180516002546000602093840181905284517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a0380851660048301529551939a509490911694506370a08231936024808201949392918390030190829087803b1515610bb157fe5b6102c65a03f11515610bbf57fe5b50506040515189029350506001831015610bd857610c2d565b600160a060020a038416600090815260016020526040902054610c01908463ffffffff610d8c16565b600160a060020a038516600090815260016020526040902055610c2a868463ffffffff610d8c16565b95505b600190940193610aba565b6000805461ff0019166101001790556040805160208082528b51818301528b517f9166b10ac45c5649d97c0d46ba2c919bd0e4b263909c07c707dab4f1ded2b4d3938d9392839291830191908501908083838215610cb1575b805182526020831115610cb157601f199092019160209182019101610c91565b505050905090810190601f168015610cdd5780820380516001836020036101000a031916815260200191505b509250505060405180910390a1610d04600160a060020a033016318763ffffffff6103fe16565b91506000821115610d7d57604051600160a060020a0333169083156108fc029084906000818181858888f193505050501515610d7d57600160a060020a033316600090815260016020526040902054610d63908363ffffffff610d8c16565b600160a060020a0333166000908152600160205260409020555b5b5b5b505b5050505050505050565b600082820183811015610d9b57fe5b8091505b50929150505600a165627a7a723058202d9f1d52861e18d917197915bcd37099d521cab864770053331a6cfc51d0f2200029

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

000000000000000000000000c6a3746aa3fec176559f0865fd5240159402a81f

-----Decoded View---------------
Arg [0] : _authenticationManagerAddress (address): 0xc6a3746Aa3fec176559f0865Fd5240159402A81f

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c6a3746aa3fec176559f0865fd5240159402a81f


Swarm Source

bzzr://2d9f1d52861e18d917197915bcd37099d521cab864770053331a6cfc51d0f220

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.