More Info
Private Name Tags
ContractCreator
Latest 7 from a total of 7 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Disburse | 2220222 | 3136 days ago | IN | 0 ETH | 0.00163245 | ||||
Deposit | 2220215 | 3136 days ago | IN | 10 ETH | 0.04071692 | ||||
Deposit | 2220215 | 3136 days ago | IN | 10 ETH | 0.04500842 | ||||
Deposit | 2220214 | 3136 days ago | IN | 10 ETH | 0.04500074 | ||||
Deposit | 2220214 | 3136 days ago | IN | 10 ETH | 0.04500714 | ||||
Deposit | 2220213 | 3136 days ago | IN | 10 ETH | 0.0450033 | ||||
Deposit | 2220209 | 3136 days ago | IN | 1 ETH | 0.00589636 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
Transfer | 2443195 | 3099 days ago | 0 ETH | ||||
Transfer | 2441001 | 3099 days ago | 0 ETH | ||||
Transfer | 2440992 | 3099 days ago | 0 ETH | ||||
Transfer | 2440985 | 3099 days ago | 0 ETH | ||||
Transfer | 2439192 | 3099 days ago | 0 ETH | ||||
Transfer | 2438794 | 3100 days ago | 0 ETH | ||||
Transfer | 2438772 | 3100 days ago | 0 ETH | ||||
Transfer | 2438527 | 3100 days ago | 0 ETH | ||||
Transfer | 2438527 | 3100 days ago | 0 ETH | ||||
Transfer | 2438473 | 3100 days ago | 0 ETH | ||||
Transfer | 2438465 | 3100 days ago | 0 ETH | ||||
Transfer | 2438459 | 3100 days ago | 0 ETH | ||||
Transfer | 2438438 | 3100 days ago | 0 ETH | ||||
Transfer | 2438418 | 3100 days ago | 0 ETH | ||||
Transfer | 2438411 | 3100 days ago | 0 ETH | ||||
Transfer | 2438388 | 3100 days ago | 0 ETH | ||||
Transfer | 2438383 | 3100 days ago | 0 ETH | ||||
Transfer | 2438285 | 3100 days ago | 0 ETH | ||||
Transfer | 2438274 | 3100 days ago | 0 ETH | ||||
Transfer | 2438263 | 3100 days ago | 0 ETH | ||||
Transfer | 2438256 | 3100 days ago | 0 ETH | ||||
Transfer | 2438238 | 3100 days ago | 0 ETH | ||||
Transfer | 2438230 | 3100 days ago | 0 ETH | ||||
Transfer | 2438224 | 3100 days ago | 0 ETH | ||||
Transfer | 2438219 | 3100 days ago | 0 ETH |
Loading...
Loading
Contract Name:
DepositHolder
Compiler Version
v0.3.6-2016-09-06-114502f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *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
- No Contract Security Audit Submitted- Submit Audit Here
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"}]
Contract Creation Code
606060405260008054600160a060020a0319908116331780835560018054909216600160a060020a0390911617905561088d90819061003d90396000f3606060405236156100775760e060020a60003504631357e1dc811461007c5780632dfdf0b5146100855780632e1a7d4d1461008e5780635c76ca2d146100b15780637f3bd56e146100ba57806383197ef0146100df578063b3a2a999146100fe578063c23697a8146101dc578063c5b1a53c14610256575b610002565b6102b460055481565b6102b460065481565b6102c660043560008054600160a060020a0390811633909116146102f857610002565b6102b460045481565b6102c6600435602435600154600160a060020a0390811633909116146103d357610002565b6102c6600054600160a060020a03908116339091161461045257610002565b6102c860043560008080806001608060020a0319851681141561012757600354608060020a0294505b506001608060020a0319841660009081526002602052604090205460c060020a900467ffffffffffffffff169250835b6001608060020a0319811660001480159061019b57506001608060020a0319811660009081526002602052604090205460c060020a900467ffffffffffffffff1684145b1561046f576001608060020a03191660009081526002602052604090205460019290920191608060020a80820467ffffffffffffffff169092019102610157565b60408051600160a060020a03600435166c0100000000000000000000000002815281516014918190039190910190206001608060020a03191660009081526002602052205460c060020a810467ffffffffffffffff90811691608060020a9004166040805192835260208301919091528051918290030190f35b604080516020600480358082013583810285810185019096528085526102c695929460249490939285019282918501908490808284375094965050933593505050506000805433600160a060020a0390811691161461047657610002565b60408051918252519081900360200190f35b005b604080519485526020850193909352838301919091526001608060020a0319166060830152519081900360800190f35b6103a182600354600090608060020a0281805b848110801561032557506001608060020a03198316600014155b801561035c5750604060009081206001608060020a031985169091526002602052544260c060020a90910467ffffffffffffffff16105b15610573576001608060020a031992909216600090815260026020526040902054608060020a80820467ffffffffffffffff169094019302916001918201910161030b565b60405190915033600160a060020a031690600090839082818181858883f1935050505015156103cf57610002565b5050565b6004805482019055600580548201905560408051600160a060020a03841681526020810183905281517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4929181900390910190a1604051600160a060020a03831690600090839082818181858883f1935050505015156103cf57610002565b600654600090111561046357610002565b33600160a060020a0316ff5b9193509193565b8167ffffffffffffffff1683510290508034101561049357610002565b803411156104c95760405133600160a060020a031690600090348490039082818181858883f1935050505015156104c957610002565b61056e8383600354426301e1338001906000906001608060020a0319608060020a909102168114156106125783600081518110156100025790602001906020020151600360006101000a8154816001608060020a030219169083608060020a9004021790555083600081518110156100025790602001906020020151600360106101000a8154816001608060020a030219169083608060020a90040217905550610656565b505050565b60038054608060020a8086046001608060020a031992831617928390559190910216600014156105ca576000608060020a02600360106101000a8154816001608060020a030219169083608060020a900402179055505b6004546000901115610601576004548411156105f25760048054600090915590930392610601565b60048054949094039093556000925b600680548390039055505050919050565b836000815181101561000257602091820151600354608060020a9081900481026001608060020a031990811684526002909452604090922080549093169190041790555b5060005b60018451038110156106b95760026000506000858381518110156100025760209081029091018101516001608060020a031916825281019190915260400160009081205460c060020a900467ffffffffffffffff161461072b57610002565b836001855103815181101561000257602090810290910181015160038054608060020a9283900483026001608060020a03919091161790819055819004026001608060020a03191660009081526002909152604081205460c060020a900467ffffffffffffffff16146107f557610002565b60606040519081016040528085836001018151811015610002579060200190602002015181526020018481526020018381526020015060026000506000868481518110156100025760209081029091018101516001608060020a031990811683528282019390935260409182016000208451815492860151959093015160c060020a02608060020a95860295909304919093161777ffffffffffffffff00000000000000000000000000000000191692909217600160c060020a031691909117905560010161065a565b506040805160608101825260008082526020828101958652828401948552600354608060020a9081900481026001608060020a031990811684526002909252925195519451939091208054909116948290049490941777ffffffffffffffff000000000000000000000000000000001916920291909117600160c060020a031660c060020a919091021790555160068054909101905556
Deployed Bytecode
0x606060405236156100775760e060020a60003504631357e1dc811461007c5780632dfdf0b5146100855780632e1a7d4d1461008e5780635c76ca2d146100b15780637f3bd56e146100ba57806383197ef0146100df578063b3a2a999146100fe578063c23697a8146101dc578063c5b1a53c14610256575b610002565b6102b460055481565b6102b460065481565b6102c660043560008054600160a060020a0390811633909116146102f857610002565b6102b460045481565b6102c6600435602435600154600160a060020a0390811633909116146103d357610002565b6102c6600054600160a060020a03908116339091161461045257610002565b6102c860043560008080806001608060020a0319851681141561012757600354608060020a0294505b506001608060020a0319841660009081526002602052604090205460c060020a900467ffffffffffffffff169250835b6001608060020a0319811660001480159061019b57506001608060020a0319811660009081526002602052604090205460c060020a900467ffffffffffffffff1684145b1561046f576001608060020a03191660009081526002602052604090205460019290920191608060020a80820467ffffffffffffffff169092019102610157565b60408051600160a060020a03600435166c0100000000000000000000000002815281516014918190039190910190206001608060020a03191660009081526002602052205460c060020a810467ffffffffffffffff90811691608060020a9004166040805192835260208301919091528051918290030190f35b604080516020600480358082013583810285810185019096528085526102c695929460249490939285019282918501908490808284375094965050933593505050506000805433600160a060020a0390811691161461047657610002565b60408051918252519081900360200190f35b005b604080519485526020850193909352838301919091526001608060020a0319166060830152519081900360800190f35b6103a182600354600090608060020a0281805b848110801561032557506001608060020a03198316600014155b801561035c5750604060009081206001608060020a031985169091526002602052544260c060020a90910467ffffffffffffffff16105b15610573576001608060020a031992909216600090815260026020526040902054608060020a80820467ffffffffffffffff169094019302916001918201910161030b565b60405190915033600160a060020a031690600090839082818181858883f1935050505015156103cf57610002565b5050565b6004805482019055600580548201905560408051600160a060020a03841681526020810183905281517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4929181900390910190a1604051600160a060020a03831690600090839082818181858883f1935050505015156103cf57610002565b600654600090111561046357610002565b33600160a060020a0316ff5b9193509193565b8167ffffffffffffffff1683510290508034101561049357610002565b803411156104c95760405133600160a060020a031690600090348490039082818181858883f1935050505015156104c957610002565b61056e8383600354426301e1338001906000906001608060020a0319608060020a909102168114156106125783600081518110156100025790602001906020020151600360006101000a8154816001608060020a030219169083608060020a9004021790555083600081518110156100025790602001906020020151600360106101000a8154816001608060020a030219169083608060020a90040217905550610656565b505050565b60038054608060020a8086046001608060020a031992831617928390559190910216600014156105ca576000608060020a02600360106101000a8154816001608060020a030219169083608060020a900402179055505b6004546000901115610601576004548411156105f25760048054600090915590930392610601565b60048054949094039093556000925b600680548390039055505050919050565b836000815181101561000257602091820151600354608060020a9081900481026001608060020a031990811684526002909452604090922080549093169190041790555b5060005b60018451038110156106b95760026000506000858381518110156100025760209081029091018101516001608060020a031916825281019190915260400160009081205460c060020a900467ffffffffffffffff161461072b57610002565b836001855103815181101561000257602090810290910181015160038054608060020a9283900483026001608060020a03919091161790819055819004026001608060020a03191660009081526002909152604081205460c060020a900467ffffffffffffffff16146107f557610002565b60606040519081016040528085836001018151811015610002579060200190602002015181526020018481526020018381526020015060026000506000868481518110156100025760209081029091018101516001608060020a031990811683528282019390935260409182016000208451815492860151959093015160c060020a02608060020a95860295909304919093161777ffffffffffffffff00000000000000000000000000000000191692909217600160c060020a031691909117905560010161065a565b506040805160608101825260008082526020828101958652828401948552600354608060020a9081900481026001608060020a031990811684526002909252925195519451939091208054909116948290049490941777ffffffffffffffff000000000000000000000000000000001916920291909117600160c060020a031660c060020a919091021790555160068054909101905556
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
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.