ETH Price: $1,587.46 (+6.79%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Disburse22202222016-09-08 7:24:303136 days ago1473319470IN
0x687a2414...0B74C8b3C
0 ETH0.0016324522.68998208
Deposit22202152016-09-08 7:21:393136 days ago1473319299IN
0x687a2414...0B74C8b3C
10 ETH0.0407169220
Deposit22202152016-09-08 7:21:393136 days ago1473319299IN
0x687a2414...0B74C8b3C
10 ETH0.0450084220
Deposit22202142016-09-08 7:21:313136 days ago1473319291IN
0x687a2414...0B74C8b3C
10 ETH0.0450007420
Deposit22202142016-09-08 7:21:313136 days ago1473319291IN
0x687a2414...0B74C8b3C
10 ETH0.0450071420
Deposit22202132016-09-08 7:21:213136 days ago1473319281IN
0x687a2414...0B74C8b3C
10 ETH0.045003320
Deposit22202092016-09-08 7:20:253136 days ago1473319225IN
0x687a2414...0B74C8b3C
1 ETH0.0058963620

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer24431952016-10-15 6:13:323099 days ago1476512012
0x687a2414...0B74C8b3C
0 ETH
Transfer24410012016-10-14 21:36:043099 days ago1476480964
0x687a2414...0B74C8b3C
0 ETH
Transfer24409922016-10-14 21:34:283099 days ago1476480868
0x687a2414...0B74C8b3C
0 ETH
Transfer24409852016-10-14 21:32:573099 days ago1476480777
0x687a2414...0B74C8b3C
0 ETH
Transfer24391922016-10-14 14:39:123099 days ago1476455952
0x687a2414...0B74C8b3C
0 ETH
Transfer24387942016-10-14 12:50:503100 days ago1476449450
0x687a2414...0B74C8b3C
0 ETH
Transfer24387722016-10-14 12:45:063100 days ago1476449106
0x687a2414...0B74C8b3C
0 ETH
Transfer24385272016-10-14 11:42:333100 days ago1476445353
0x687a2414...0B74C8b3C
0 ETH
Transfer24385272016-10-14 11:42:333100 days ago1476445353
0x687a2414...0B74C8b3C
0 ETH
Transfer24384732016-10-14 11:27:153100 days ago1476444435
0x687a2414...0B74C8b3C
0 ETH
Transfer24384652016-10-14 11:24:343100 days ago1476444274
0x687a2414...0B74C8b3C
0 ETH
Transfer24384592016-10-14 11:22:493100 days ago1476444169
0x687a2414...0B74C8b3C
0 ETH
Transfer24384382016-10-14 11:18:023100 days ago1476443882
0x687a2414...0B74C8b3C
0 ETH
Transfer24384182016-10-14 11:13:043100 days ago1476443584
0x687a2414...0B74C8b3C
0 ETH
Transfer24384112016-10-14 11:12:073100 days ago1476443527
0x687a2414...0B74C8b3C
0 ETH
Transfer24383882016-10-14 11:07:593100 days ago1476443279
0x687a2414...0B74C8b3C
0 ETH
Transfer24383832016-10-14 11:06:363100 days ago1476443196
0x687a2414...0B74C8b3C
0 ETH
Transfer24382852016-10-14 10:43:453100 days ago1476441825
0x687a2414...0B74C8b3C
0 ETH
Transfer24382742016-10-14 10:41:363100 days ago1476441696
0x687a2414...0B74C8b3C
0 ETH
Transfer24382632016-10-14 10:39:103100 days ago1476441550
0x687a2414...0B74C8b3C
0 ETH
Transfer24382562016-10-14 10:37:583100 days ago1476441478
0x687a2414...0B74C8b3C
0 ETH
Transfer24382382016-10-14 10:33:223100 days ago1476441202
0x687a2414...0B74C8b3C
0 ETH
Transfer24382302016-10-14 10:31:013100 days ago1476441061
0x687a2414...0B74C8b3C
0 ETH
Transfer24382242016-10-14 10:30:033100 days ago1476441003
0x687a2414...0B74C8b3C
0 ETH
Transfer24382192016-10-14 10:28:333100 days ago1476440913
0x687a2414...0B74C8b3C
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DepositHolder

Compiler Version
v0.3.6-2016-09-06-114502f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2016-09-08
*/

pragma solidity ^0.3.5;

contract DepositHolder {
    uint constant GUARANTEE_PERIOD = 365 days;
    
    event Claim(address addr, uint amount);
    
    struct Entry {
        bytes16 next;
        uint64 deposit;
        uint64 expires;
    }

    address owner;
    address auditor;
    
    mapping(bytes16=>Entry) entries;
    bytes16 oldestHash;
    bytes16 newestHash;
    
    uint public paidOut;
    uint public totalPaidOut;
    uint public depositCount;
    
    function DepositHolder() {
        owner = msg.sender;
        auditor = owner;
    }
    
    modifier owner_only {
        if(msg.sender != owner) throw;
        _;
    }
    
    modifier auditor_only {
        if(msg.sender != auditor) throw;
        _;
    }

    /**
     * @dev Lodge deposits for a set of address hashes. Automatically uses
     *      expired deposits to pay for new ones.
     * @param values A list of hashes of addresses to place deposits for.
     *        Each value is the first 16 bytes of the keccak-256 hash of the
     *        address the deposit is for.
     * @param deposit The amount of the deposit on each address.
     */
    function deposit(bytes16[] values, uint64 deposit) owner_only {
        uint required = values.length * deposit;
        if(msg.value < required) {
            throw;
        } else if(msg.value > required) {
            if(!msg.sender.send(msg.value - required))
                throw;
        }

        extend(values, uint64(deposit));
    }

    function extend(bytes16[] values, uint64 deposit) private {
        uint64 expires = uint64(now + GUARANTEE_PERIOD);

        if(oldestHash == 0) {
            oldestHash = values[0];
            newestHash = values[0];
        } else {
            entries[newestHash].next = values[0];
        }
        
        for(uint i = 0; i < values.length - 1; i++) {
            if(entries[values[i]].expires != 0)
                throw;
            entries[values[i]] = Entry(values[i + 1], deposit, expires);
        }
        
        newestHash = values[values.length - 1];
        if(entries[newestHash].expires != 0)
            throw;
        entries[newestHash] = Entry(0, deposit, expires);
        
        depositCount += values.length;
    }

    /**
     * @dev Withdraw funds held for expired deposits.
     * @param max Maximum number of deposits to claim.
     */
    function withdraw(uint max) owner_only {
        uint recovered = recover(max);
        if(!msg.sender.send(recovered))
            throw;
    }

    function recover(uint max) private returns(uint recovered) {
        // Iterate through entries deleting them, until we find one
        // that's new enough, or hit the limit.
        bytes16 ptr = oldestHash;
        uint count;
        for(uint i = 0; i < max && ptr != 0 && entries[ptr].expires < now; i++) {
            recovered += entries[ptr].deposit;
            ptr = entries[ptr].next;
            count += 1;
        }

        oldestHash = ptr;
        if(oldestHash == 0)
            newestHash = 0;
        
        // Deduct any outstanding payouts from the recovered funds
        if(paidOut > 0) {
            if(recovered > paidOut) {
                recovered -= paidOut;
                paidOut = 0;
            } else {
                paidOut -= recovered;
                recovered = 0;
            }
        }
        
        depositCount -= count;
    }

    /**
     * @dev Fetches information on a future withdrawal event
     * @param hash The point at which to start scanning; 0 for the first event.
     * @return when Unix timestamp at which a withdrawal can next happen.
     * @return count Number of addresses expiring at this time
     * @return value Total amount withdrawable at this time
     * @return next Hash of the start of the next withdrawal event, if any.
     */
    function nextWithdrawal(bytes16 hash) constant returns(uint when, uint count, uint value, bytes16 next) {
        if(hash == 0) {
            hash = oldestHash;
        }
        next = hash;
        when = entries[hash].expires;
        while(next != 0 && entries[next].expires == when) {
            count += 1;
            value += entries[next].deposit;
            next = entries[next].next;
        }
    }

    /**
     * @dev Checks if a deposit is held for the provided address.
     * @param addr The address to check.
     * @return expires The unix timestamp at which the deposit on this address
     *         expires, or 0 if there is no deposit.
     * @return deposit The amount deposited against this address.
     */
    function check(address addr) constant returns (uint expires, uint deposit) {
        Entry storage entry = entries[bytes16(sha3(addr))];
        expires = entry.expires;
        deposit = entry.deposit;
    }
    
    /**
     * @dev Pays out a claim.
     * @param addr The address to pay.
     * @param amount The amount to send.
     */
    function disburse(address addr, uint amount) auditor_only {
        paidOut += amount;
        totalPaidOut += amount;
        Claim(addr, amount);
        if(!addr.send(amount))
            throw;
    }
    
    /**
     * @dev Deletes the contract, if no deposits are held.
     */
    function destroy() owner_only {
        if(depositCount > 0)
            throw;
        selfdestruct(msg.sender);
    }
}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[],"name":"totalPaidOut","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"depositCount","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"max","type":"uint256"}],"name":"withdraw","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"paidOut","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"},{"name":"amount","type":"uint256"}],"name":"disburse","outputs":[],"type":"function"},{"constant":false,"inputs":[],"name":"destroy","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"hash","type":"bytes16"}],"name":"nextWithdrawal","outputs":[{"name":"when","type":"uint256"},{"name":"count","type":"uint256"},{"name":"value","type":"uint256"},{"name":"next","type":"bytes16"}],"type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"check","outputs":[{"name":"expires","type":"uint256"},{"name":"deposit","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"values","type":"bytes16[]"},{"name":"deposit","type":"uint64"}],"name":"deposit","outputs":[],"type":"function"},{"inputs":[],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Claim","type":"event"}]

606060405260008054600160a060020a0319908116331780835560018054909216600160a060020a0390911617905561088d90819061003d90396000f3606060405236156100775760e060020a60003504631357e1dc811461007c5780632dfdf0b5146100855780632e1a7d4d1461008e5780635c76ca2d146100b15780637f3bd56e146100ba57806383197ef0146100df578063b3a2a999146100fe578063c23697a8146101dc578063c5b1a53c14610256575b610002565b6102b460055481565b6102b460065481565b6102c660043560008054600160a060020a0390811633909116146102f857610002565b6102b460045481565b6102c6600435602435600154600160a060020a0390811633909116146103d357610002565b6102c6600054600160a060020a03908116339091161461045257610002565b6102c860043560008080806001608060020a0319851681141561012757600354608060020a0294505b506001608060020a0319841660009081526002602052604090205460c060020a900467ffffffffffffffff169250835b6001608060020a0319811660001480159061019b57506001608060020a0319811660009081526002602052604090205460c060020a900467ffffffffffffffff1684145b1561046f576001608060020a03191660009081526002602052604090205460019290920191608060020a80820467ffffffffffffffff169092019102610157565b60408051600160a060020a03600435166c0100000000000000000000000002815281516014918190039190910190206001608060020a03191660009081526002602052205460c060020a810467ffffffffffffffff90811691608060020a9004166040805192835260208301919091528051918290030190f35b604080516020600480358082013583810285810185019096528085526102c695929460249490939285019282918501908490808284375094965050933593505050506000805433600160a060020a0390811691161461047657610002565b60408051918252519081900360200190f35b005b604080519485526020850193909352838301919091526001608060020a0319166060830152519081900360800190f35b6103a182600354600090608060020a0281805b848110801561032557506001608060020a03198316600014155b801561035c5750604060009081206001608060020a031985169091526002602052544260c060020a90910467ffffffffffffffff16105b15610573576001608060020a031992909216600090815260026020526040902054608060020a80820467ffffffffffffffff169094019302916001918201910161030b565b60405190915033600160a060020a031690600090839082818181858883f1935050505015156103cf57610002565b5050565b6004805482019055600580548201905560408051600160a060020a03841681526020810183905281517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4929181900390910190a1604051600160a060020a03831690600090839082818181858883f1935050505015156103cf57610002565b600654600090111561046357610002565b33600160a060020a0316ff5b9193509193565b8167ffffffffffffffff1683510290508034101561049357610002565b803411156104c95760405133600160a060020a031690600090348490039082818181858883f1935050505015156104c957610002565b61056e8383600354426301e1338001906000906001608060020a0319608060020a909102168114156106125783600081518110156100025790602001906020020151600360006101000a8154816001608060020a030219169083608060020a9004021790555083600081518110156100025790602001906020020151600360106101000a8154816001608060020a030219169083608060020a90040217905550610656565b505050565b60038054608060020a8086046001608060020a031992831617928390559190910216600014156105ca576000608060020a02600360106101000a8154816001608060020a030219169083608060020a900402179055505b6004546000901115610601576004548411156105f25760048054600090915590930392610601565b60048054949094039093556000925b600680548390039055505050919050565b836000815181101561000257602091820151600354608060020a9081900481026001608060020a031990811684526002909452604090922080549093169190041790555b5060005b60018451038110156106b95760026000506000858381518110156100025760209081029091018101516001608060020a031916825281019190915260400160009081205460c060020a900467ffffffffffffffff161461072b57610002565b836001855103815181101561000257602090810290910181015160038054608060020a9283900483026001608060020a03919091161790819055819004026001608060020a03191660009081526002909152604081205460c060020a900467ffffffffffffffff16146107f557610002565b60606040519081016040528085836001018151811015610002579060200190602002015181526020018481526020018381526020015060026000506000868481518110156100025760209081029091018101516001608060020a031990811683528282019390935260409182016000208451815492860151959093015160c060020a02608060020a95860295909304919093161777ffffffffffffffff00000000000000000000000000000000191692909217600160c060020a031691909117905560010161065a565b506040805160608101825260008082526020828101958652828401948552600354608060020a9081900481026001608060020a031990811684526002909252925195519451939091208054909116948290049490941777ffffffffffffffff000000000000000000000000000000001916920291909117600160c060020a031660c060020a919091021790555160068054909101905556

Deployed Bytecode

0x606060405236156100775760e060020a60003504631357e1dc811461007c5780632dfdf0b5146100855780632e1a7d4d1461008e5780635c76ca2d146100b15780637f3bd56e146100ba57806383197ef0146100df578063b3a2a999146100fe578063c23697a8146101dc578063c5b1a53c14610256575b610002565b6102b460055481565b6102b460065481565b6102c660043560008054600160a060020a0390811633909116146102f857610002565b6102b460045481565b6102c6600435602435600154600160a060020a0390811633909116146103d357610002565b6102c6600054600160a060020a03908116339091161461045257610002565b6102c860043560008080806001608060020a0319851681141561012757600354608060020a0294505b506001608060020a0319841660009081526002602052604090205460c060020a900467ffffffffffffffff169250835b6001608060020a0319811660001480159061019b57506001608060020a0319811660009081526002602052604090205460c060020a900467ffffffffffffffff1684145b1561046f576001608060020a03191660009081526002602052604090205460019290920191608060020a80820467ffffffffffffffff169092019102610157565b60408051600160a060020a03600435166c0100000000000000000000000002815281516014918190039190910190206001608060020a03191660009081526002602052205460c060020a810467ffffffffffffffff90811691608060020a9004166040805192835260208301919091528051918290030190f35b604080516020600480358082013583810285810185019096528085526102c695929460249490939285019282918501908490808284375094965050933593505050506000805433600160a060020a0390811691161461047657610002565b60408051918252519081900360200190f35b005b604080519485526020850193909352838301919091526001608060020a0319166060830152519081900360800190f35b6103a182600354600090608060020a0281805b848110801561032557506001608060020a03198316600014155b801561035c5750604060009081206001608060020a031985169091526002602052544260c060020a90910467ffffffffffffffff16105b15610573576001608060020a031992909216600090815260026020526040902054608060020a80820467ffffffffffffffff169094019302916001918201910161030b565b60405190915033600160a060020a031690600090839082818181858883f1935050505015156103cf57610002565b5050565b6004805482019055600580548201905560408051600160a060020a03841681526020810183905281517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4929181900390910190a1604051600160a060020a03831690600090839082818181858883f1935050505015156103cf57610002565b600654600090111561046357610002565b33600160a060020a0316ff5b9193509193565b8167ffffffffffffffff1683510290508034101561049357610002565b803411156104c95760405133600160a060020a031690600090348490039082818181858883f1935050505015156104c957610002565b61056e8383600354426301e1338001906000906001608060020a0319608060020a909102168114156106125783600081518110156100025790602001906020020151600360006101000a8154816001608060020a030219169083608060020a9004021790555083600081518110156100025790602001906020020151600360106101000a8154816001608060020a030219169083608060020a90040217905550610656565b505050565b60038054608060020a8086046001608060020a031992831617928390559190910216600014156105ca576000608060020a02600360106101000a8154816001608060020a030219169083608060020a900402179055505b6004546000901115610601576004548411156105f25760048054600090915590930392610601565b60048054949094039093556000925b600680548390039055505050919050565b836000815181101561000257602091820151600354608060020a9081900481026001608060020a031990811684526002909452604090922080549093169190041790555b5060005b60018451038110156106b95760026000506000858381518110156100025760209081029091018101516001608060020a031916825281019190915260400160009081205460c060020a900467ffffffffffffffff161461072b57610002565b836001855103815181101561000257602090810290910181015160038054608060020a9283900483026001608060020a03919091161790819055819004026001608060020a03191660009081526002909152604081205460c060020a900467ffffffffffffffff16146107f557610002565b60606040519081016040528085836001018151811015610002579060200190602002015181526020018481526020018381526020015060026000506000868481518110156100025760209081029091018101516001608060020a031990811683528282019390935260409182016000208451815492860151959093015160c060020a02608060020a95860295909304919093161777ffffffffffffffff00000000000000000000000000000000191692909217600160c060020a031691909117905560010161065a565b506040805160608101825260008082526020828101958652828401948552600354608060020a9081900481026001608060020a031990811684526002909252925195519451939091208054909116948290049490941777ffffffffffffffff000000000000000000000000000000001916920291909117600160c060020a031660c060020a919091021790555160068054909101905556

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.