Sponsored:   Ubex.com - World roadshow: Seoul Sep 17-19, Singapore Sep 19-20, Dubai 18-23. Meet us!.
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 3 txns
 Latest 3 txns

TxHash Age From To Value [TxFee]
0x45bb57f0a07a9aaef0b7384e068eb244d96a55323b110b4d7f02c0ac10bdc01f212 days 14 hrs ago0x00b43d3faa03fa867d0da9dd5907c785b47d5dfa  IN   0x7052ad9bbc671804616e2280059fb3113dcd735b0 Ether0.00259454
0x0b507b73890df42a2b6e655e11d0ea43f57e092404d30a77f9627b0b6b6be7fc212 days 14 hrs ago0x0025fb1affdf803fe88788e20678e68707a71bab  IN   0x7052ad9bbc671804616e2280059fb3113dcd735b0 Ether0.00043604
0xd399f71f1a515db23189c1156b0c64c9ab355ec81e5e467a49413ba93332ce79212 days 14 hrs ago0x00b43d3faa03fa867d0da9dd5907c785b47d5dfa  IN    Contract Creation0 Ether0.01772926
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Similar Match)
Note: Displaying Similar Match Verified Source Code At Contract 0xFB7Aa013425B762cF2D8FEFd05F3CD4B9Ab3Df11(Excluding Constructor Arguments if_any)
Contract Name: SilentNotaryTokenStorage
Compiler Text: v0.4.18+commit.9cf6e910
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.18;

 /// @title Ownable contract - base contract with an owner
contract Ownable {
  address public owner;

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

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

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

 /// @title SafeMath contract - math operations with safety checks
contract SafeMath {
  function safeMul(uint a, uint b) internal pure  returns (uint) {
    uint c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function safeDiv(uint a, uint b) internal pure returns (uint) {
    assert(b > 0);
    uint c = a / b;
    assert(a == b * c + a % b);
    return c;
  }

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

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

  function max64(uint64 a, uint64 b) internal pure returns (uint64) {
    return a >= b ? a : b;
  }

  function min64(uint64 a, uint64 b) internal pure returns (uint64) {
    return a < b ? a : b;
  }

  function max256(uint256 a, uint256 b) internal pure returns (uint256) {
    return a >= b ? a : b;
  }

  function min256(uint256 a, uint256 b) internal pure returns (uint256) {
    return a < b ? a : b;
  }
}

 /// @title ERC20 interface see https://github.com/ethereum/EIPs/issues/20
contract ERC20 {
  uint public totalSupply;
  function balanceOf(address who) public constant returns (uint);
  function allowance(address owner, address spender) public constant returns (uint);  
  function transfer(address to, uint value) public returns (bool ok);
  function transferFrom(address from, address to, uint value) public returns (bool ok);
  function approve(address spender, uint value) public returns (bool ok);
  function decimals() public constant returns (uint value);
  event Transfer(address indexed from, address indexed to, uint value);
  event Approval(address indexed owner, address indexed spender, uint value);
}

contract SilentNotaryTokenStorage is SafeMath, Ownable {

  /// Information about frozen portion of tokens
  struct FrozenPortion {
    /// Earliest time when this portion will become available
    uint unfreezeTime;

    /// Frozen balance portion, in percents
    uint portionPercent;

    /// Frozen token amount
    uint portionAmount;

    /// Is this portion unfrozen (withdrawn) after freeze period has finished
    bool isUnfrozen;
  }

  /// Specified amount of tokens was unfrozen
  event Unfrozen(uint tokenAmount);

  /// SilentNotary token contract
  ERC20 public token;

  /// All frozen portions of the contract token balance
  FrozenPortion[] public frozenPortions;

  /// Team wallet to withdraw unfrozen tokens
  address public teamWallet;

  /// Deployment time of this contract, which is also the start point to count freeze periods
  uint public deployedTime;

  /// Is current token amount fixed (must be to unfreeze)
  bool public amountFixed;

  /// @dev Constructor
  /// @param _token SilentNotary token contract address
  /// @param _teamWallet Wallet address to withdraw unfrozen tokens
  /// @param _freezePeriods Ordered array of freeze periods
  /// @param _freezePortions Ordered array of balance portions to freeze, in percents
  function SilentNotaryTokenStorage (address _token, address _teamWallet, uint[] _freezePeriods, uint[] _freezePortions) public {
    require(_token > 0);
    require(_teamWallet > 0);
    require(_freezePeriods.length > 0);
    require(_freezePeriods.length == _freezePortions.length);

    token = ERC20(_token);
    teamWallet = _teamWallet;
    deployedTime = now;

    var cumulativeTime = deployedTime;
    uint cumulativePercent = 0;
    for (uint i = 0; i < _freezePeriods.length; i++) {
      require(_freezePortions[i] > 0 && _freezePortions[i] <= 100);
      cumulativePercent = safeAdd(cumulativePercent, _freezePortions[i]);
      cumulativeTime = safeAdd(cumulativeTime, _freezePeriods[i]);
      frozenPortions.push(FrozenPortion({
        portionPercent: _freezePortions[i],
        unfreezeTime: cumulativeTime,
        portionAmount: 0,
        isUnfrozen: false}));
    }
    assert(cumulativePercent == 100);
  }

  /// @dev Unfreeze currently available amount of tokens
  function unfreeze() public onlyOwner {
    require(amountFixed);

    uint unfrozenTokens = 0;
    for (uint i = 0; i < frozenPortions.length; i++) {
      var portion = frozenPortions[i];
      if (portion.isUnfrozen)
        continue;
      if (portion.unfreezeTime < now) {
        unfrozenTokens = safeAdd(unfrozenTokens, portion.portionAmount);
        portion.isUnfrozen = true;
      }
      else
        break;
    }
    transferTokens(unfrozenTokens);
  }

  /// @dev Fix current token amount (calculate absolute values of every portion)
  function fixAmount() public onlyOwner {
    require(!amountFixed);
    amountFixed = true;

    uint currentBalance = token.balanceOf(this);
    for (uint i = 0; i < frozenPortions.length; i++) {
      var portion = frozenPortions[i];
      portion.portionAmount = safeDiv(safeMul(currentBalance, portion.portionPercent), 100);
    }
  }

  /// @dev Withdraw remaining tokens after all freeze periods are over (in case there were additional token transfers)
  function withdrawRemainder() public onlyOwner {
    for (uint i = 0; i < frozenPortions.length; i++) {
      if (!frozenPortions[i].isUnfrozen)
        revert();
    }
    transferTokens(token.balanceOf(this));
  }

  function transferTokens(uint tokenAmount) private {
    require(tokenAmount > 0);
    var transferSuccess = token.transfer(teamWallet, tokenAmount);
    assert(transferSuccess);
    Unfrozen(tokenAmount);
  }
}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"frozenPortions","outputs":[{"name":"unfreezeTime","type":"uint256"},{"name":"portionPercent","type":"uint256"},{"name":"portionAmount","type":"uint256"},{"name":"isUnfrozen","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"fixAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"deployedTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"teamWallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unfreeze","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"amountFixed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdrawRemainder","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_token","type":"address"},{"name":"_teamWallet","type":"address"},{"name":"_freezePeriods","type":"uint256[]"},{"name":"_freezePortions","type":"uint256[]"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenAmount","type":"uint256"}],"name":"Unfrozen","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000f57600080fd5b60405161098038038061098083398101604052808051919060200180519190602001805182019190602001805160008054600160a060020a03338116600160a060020a03199092169190911782559190930192915081908190871681901161007657600080fd5b6000600160a060020a0387161161008c57600080fd5b600085511161009a57600080fd5b83518551146100a857600080fd5b505060018054600160a060020a03808816600160a060020a0319928316179092556003805492871692909116919091179055504260048190556000805b84518110156102105760008482815181106100fc57fe5b906020019060200201511180156101295750606484828151811061011c57fe5b9060200190602002015111155b151561013457600080fd5b6101608285838151811061014457fe5b906020019060200201516401000000006105a661022682021704565b91506101728386838151811061014457fe5b925060028054806001018281610188919061024a565b916000526020600020906004020160006080604051908101604052808781526020018886815181106101b657fe5b9060200190602002015181526000602082018190526040909101529190508151815560208201518160010155604082015181600201556060820151600391909101805460ff191691151591909117905550506001016100e5565b6064821461021a57fe5b505050505050506102b5565b600082820183811080159061023b5750828110155b151561024357fe5b9392505050565b81548183558181151161027657600402816004028360005260206000209182019101610276919061027b565b505050565b6102b291905b808211156102ae57600080825560018201819055600282015560038101805460ff19169055600401610281565b5090565b90565b6106bc806102c46000396000f30060606040526004361061008a5763ffffffff60e060020a6000350416630a6c0642811461008f578063345ac602146100d1578063461ac019146100e6578063599270441461010b5780636a28f0001461013a578063803965c41461014d5780638b9b1cbd146101745780638da5cb5b14610187578063f2fde38b1461019a578063fc0c546a146101b9575b600080fd5b341561009a57600080fd5b6100a56004356101cc565b604051938452602084019290925260408084019190915290151560608301526080909101905180910390f35b34156100dc57600080fd5b6100e4610207565b005b34156100f157600080fd5b6100f9610314565b60405190815260200160405180910390f35b341561011657600080fd5b61011e61031a565b604051600160a060020a03909116815260200160405180910390f35b341561014557600080fd5b6100e4610329565b341561015857600080fd5b6101606103e7565b604051901515815260200160405180910390f35b341561017f57600080fd5b6100e46103f0565b341561019257600080fd5b61011e6104d2565b34156101a557600080fd5b6100e4600160a060020a03600435166104e1565b34156101c457600080fd5b61011e610538565b60028054829081106101da57fe5b60009182526020909120600490910201805460018201546002830154600390930154919350919060ff1684565b600080548190819033600160a060020a0390811691161461022757600080fd5b60055460ff161561023757600080fd5b6005805460ff1916600190811790915554600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561029e57600080fd5b6102c65a03f115156102af57600080fd5b5050506040518051935060009250505b60025482101561030f5760028054839081106102d757fe5b906000526020600020906004020190506102ff6102f8848360010154610547565b6064610572565b60028201556001909101906102bf565b505050565b60045481565b600354600160a060020a031681565b600080548190819033600160a060020a0390811691161461034957600080fd5b60055460ff16151561035a57600080fd5b60009250600091505b6002548210156103de57600280548390811061037b57fe5b60009182526020909120600490910201600381015490915060ff16156103a0576103d3565b8054429010156103ce576103b88382600201546105a6565b60038201805460ff1916600117905592506103d3565b6103de565b600190910190610363565b61030f836105c0565b60055460ff1681565b6000805433600160a060020a0390811691161461040c57600080fd5b5060005b60025481101561045257600280548290811061042857fe5b600091825260209091206003600490920201015460ff16151561044a57600080fd5b600101610410565b6001546104cf90600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156104af57600080fd5b6102c65a03f115156104c057600080fd5b505050604051805190506105c0565b50565b600054600160a060020a031681565b60005433600160a060020a039081169116146104fc57600080fd5b600160a060020a038116156104cf5760008054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b600154600160a060020a031681565b6000828202831580610563575082848281151561056057fe5b04145b151561056b57fe5b9392505050565b60008080831161057e57fe5b828481151561058957fe5b049050828481151561059757fe5b06818402018414151561056b57fe5b600082820183811080159061056357508281101561056b57fe5b60008082116105ce57600080fd5b600154600354600160a060020a039182169163a9059cbb91168460006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561063457600080fd5b6102c65a03f1151561064557600080fd5b505050604051805191505080151561065957fe5b7f083eea12772ab70fba01c8212d02f3bc5dc29b8540dcdc84298e5dfa22731b928260405190815260200160405180910390a150505600a165627a7a72305820246565be6e2eaf034326748590c26e9d43dc898878036f8d7432329524434fb500290000000000000000000000002859021ee7f2cb10162e67f33af2d22764b31aff00000000000000000000000000b43d3faa03fa867d0da9dd5907c785b47d5dfa000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000005bbfb9d0000000000000000000000000000000000000000000000000000000005cafaad0000000000000000000000000000000000000000000000000000000005e922fd0000000000000000000000000000000000000000000000000000000006073635000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000019000000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000019

   Swarm Source:
bzzr://246565be6e2eaf034326748590c26e9d43dc898878036f8d7432329524434fb5

 

View All
Block Age transaction Difficulty Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.