Contract 0x529a916B8B7EC8E01805D45AEd1109C764ea88B9

Contract Overview

Balance:
0 Ether

Token:
Txn Hash
Method
Block
From
To
Value
0x9365539f6ce995d14f1cff07188779b7ed2d63fdf07b925f8307f34afa647f6fClaim80972482021-02-18 22:33:49501 days 2 hrs ago0xa57d294c3a11fb542d524062ae4c5100e0e373ec IN  0x529a916b8b7ec8e01805d45aed1109c764ea88b90 Ether0.000068861
0x99c808382f8c4b12fa84a92f0c5e1afa2937de719b826e64aabfe02da911b3ed0x6080604080795352021-02-15 20:41:17504 days 4 hrs ago0x085f26b543b330a4a97cbf3df66e1fd44e7c0bf6 IN  Contract Creation0 Ether0.000495141
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x9365539f6ce995d14f1cff07188779b7ed2d63fdf07b925f8307f34afa647f6f80972482021-02-18 22:33:49501 days 2 hrs ago 0x529a916b8b7ec8e01805d45aed1109c764ea88b9 0xc4e90a8dc6caab329f08ed3c8abc6b197cf0f40a0 Ether
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x7B42f0F4cEDD22C453832ce4cFBf0a5A67B21396

Contract Name:
TreasuryVester

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Multiple files format)

File 2 of 2: TreasuryVester.sol
pragma solidity ^0.5.16;

import "./SafeMath.sol";

contract TreasuryVester {
    using SafeMath for uint;

    address public pool;
    address public recipient;

    uint public vestingAmount;
    uint public vestingBegin;
    uint public vestingCliff;
    uint public vestingEnd;

    uint public lastUpdate;

    constructor(
        address pool_,
        address recipient_,
        uint vestingAmount_,
        uint vestingBegin_,
        uint vestingCliff_,
        uint 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');

        pool = pool_;
        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');
        uint amount;
        if (block.timestamp >= vestingEnd) {
            amount = IERC20(pool).balanceOf(address(this));
        } else {
            amount = vestingAmount.mul(block.timestamp - lastUpdate).div(vestingEnd - vestingBegin);
            lastUpdate = block.timestamp;
        }
        IERC20(pool).transfer(recipient, amount);
    }
}

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

File 1 of 2: SafeMath.sol
pragma solidity ^0.5.16;

// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol
// Subject to the MIT license.

/**
 * @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 addition of two unsigned integers, reverting with custom message on overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, errorMessage);

        return c;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot underflow.
     */
    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 multiplication of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b, string memory errorMessage) 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, errorMessage);

        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) {
        // Solidity only automatically asserts when dividing by 0
        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;
    }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"pool_","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"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":false,"inputs":[],"name":"claim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lastUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pool","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"recipient","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient_","type":"address"}],"name":"setRecipient","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"vestingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vestingBegin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vestingCliff","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vestingEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5060405161073d38038061073d833981810160405260c081101561003357600080fd5b508051602082015160408301516060840151608085015160a0909501519394929391929091428310156100975760405162461bcd60e51b81526004018080602001828103825260348152602001806106ad6034913960400191505060405180910390fd5b828210156100d65760405162461bcd60e51b815260040180806020018281038252602f8152602001806106e1602f913960400191505060405180910390fd5b8181116101145760405162461bcd60e51b815260040180806020018281038252602d815260200180610710602d913960400191505060405180910390fd5b600080546001600160a01b039788166001600160a01b031991821617909155600180549690971695169490941790945560029190915560038190556004929092556005556006556105438061016a6000396000f3fe608060405234801561001057600080fd5b50600436106100925760003560e01c806366d003ac1161006657806366d003ac1461010557806384a1931f1461010d578063c046371114610115578063e29bc68b1461011d578063f3640e741461012557610092565b8062728f761461009757806316f0115b146100b15780633bbed4a0146100d55780634e71d92d146100fd575b600080fd5b61009f61012d565b60408051918252519081900360200190f35b6100b9610133565b604080516001600160a01b039092168252519081900360200190f35b6100fb600480360360208110156100eb57600080fd5b50356001600160a01b0316610142565b005b6100fb6101ad565b6100b9610338565b61009f610347565b61009f61034d565b61009f610353565b61009f610359565b60025481565b6000546001600160a01b031681565b6001546001600160a01b0316331461018b5760405162461bcd60e51b815260040180806020018281038252602a8152602001806104a1602a913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004544210156101ee5760405162461bcd60e51b81526004018080602001828103825260238152602001806104ec6023913960400191505060405180910390fd5b6000600554421061027757600054604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561024457600080fd5b505afa158015610258573d6000803e3d6000fd5b505050506040513d602081101561026e57600080fd5b505190506102ad565b6102a66003546005540361029a600654420360025461035f90919063ffffffff16565b9063ffffffff6103c116565b4260065590505b600080546001546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018690529051919092169263a9059cbb92604480820193602093909283900390910190829087803b15801561030957600080fd5b505af115801561031d573d6000803e3d6000fd5b505050506040513d602081101561033357600080fd5b505050565b6001546001600160a01b031681565b60055481565b60065481565b60035481565b60045481565b60008261036e575060006103bb565b8282028284828161037b57fe5b04146103b85760405162461bcd60e51b81526004018080602001828103825260218152602001806104cb6021913960400191505060405180910390fd5b90505b92915050565b60006103b883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506000818361048a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561044f578181015183820152602001610437565b50505050905090810190601f16801561047c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161049657fe5b049594505050505056fe54726561737572795665737465723a3a736574526563697069656e743a20756e617574686f72697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7754726561737572795665737465723a3a636c61696d3a206e6f742074696d6520796574a265627a7a72315820f8b7b2c569919e6b230c9efabc4514b7d01d0989931df96ebe7164a5772430e264736f6c6343000510003254726561737572795665737465723a3a636f6e7374727563746f723a2076657374696e6720626567696e20746f6f206561726c7954726561737572795665737465723a3a636f6e7374727563746f723a20636c69666620697320746f6f206561726c7954726561737572795665737465723a3a636f6e7374727563746f723a20656e6420697320746f6f206561726c79000000000000000000000000eae2de7ba52298a535c59d37bae409ccecade234000000000000000000000000b66cef614c7b8fa72c9df0f1f190fcd245608bc900000000000000000000000000000000000000000000000000000000005b8d80000000000000000000000000000000000000000000000000000000006014656700000000000000000000000000000000000000000000000000000000601465670000000000000000000000000000000000000000000000000000000063d6c97c

Deployed ByteCode Sourcemap

52:1659:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;52:1659:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;168:25;;;:::i;:::-;;;;;;;;;;;;;;;;112:19;;;:::i;:::-;;;;-1:-1:-1;;;;;112:19:1;;;;;;;;;;;;;;1061:176;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1061:176:1;-1:-1:-1;;;;;1061:176:1;;:::i;:::-;;1243:466;;;:::i;137:24::-;;;:::i;259:22::-;;;:::i;288:::-;;;:::i;199:24::-;;;:::i;229:::-;;;:::i;168:25::-;;;;:::o;112:19::-;;;-1:-1:-1;;;;;112:19:1;;:::o;1061:176::-;1142:9;;-1:-1:-1;;;;;1142:9:1;1128:10;:23;1120:78;;;;-1:-1:-1;;;1120:78:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1208:9;:22;;-1:-1:-1;;;;;;1208:22:1;-1:-1:-1;;;;;1208:22:1;;;;;;;;;;1061:176::o;1243:466::-;1304:12;;1285:15;:31;;1277:79;;;;-1:-1:-1;;;1277:79:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1366:11;1410:10;;1391:15;:29;1387:266;;1452:4;;1445:37;;;-1:-1:-1;;;1445:37:1;;1476:4;1445:37;;;;;;-1:-1:-1;;;;;1452:4:1;;;;1445:22;;:37;;;;;;;;;;;;;;;1452:4;1445:37;;;5:2:-1;;;;30:1;27;20:12;5:2;1445:37:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1445:37:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1445:37:1;;-1:-1:-1;1387:266:1;;;1522:78;1587:12;;1574:10;;:25;1522:47;1558:10;;1540:15;:28;1522:13;;:17;;:47;;;;:::i;:::-;:51;:78;:51;:78;:::i;:::-;1627:15;1614:10;:28;1513:87;-1:-1:-1;1387:266:1;1669:4;;;;1684:9;1662:40;;;-1:-1:-1;;;1662:40:1;;-1:-1:-1;;;;;1684:9:1;;;1662:40;;;;;;;;;;;;1669:4;;;;;1662:21;;:40;;;;;;;;;;;;;;;;;;1669:4;1662:40;;;5:2:-1;;;;30:1;27;20:12;5:2;1662:40:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1662:40:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;1243:466:1:o;137:24::-;;;-1:-1:-1;;;;;137:24:1;;:::o;259:22::-;;;;:::o;288:::-;;;;:::o;199:24::-;;;;:::o;229:::-;;;;:::o;2656:459:0:-;2714:7;2955:6;2951:45;;-1:-1:-1;2984:1:0;2977:8;;2951:45;3018:5;;;3022:1;3018;:5;:1;3041:5;;;;;:10;3033:56;;;;-1:-1:-1;;;3033:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3107:1;-1:-1:-1;2656:459:0;;;;;:::o;4267:130::-;4325:7;4351:39;4355:1;4358;4351:39;;;;;;;;;;;;;;;;;4958:7;5058:12;5051:5;5043:28;;;;-1:-1:-1;;;5043:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;5043:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5081:9;5097:1;5093;:5;;;;;;;4872:338;-1:-1:-1;;;;;4872:338:0:o

Swarm Source

bzzr://f8b7b2c569919e6b230c9efabc4514b7d01d0989931df96ebe7164a5772430e2
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading

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.