Sponsored Link:   COVESTING - EU-based digital asset exchange. Aggregated liquidity. Algorithmic & Copy-trading features. 24/7 support. Get access!
 Latest 6 txns


TxHash Age From To Value [TxFee]
0x5a9a6955dc2e9b713268ebc7d33ebc582a65575df87cf740b8baa8c468abb524136 days 18 hrs agoGronDigitalWallet  IN   0x16e9b1234df1f10aeea65ee48223986ce62c8a7b0 Ether0.00110544
0xe1406b06b298e8ffb48ca3f61fe14512c8c9ff20d0f31c3549db12564bd5be80144 days 10 hrs agoGronDigitalWallet  IN   0x16e9b1234df1f10aeea65ee48223986ce62c8a7b0 Ether0.00067726
0x37a1d422de2fb98a748fec5b297fde7290c383be4c9a88a6812c47c19d87d6b1145 days 16 hrs agoGronDigitalWallet  IN   0x16e9b1234df1f10aeea65ee48223986ce62c8a7b0 Ether0.00135452
0xe7f979189bba39688a1a5ff07ce6aa633e620562be386ea7cf9076526b6d085d146 days 5 hrs agoGronDigitalWallet  IN   0x16e9b1234df1f10aeea65ee48223986ce62c8a7b0 Ether0.00135452
0x5c65f2440187cd26378c8044da3fa8701c00e8644d2a30d821db9439077e629e160 days 10 hrs agoGronDigitalWallet  IN   0x16e9b1234df1f10aeea65ee48223986ce62c8a7b0 Ether0.00255452
0x7a14f691e5f4cb99da00ec5af77dab6b4b9b37e0c65cb90a6e156ef475f55ee3160 days 10 hrs agoGronDigitalWallet  IN    Contract Creation0 Ether0.05222956
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Contract Source Code Verified (Exact match)
Contract Name: GROVesting
Compiler Version: v0.4.18+commit.9cf6e910
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity 0.4.18;

contract Token { // ERC20 standard

    function balanceOf(address _owner) public constant returns (uint256 balance);
    function transfer(address _to, uint256 _value) public returns (bool success);
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
    function approve(address _spender, uint256 _value) public returns (bool success);
    function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}

/**
 * Overflow aware uint math functions.
 *
 * Inspired by https://github.com/makerdao/maker-otc/blob/master/src/simple_market.sol
 */

contract SafeMath {

  function safeMul(uint a, uint b) pure internal returns (uint) {
    uint c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }
  function safeSub(uint a, uint b) pure internal returns (uint) {
    assert(b <= a);
    return a - b;
  }
  function safeAdd(uint a, uint b) pure internal returns (uint) {
    uint c = a + b;
    assert(c>=a && c>=b);
    return c;
  }
  function safeNumDigits(uint number) pure internal returns (uint8) {
    uint8 digits = 0;
    while (number != 0) {
        number /= 10;
        digits++;
    }
    return digits;
}

  // mitigate short address attack
  // thanks to https://github.com/numerai/contract/blob/c182465f82e50ced8dacb3977ec374a892f5fa8c/contracts/Safe.sol#L30-L34.
  // TODO: doublecheck implication of >= compared to ==
  modifier onlyPayloadSize(uint numWords) {
     assert(msg.data.length >= numWords * 32 + 4);
     _;
  }

}
/**
 * @title GROVesting
 * @dev GROVesting is a token holder contract that allows the specified beneficiary
 * to claim stored tokens after 6 & 12 month intervals
 */

contract GROVesting is SafeMath {

  address public beneficiary;
  uint256 public fundingEndBlock;

  bool private initClaim = false; // state tracking variables

  uint256 public firstRelease; // vesting times
  bool private firstDone = false;
  uint256 public secondRelease;
  bool private secondDone = false;
  uint256 public thirdRelease;

  Token public ERC20Token; // ERC20 basic token contract to hold

  enum Stages {
    initClaim,
    firstRelease,
    secondRelease,
    thirdRelease
  }

  Stages public stage = Stages.initClaim;

  modifier atStage(Stages _stage){
    if (stage == _stage) _;
  }

  modifier onlyBeneficiary {
    require(msg.sender == beneficiary);
    _;
  }

  function GROVesting() public {
    beneficiary = msg.sender;
  }

  // Not all deployment clients support constructor arguments.
  // This function is provided for maximum compatibility. 
  function initialiseContract(address _token, uint256 fundingEndBlockInput) external onlyBeneficiary {
    require(_token != address(0));
    fundingEndBlock = fundingEndBlockInput;
    ERC20Token = Token(_token);
  }
    
  function changeBeneficiary(address newBeneficiary) external {
    require(newBeneficiary != address(0));
    require(msg.sender == beneficiary);
    beneficiary = newBeneficiary;
  }

  function updateFundingEndBlock(uint256 newFundingEndBlock) public {
    require(msg.sender == beneficiary);
    require(currentBlock() < fundingEndBlock);
    require(currentBlock() < newFundingEndBlock);
    fundingEndBlock = newFundingEndBlock;
  }

  function checkBalance() public constant returns (uint256 tokenBalance) {
    return ERC20Token.balanceOf(this);
  }

  // in total 40% of GRO tokens will be sent to this contract
  // EXPENSE ALLOCATION: 28%          | TEAM ALLOCATION: 12% (vest over 2 years)
  //   12% - Incentives and bonuses
  //   16% - Bankroll                 
  //                                  
  //   Expenses Breakdown:
  //   50% - Software Development
  //   15% - Operations
  //   15% - Advisors
  //   10% - Marketing
  //   5% - Legal Framework & Finance
  //   5% - Contingencies
  //
  // initial claim is bankroll - 16% = 152000000
  // first release after 6 months - Incentives and bonuses - 12%
  // second release after 12 months - Founders - 6%
  // third release after 24 months - Founders - 6%

  function claim() external {
    require(msg.sender == beneficiary);
    require(currentBlock() > fundingEndBlock);
    uint256 balance = ERC20Token.balanceOf(this);
    // in reverse order so stages changes don't carry within one claim
    third_release(balance);
    second_release(balance);
    first_release(balance);
    init_claim(balance);
  }

  function nextStage() private {
    stage = Stages(uint256(stage) + 1);
  }

  function init_claim(uint256 balance) private atStage(Stages.initClaim) {
    firstRelease = currentTime() + 26 weeks;                          // Incentives and bonuses
    secondRelease = currentTime() + 52 weeks;                         // Founders
    thirdRelease = secondRelease + 52 weeks;                // Founders
    uint256 amountToTransfer = safeMul(balance, 40) / 100;  // send 100% of Bankroll - 40% of Expense Allocation
    ERC20Token.transfer(beneficiary, amountToTransfer);     // now 60% tokens left
    nextStage();
  }
  function first_release(uint256 balance) private atStage(Stages.firstRelease) {
    require(currentTime() > firstRelease);
    uint256 amountToTransfer = safeMul(balance, 30) / 100;  // send 100% of incentives and bonuses - 30% of Expense Allocation
    ERC20Token.transfer(beneficiary, amountToTransfer);     // now 30% tokens left
    nextStage();
  }
  function second_release(uint256 balance) private atStage(Stages.secondRelease) {
    require(currentTime() > secondRelease);
    uint256 amountToTransfer = balance / 2;             // send 50% of founders release - 15% of Expense Allocation
    ERC20Token.transfer(beneficiary, amountToTransfer); // now 15% tokens left
    nextStage();
  }
  function third_release(uint256 balance) private atStage(Stages.thirdRelease) {
    require(currentTime() > thirdRelease);
    uint256 amountToTransfer = balance;                 // send 50% of founders release - 15% of Expense Allocation
    ERC20Token.transfer(beneficiary, amountToTransfer);
    nextStage();
  }

  function claimOtherTokens(address _token) external {
    require(msg.sender == beneficiary);
    require(_token != address(0));
    Token token = Token(_token);
    require(token != ERC20Token);
    uint256 balance = token.balanceOf(this);
    token.transfer(beneficiary, balance);
  }

  function currentBlock() private constant returns(uint256 _currentBlock) {
    return block.number;
  }

  function currentTime() private constant returns(uint256 _currentTime) {
    return now;
  } 
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"}],"name":"claimOtherTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"claim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"fundingEndBlockInput","type":"uint256"}],"name":"initialiseContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"secondRelease","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ERC20Token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fundingEndBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"thirdRelease","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"checkBalance","outputs":[{"name":"tokenBalance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"firstRelease","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newBeneficiary","type":"address"}],"name":"changeBeneficiary","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newFundingEndBlock","type":"uint256"}],"name":"updateFundingEndBlock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"}]

  Contract Creation Code Switch To Opcodes View
60606040526000600260006101000a81548160ff0219169083151502179055506000600460006101000a81548160ff0219169083151502179055506000600660006101000a81548160ff0219169083151502179055506000600860146101000a81548160ff0219169083600381111561007457fe5b0217905550341561008457600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506111d1806100d36000396000f3006060604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806338af3eed146100ca578063405a66da1461011f5780634e71d92d146101585780635fad3b1a1461016d578063695ec793146101af5780637a80760e146101d857806391b43d131461022d578063a777deca14610256578063c040e6b81461027f578063c71daccb146102b6578063da5db748146102df578063dc07065714610308578063e28b0d9a14610341575b600080fd5b34156100d557600080fd5b6100dd610364565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012a57600080fd5b610156600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610389565b005b341561016357600080fd5b61016b610630565b005b341561017857600080fd5b6101ad600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506107ad565b005b34156101ba57600080fd5b6101c2610890565b6040518082815260200191505060405180910390f35b34156101e357600080fd5b6101eb610896565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561023857600080fd5b6102406108bc565b6040518082815260200191505060405180910390f35b341561026157600080fd5b6102696108c2565b6040518082815260200191505060405180910390f35b341561028a57600080fd5b6102926108c8565b604051808260038111156102a257fe5b60ff16815260200191505060405180910390f35b34156102c157600080fd5b6102c96108db565b6040518082815260200191505060405180910390f35b34156102ea57600080fd5b6102f26109c2565b6040518082815260200191505060405180910390f35b341561031357600080fd5b61033f600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506109c8565b005b341561034c57600080fd5b6103626004808035906020019091905050610aa2565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156103e757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561042357600080fd5b829150600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561048357600080fd5b8173ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561052657600080fd5b6102c65a03f1151561053757600080fd5b5050506040518051905090508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561060f57600080fd5b6102c65a03f1151561062057600080fd5b5050506040518051905050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561068d57600080fd5b600154610698610b33565b1115156106a457600080fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561076957600080fd5b6102c65a03f1151561077a57600080fd5b50505060405180519050905061078f81610b3b565b61079881610c9e565b6107a181610e0d565b6107aa81610f86565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561080857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561084457600080fd5b8060018190555081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60055481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b60075481565b600860149054906101000a900460ff1681565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156109a257600080fd5b6102c65a03f115156109b357600080fd5b50505060405180519050905090565b60035481565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610a0457600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a5f57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610afd57600080fd5b600154610b08610b33565b101515610b1457600080fd5b80610b1d610b33565b101515610b2957600080fd5b8060018190555050565b600043905090565b60006003806003811115610b4b57fe5b600860149054906101000a900460ff166003811115610b6657fe5b1415610c9957600754610b7761111d565b111515610b8357600080fd5b829150600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610c7457600080fd5b6102c65a03f11515610c8557600080fd5b5050506040518051905050610c98611125565b5b505050565b60006002806003811115610cae57fe5b600860149054906101000a900460ff166003811115610cc957fe5b1415610e0857600554610cda61111d565b111515610ce657600080fd5b600283811515610cf257fe5b049150600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610de357600080fd5b6102c65a03f11515610df457600080fd5b5050506040518051905050610e07611125565b5b505050565b60006001806003811115610e1d57fe5b600860149054906101000a900460ff166003811115610e3857fe5b1415610f8157600354610e4961111d565b111515610e5557600080fd5b6064610e6284601e611172565b811515610e6b57fe5b049150600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610f5c57600080fd5b6102c65a03f11515610f6d57600080fd5b5050506040518051905050610f80611125565b5b505050565b600080806003811115610f9557fe5b600860149054906101000a900460ff166003811115610fb057fe5b14156111185762eff100610fc261111d565b016003819055506301dfe200610fd661111d565b016005819055506301dfe200600554016007819055506064610ff9846028611172565b81151561100257fe5b049150600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156110f357600080fd5b6102c65a03f1151561110457600080fd5b5050506040518051905050611117611125565b5b505050565b600042905090565b6001600860149054906101000a900460ff16600381111561114257fe5b01600381111561114e57fe5b600860146101000a81548160ff0219169083600381111561116b57fe5b0217905550565b60008082840290506000841480611193575082848281151561119057fe5b04145b151561119b57fe5b80915050929150505600a165627a7a72305820dd0a0186af78b97345a9c7d5392555b1c35d38d77153ee2ccdef7247fa8df9c30029

   Swarm Source:
bzzr://dd0a0186af78b97345a9c7d5392555b1c35d38d77153ee2ccdef7247fa8df9c3

 

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.