ETH Price: $1,594.07 (+0.04%)
Gas: 7 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multi Chain

Multichain Addresses

1 address found via
Transaction Hash
Method
Block
From
To
Value
Claim139935172022-01-12 22:50:09619 days 13 hrs ago1642027809IN
Indexed Finance: Treasury Vester
0 ETH0.00897819189.68552626
Claim136051992021-11-13 3:04:37680 days 8 hrs ago1636772677IN
Indexed Finance: Treasury Vester
0 ETH0.01173651193.65274575
Claim135529962021-11-04 22:59:34688 days 12 hrs ago1636066774IN
Indexed Finance: Treasury Vester
0 ETH0.00695633114.77959581
Claim132845112021-09-23 21:52:30730 days 14 hrs ago1632433950IN
Indexed Finance: Treasury Vester
0 ETH0.0053776188.73079316
Claim130003382021-08-10 23:07:47774 days 12 hrs ago1628636867IN
Indexed Finance: Treasury Vester
0 ETH0.0035151458
Claim127665132021-07-05 8:50:34811 days 3 hrs ago1625475034IN
Indexed Finance: Treasury Vester
0 ETH0.0006666611
Claim126322712021-06-14 11:21:53832 days 31 mins ago1623669713IN
Indexed Finance: Treasury Vester
0 ETH0.0006666611
Claim124980912021-05-24 16:25:49852 days 19 hrs ago1621873549IN
Indexed Finance: Treasury Vester
0 ETH0.0052727287
Claim122614742021-04-18 2:44:52889 days 9 hrs ago1618713892IN
Indexed Finance: Treasury Vester
0 ETH0.0091515151
0x60806040114606902020-12-15 23:45:321012 days 12 hrs ago1608075932IN
 Create: TreasuryVester
0 ETH0.0247021550

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TreasuryVester

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 2 : TreasuryVester.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

import "@openzeppelin/contracts/math/SafeMath.sol";


contract TreasuryVester {
  using SafeMath for uint256;

  address public ndx;
  address public recipient;

  uint256 public vestingAmount;
  uint256 public vestingBegin;
  uint256 public vestingCliff;
  uint256 public vestingEnd;

  uint256 public lastUpdate;

  constructor(
    address ndx_,
    address recipient_,
    uint256 vestingAmount_,
    uint256 vestingBegin_,
    uint256 vestingCliff_,
    uint256 vestingEnd_
  ) public {
    require(
      vestingBegin_ >= block.timestamp,
      "TreasuryVester::constructor: vesting begin too early"
    );
    require(
      vestingCliff_ >= vestingBegin_,
      "TreasuryVester::constructor: cliff is too early"
    );
    require(
      vestingEnd_ > vestingCliff_,
      "TreasuryVester::constructor: end is too early"
    );

    ndx = ndx_;
    recipient = recipient_;

    vestingAmount = vestingAmount_;
    vestingBegin = vestingBegin_;
    vestingCliff = vestingCliff_;
    vestingEnd = vestingEnd_;

    lastUpdate = vestingBegin;
  }

  function setRecipient(address recipient_) public {
    require(
      msg.sender == recipient,
      "TreasuryVester::setRecipient: unauthorized"
    );
    recipient = recipient_;
  }

  function claim() public {
    require(
      block.timestamp >= vestingCliff,
      "TreasuryVester::claim: not time yet"
    );
    uint256 amount;
    if (block.timestamp >= vestingEnd) {
      amount = INdx(ndx).balanceOf(address(this));
    } else {
      amount = vestingAmount.mul(block.timestamp - lastUpdate).div(
        vestingEnd - vestingBegin
      );
      lastUpdate = block.timestamp;
    }
    INdx(ndx).transfer(recipient, amount);
  }
}

interface INdx {
  function balanceOf(address account) external view returns (uint256);
  function transfer(address dst, uint256 rawAmount) external returns (bool);
}

File 2 of 2 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

Settings
{
  "metadata": {
    "useLiteralContent": false
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"ndx_","type":"address"},{"internalType":"address","name":"recipient_","type":"address"},{"internalType":"uint256","name":"vestingAmount_","type":"uint256"},{"internalType":"uint256","name":"vestingBegin_","type":"uint256"},{"internalType":"uint256","name":"vestingCliff_","type":"uint256"},{"internalType":"uint256","name":"vestingEnd_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ndx","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient_","type":"address"}],"name":"setRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vestingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingBegin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingCliff","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50604051610738380380610738833981810160405260c081101561003357600080fd5b508051602082015160408301516060840151608085015160a0909501519394929391929091428310156100975760405162461bcd60e51b81526004018080602001828103825260348152602001806106a86034913960400191505060405180910390fd5b828210156100d65760405162461bcd60e51b815260040180806020018281038252602f8152602001806106dc602f913960400191505060405180910390fd5b8181116101145760405162461bcd60e51b815260040180806020018281038252602d81526020018061070b602d913960400191505060405180910390fd5b600080546001600160a01b039788166001600160a01b0319918216179091556001805496909716951694909417909455600291909155600381905560049290925560055560065561053e8061016a6000396000f3fe608060405234801561001057600080fd5b50600436106100925760003560e01c806379521b2c1161006657806379521b2c1461010557806384a1931f1461010d578063c046371114610115578063e29bc68b1461011d578063f3640e741461012557610092565b8062728f76146100975780633bbed4a0146100b15780634e71d92d146100d957806366d003ac146100e1575b600080fd5b61009f61012d565b60408051918252519081900360200190f35b6100d7600480360360208110156100c757600080fd5b50356001600160a01b0316610133565b005b6100d761019e565b6100e9610323565b604080516001600160a01b039092168252519081900360200190f35b6100e9610332565b61009f610341565b61009f610347565b61009f61034d565b61009f610353565b60025481565b6001546001600160a01b0316331461017c5760405162461bcd60e51b815260040180806020018281038252602a81526020018061049b602a913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004544210156101df5760405162461bcd60e51b81526004018080602001828103825260238152602001806104e66023913960400191505060405180910390fd5b6000600554421061026857600054604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561023557600080fd5b505afa158015610249573d6000803e3d6000fd5b505050506040513d602081101561025f57600080fd5b50519050610298565b6102916003546005540361028b600654420360025461035990919063ffffffff16565b906103bb565b4260065590505b600080546001546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018690529051919092169263a9059cbb92604480820193602093909283900390910190829087803b1580156102f457600080fd5b505af1158015610308573d6000803e3d6000fd5b505050506040513d602081101561031e57600080fd5b505050565b6001546001600160a01b031681565b6000546001600160a01b031681565b60055481565b60065481565b60035481565b60045481565b600082610368575060006103b5565b8282028284828161037557fe5b04146103b25760405162461bcd60e51b81526004018080602001828103825260218152602001806104c56021913960400191505060405180910390fd5b90505b92915050565b60006103b283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250600081836104845760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610449578181015183820152602001610431565b50505050905090810190601f1680156104765780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161049057fe5b049594505050505056fe54726561737572795665737465723a3a736574526563697069656e743a20756e617574686f72697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7754726561737572795665737465723a3a636c61696d3a206e6f742074696d6520796574a2646970667358221220dd8a8b82521b75f4e68f7715595e2ddc25b9b5bd80a0855e7cbb7a1bc510767f64736f6c634300060c003354726561737572795665737465723a3a636f6e7374727563746f723a2076657374696e6720626567696e20746f6f206561726c7954726561737572795665737465723a3a636f6e7374727563746f723a20636c69666620697320746f6f206561726c7954726561737572795665737465723a3a636f6e7374727563746f723a20656e6420697320746f6f206561726c7900000000000000000000000086772b1409b61c639eaac9ba0acfbb6e238e5f8300000000000000000000000078a3ef33cf033381feb43ba4212f2af5a5a0a2ea000000000000000000000000000000000000000000027b46536c66c8e3000000000000000000000000000000000000000000000000000000000000005fee660000000000000000000000000000000000000000000000000000000000603c2e800000000000000000000000000000000000000000000000000000000061cf9980

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100925760003560e01c806379521b2c1161006657806379521b2c1461010557806384a1931f1461010d578063c046371114610115578063e29bc68b1461011d578063f3640e741461012557610092565b8062728f76146100975780633bbed4a0146100b15780634e71d92d146100d957806366d003ac146100e1575b600080fd5b61009f61012d565b60408051918252519081900360200190f35b6100d7600480360360208110156100c757600080fd5b50356001600160a01b0316610133565b005b6100d761019e565b6100e9610323565b604080516001600160a01b039092168252519081900360200190f35b6100e9610332565b61009f610341565b61009f610347565b61009f61034d565b61009f610353565b60025481565b6001546001600160a01b0316331461017c5760405162461bcd60e51b815260040180806020018281038252602a81526020018061049b602a913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004544210156101df5760405162461bcd60e51b81526004018080602001828103825260238152602001806104e66023913960400191505060405180910390fd5b6000600554421061026857600054604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561023557600080fd5b505afa158015610249573d6000803e3d6000fd5b505050506040513d602081101561025f57600080fd5b50519050610298565b6102916003546005540361028b600654420360025461035990919063ffffffff16565b906103bb565b4260065590505b600080546001546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018690529051919092169263a9059cbb92604480820193602093909283900390910190829087803b1580156102f457600080fd5b505af1158015610308573d6000803e3d6000fd5b505050506040513d602081101561031e57600080fd5b505050565b6001546001600160a01b031681565b6000546001600160a01b031681565b60055481565b60065481565b60035481565b60045481565b600082610368575060006103b5565b8282028284828161037557fe5b04146103b25760405162461bcd60e51b81526004018080602001828103825260218152602001806104c56021913960400191505060405180910390fd5b90505b92915050565b60006103b283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250600081836104845760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610449578181015183820152602001610431565b50505050905090810190601f1680156104765780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161049057fe5b049594505050505056fe54726561737572795665737465723a3a736574526563697069656e743a20756e617574686f72697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7754726561737572795665737465723a3a636c61696d3a206e6f742074696d6520796574a2646970667358221220dd8a8b82521b75f4e68f7715595e2ddc25b9b5bd80a0855e7cbb7a1bc510767f64736f6c634300060c0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000086772b1409b61c639eaac9ba0acfbb6e238e5f8300000000000000000000000078a3ef33cf033381feb43ba4212f2af5a5a0a2ea000000000000000000000000000000000000000000027b46536c66c8e3000000000000000000000000000000000000000000000000000000000000005fee660000000000000000000000000000000000000000000000000000000000603c2e800000000000000000000000000000000000000000000000000000000061cf9980

-----Decoded View---------------
Arg [0] : ndx_ (address): 0x86772b1409b61c639EaAc9Ba0AcfBb6E238e5F83
Arg [1] : recipient_ (address): 0x78a3eF33cF033381FEB43ba4212f2Af5A5A0a2EA
Arg [2] : vestingAmount_ (uint256): 3000000000000000000000000
Arg [3] : vestingBegin_ (uint256): 1609459200
Arg [4] : vestingCliff_ (uint256): 1614556800
Arg [5] : vestingEnd_ (uint256): 1640995200

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 00000000000000000000000086772b1409b61c639eaac9ba0acfbb6e238e5f83
Arg [1] : 00000000000000000000000078a3ef33cf033381feb43ba4212f2af5a5a0a2ea
Arg [2] : 000000000000000000000000000000000000000000027b46536c66c8e3000000
Arg [3] : 000000000000000000000000000000000000000000000000000000005fee6600
Arg [4] : 00000000000000000000000000000000000000000000000000000000603c2e80
Arg [5] : 0000000000000000000000000000000000000000000000000000000061cf9980


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.