Sponsored Link:   SHIFT.cash - smart-contract based car title lending platform, 30 billion market, 35+ employees. Join NOW.
Contract Overview
ETH Balance: 0 Ether
ETH USD Value: $0
No Of Transactions: 20 txns
Misc  
   
Address Watch Add To Watch List
Contract Creator 0xa4834bb804652aeb62c96fc29ded4bdd023d39d9at txn 0x925b219be6dec8802f256a37a4c71d53a3561047a3a35bcebd449b2a75d52bc3
Token Tracker
  Latest 20 txns

TxHash Age From To Value [TxFee]
0x19c346a9d8ed7464664759f3cc7cffbf0aa7e11d41a291b07a9c05347089571946 days 1 hr ago0xad7be436f181651d753ff7dd930efc2042775c10  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460 Ether0.00080714
0x82e7cbadfbb2d697033e34b200cd24c58d505eb0ae50a3944554aaae538c12a946 days 18 hrs ago0xe534ed8c3630703eab78602aa8c77935d2ee9a37  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460 Ether0.00012233897
0x285e9805cad195ca40f509c53b4a629743ed271d31eab5d7120dc9032eda8ced60 days 21 hrs ago0xa4834bb804652aeb62c96fc29ded4bdd023d39d9  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460 Ether0.000276785
0x5adf99ce20bb6adf16b50bfe33862ed11135dc7ff2f9e99e29f9c62666097c6960 days 21 hrs ago0xa4834bb804652aeb62c96fc29ded4bdd023d39d9  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460 Ether0.000276785
0xf78336e5e1911fcf5b1b0a96c38a78dac3a0243a5d616e39b51ec0530b03cd6e60 days 21 hrs ago0xa4834bb804652aeb62c96fc29ded4bdd023d39d9  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460.3 Ether0.001042512
0x7eeb3b6982cb4b7a3e462fc1b63d0f5b8d6a2e2a47d00f45c2fbbf225988474560 days 23 hrs ago0xa4834bb804652aeb62c96fc29ded4bdd023d39d9  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460.5 Ether0.001040056
0x5d3344178cabe36999616ea68d7271a2d4e7c688507fd31b938a6e20b44baea669 days 9 hrs ago0xa4834bb804652aeb62c96fc29ded4bdd023d39d9  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460 Ether0.001051783
0x10ab482bebcfc432ed0e2d86c4c476e66ffc23bfced19ed1d745cc2eb7401fca80 days 6 hrs ago0xe534ed8c3630703eab78602aa8c77935d2ee9a37  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460.008 Ether0.0000150168
0xea7b18e5fe5d5814a9da49febfed004327fe46312fae98318987bd114af4c710108 days 2 hrs ago0xad7be436f181651d753ff7dd930efc2042775c10  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460.2 Ether0.00300336
0xb3e31efb8bf1c066efaf1c94d5c6d12345eec5e560d3f989d373bd0d2a872576143 days 3 hrs ago0xa4834bb804652aeb62c96fc29ded4bdd023d39d9  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460.1 Ether0.000580028
0x60a5dd8002d1ccf2e994f0e03c5ab916b02f00983700241265d464e9ab8f077a143 days 4 hrs ago0xa4834bb804652aeb62c96fc29ded4bdd023d39d9  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460 Ether0.000847497
0x290528a29efb0c76573c417505815aee27ee8566926ec839b1c42196dd237b7c143 days 4 hrs ago0xa4834bb804652aeb62c96fc29ded4bdd023d39d9  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460.1 Ether0.000580028
0x94eb59e437f07f5198e8636f6f385337d7e2cac059b8750ffd30b789552d526a143 days 4 hrs ago0xa4834bb804652aeb62c96fc29ded4bdd023d39d9  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460 Ether0.000040357
0xd897b9ea1be334851feeea040043736dd4e3b21a1790ac603d28454ca62bb2ef157 days 18 hrs ago0xa4834bb804652aeb62c96fc29ded4bdd023d39d9  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460.02 Ether0.000145007
0x35965f348954fa0100d7328dedb0857f0c1bd43766717a0619a15c11197b6587157 days 19 hrs ago0xa4834bb804652aeb62c96fc29ded4bdd023d39d9  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460 Ether0.000040357
0x3530c574a37ba3c83252ff8dcae54d8764e129d95e464e46ad35c2ae870fb74b157 days 19 hrs ago0xa9417270666614c41a1f1163abb9a00878173aa5  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460 Ether0.000013427
0xaf448896502ee5408a0ab3f5cac61e7d2660c038ebe8d12334bd3116422425f9157 days 19 hrs ago0xa9417270666614c41a1f1163abb9a00878173aa5  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460 Ether0.000041917
0x6f3d20c9e1f00308c947ab176e089fff3c95716c56019d15ff277b0562ee141d157 days 19 hrs ago0xa4834bb804652aeb62c96fc29ded4bdd023d39d9  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460 Ether0.000028766
0xf8576ce1743c463a412206598dcf50a274300e11cae02ee7d22ad7142c1ce9bb157 days 19 hrs ago0xa4834bb804652aeb62c96fc29ded4bdd023d39d9  IN   0x5274a2293dbe075a82d41e873bb927403a9dce460.001 Ether0.000195168
0x925b219be6dec8802f256a37a4c71d53a3561047a3a35bcebd449b2a75d52bc3157 days 19 hrs ago0xa4834bb804652aeb62c96fc29ded4bdd023d39d9  IN    Contract Creation0 Ether0.003668908
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
  Latest 8 Internal Transactions

ParentTxHash Block Age From To Value
0x19c346a9d8ed7464664759f3cc7cffbf0aa7e11d41a291b07a9c053470895719484508546 days 1 hr ago0x5274a2293dbe075a82d41e873bb927403a9dce460xad7be436f181651d753ff7dd930efc2042775c100.2 Ether
0x82e7cbadfbb2d697033e34b200cd24c58d505eb0ae50a3944554aaae538c12a9484105546 days 18 hrs ago0x5274a2293dbe075a82d41e873bb927403a9dce460xe534ed8c3630703eab78602aa8c77935d2ee9a370.008 Ether
0x285e9805cad195ca40f509c53b4a629743ed271d31eab5d7120dc9032eda8ced475866960 days 21 hrs ago0x5274a2293dbe075a82d41e873bb927403a9dce460xa4834bb804652aeb62c96fc29ded4bdd023d39d90.5 Ether
0x5adf99ce20bb6adf16b50bfe33862ed11135dc7ff2f9e99e29f9c62666097c69475866560 days 21 hrs ago0x5274a2293dbe075a82d41e873bb927403a9dce460xa4834bb804652aeb62c96fc29ded4bdd023d39d90.3 Ether
0x5d3344178cabe36999616ea68d7271a2d4e7c688507fd31b938a6e20b44baea6470976269 days 9 hrs ago0x5274a2293dbe075a82d41e873bb927403a9dce460xa4834bb804652aeb62c96fc29ded4bdd023d39d90.1 Ether
0x60a5dd8002d1ccf2e994f0e03c5ab916b02f00983700241265d464e9ab8f077a4317587143 days 4 hrs ago0x5274a2293dbe075a82d41e873bb927403a9dce460xa4834bb804652aeb62c96fc29ded4bdd023d39d90.1 Ether
0x94eb59e437f07f5198e8636f6f385337d7e2cac059b8750ffd30b789552d526a4317555143 days 4 hrs ago0x5274a2293dbe075a82d41e873bb927403a9dce460xa4834bb804652aeb62c96fc29ded4bdd023d39d90.02 Ether
0x35965f348954fa0100d7328dedb0857f0c1bd43766717a0619a15c11197b65874269057157 days 19 hrs ago0x5274a2293dbe075a82d41e873bb927403a9dce460xa4834bb804652aeb62c96fc29ded4bdd023d39d90.001 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to ZeroFunctionSelector (very low-severity) Solidity compiler bugs.

Contract Source Code Verified
Contract Name: EthCapsule
Compiler Version: v0.4.16+commit.d7661dd9
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity ^0.4.11;

contract Ownable {
  address public owner;

  function Ownable() {
    owner = msg.sender;
  }

  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  function transferOwnership(address newOwner) onlyOwner {
    require(newOwner != address(0));
    owner = newOwner;
  }
}

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

contract EthCapsule is Ownable {
  struct Depositor {
    uint numCapsules;
    mapping (uint => Capsule) capsules;
  }

  mapping (address => Depositor) depositors;

  struct Capsule {
    uint value;
    uint id;
    uint lockTime;
    uint unlockTime;
    uint withdrawnTime;
  }

  uint public minDeposit = 1000000000000000;
  uint public minDuration = 0;
  uint public maxDuration = 157680000;
  uint public totalCapsules;
  uint public totalValue;
  uint public totalBuriedCapsules;

  function bury(uint unlockTime) payable {
    require(msg.value >= minDeposit);
    require(unlockTime <= block.timestamp + maxDuration);

    if (unlockTime < block.timestamp + minDuration) {
      unlockTime = SafeMath.add(block.timestamp, minDuration);
    }

    if (depositors[msg.sender].numCapsules <= 0) {
        depositors[msg.sender] = Depositor({ numCapsules: 0 });
    }

    Depositor storage depositor = depositors[msg.sender];

    depositor.numCapsules++;
    depositor.capsules[depositor.numCapsules] = Capsule({
        value: msg.value,
        id: depositors[msg.sender].numCapsules,
        lockTime: block.timestamp,
        unlockTime: unlockTime,
        withdrawnTime: 0
    });

    totalBuriedCapsules++;
    totalCapsules++;
    totalValue = SafeMath.add(totalValue, msg.value);
  }

  function dig(uint capsuleNumber) {
    Capsule storage capsule = depositors[msg.sender].capsules[capsuleNumber];

    require(capsule.unlockTime <= block.timestamp);
    require(capsule.withdrawnTime == 0);

    totalBuriedCapsules--;
    capsule.withdrawnTime = block.timestamp;
    msg.sender.transfer(capsule.value);
  }

  function setMinDeposit(uint min) onlyOwner {
    minDeposit = min;
  }

  function setMinDuration(uint min) onlyOwner {
    minDuration = min;
  }

  function setMaxDuration(uint max) onlyOwner {
    maxDuration = max;
  }
  
  function getCapsuleInfo(uint capsuleNum) constant returns (uint, uint, uint, uint, uint) {
    return (
        depositors[msg.sender].capsules[capsuleNum].value,
        depositors[msg.sender].capsules[capsuleNum].id,
        depositors[msg.sender].capsules[capsuleNum].lockTime,
        depositors[msg.sender].capsules[capsuleNum].unlockTime,
        depositors[msg.sender].capsules[capsuleNum].withdrawnTime
    );
  }

  function getNumberOfCapsules() constant returns (uint) {
    return depositors[msg.sender].numCapsules;
  }

  function totalBuriedValue() constant returns (uint) {
    return this.balance;
  }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"min","type":"uint256"}],"name":"setMinDuration","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalBuriedValue","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"capsuleNum","type":"uint256"}],"name":"getCapsuleInfo","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalBuriedCapsules","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getNumberOfCapsules","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"capsuleNumber","type":"uint256"}],"name":"dig","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"minDeposit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minDuration","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxDuration","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"min","type":"uint256"}],"name":"setMinDeposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"unlockTime","type":"uint256"}],"name":"bury","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"totalCapsules","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"max","type":"uint256"}],"name":"setMaxDuration","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalValue","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

  Contract Creation Code Switch To Opcodes View
606060405266038d7ea4c68000600255600060035563096601806004555b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b610bab8061006e6000396000f300606060405236156100e4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631674bade146100e957806316ea07281461010c5780632987ace51461013557806339900dcc1461018857806339a89c1a146101b157806340517083146101da57806341b3d185146101fd57806356715761146102265780636db5c8fd1461024f5780638da5cb5b146102785780638fcc9cfb146102cd578063abf74d5f146102f0578063b49ce17f14610308578063cf0f34c414610331578063d4c3eea014610354578063f2fde38b1461037d575b600080fd5b34156100f457600080fd5b61010a60048080359060200190919050506103b6565b005b341561011757600080fd5b61011f61041d565b6040518082815260200191505060405180910390f35b341561014057600080fd5b610156600480803590602001909190505061043d565b604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390f35b341561019357600080fd5b61019b61060c565b6040518082815260200191505060405180910390f35b34156101bc57600080fd5b6101c4610612565b6040518082815260200191505060405180910390f35b34156101e557600080fd5b6101fb600480803590602001909190505061065d565b005b341561020857600080fd5b61021061073f565b6040518082815260200191505060405180910390f35b341561023157600080fd5b610239610745565b6040518082815260200191505060405180910390f35b341561025a57600080fd5b61026261074b565b6040518082815260200191505060405180910390f35b341561028357600080fd5b61028b610751565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102d857600080fd5b6102ee6004808035906020019091905050610776565b005b61030660048080359060200190919050506107dd565b005b341561031357600080fd5b61031b610a11565b6040518082815260200191505060405180910390f35b341561033c57600080fd5b6103526004808035906020019091905050610a17565b005b341561035f57600080fd5b610367610a7e565b6040518082815260200191505060405180910390f35b341561038857600080fd5b6103b4600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a84565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561041157600080fd5b806003819055505b5b50565b60003073ffffffffffffffffffffffffffffffffffffffff163190505b90565b6000806000806000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600087815260200190815260200160002060000154600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600088815260200190815260200160002060010154600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600089815260200190815260200160002060020154600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008a815260200190815260200160002060030154600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008b815260200190815260200160002060040154945094509450945094505b91939590929450565b60075481565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015490505b90565b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008381526020019081526020016000209050428160030154111515156106c757600080fd5b600081600401541415156106da57600080fd5b600760008154809291906001900391905055504281600401819055503373ffffffffffffffffffffffffffffffffffffffff166108fc82600001549081150290604051600060405180830381858888f19350505050151561073a57600080fd5b5b5050565b60025481565b60035481565b60045481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156107d157600080fd5b806002819055505b5b50565b600060025434101515156107f057600080fd5b6004544201821115151561080357600080fd5b600354420182101561081e5761081b42600354610b60565b91505b6000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001541115156108c8576020604051908101604052806000815250600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001559050505b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050806000016000815480929190600101919050555060a060405190810160405280348152602001600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015481526020014281526020018381526020016000815250816001016000836000015481526020019081526020016000206000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040155905050600760008154809291906001019190505550600560008154809291906001019190505550610a0660065434610b60565b6006819055505b5050565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a7257600080fd5b806004819055505b5b50565b60065481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610adf57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610b1b57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b50565b6000808284019050838110151515610b7457fe5b8091505b50929150505600a165627a7a72305820b2bb2f30ea1bd629178a1efc6c985f3dc9781e5591c859add632e779eb10a60b0029

   Swarm Source:
bzzr://b2bb2f30ea1bd629178a1efc6c985f3dc9781e5591c859add632e779eb10a60b

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.