Contract 0xc7574fECf491849C997A4e050E136de542eD51C9

 

Contract Overview

Balance:
0 BNB

BNB Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x4eef41d2de477584cc546edf2c41242b1a4c40680cc6f2d2908ef3d46ebfd9ca0x6080604089798292021-07-08 15:14:33104 days 1 hr agoBiShares Finance: Deployer IN  Contract Creation0 BNB0.00554179
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DegelatingTeamVester

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 2 : DegelatingTeamVester.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

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


contract DegelatingTeamVester {
  using SafeMath for uint256;

  address public bison;
  address public recipient;
  address public admin; 

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

  uint256 public lastUpdate;

  constructor(
    address bison_,
    address admin_,
    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"
    );

    bison = bison_;
    recipient = recipient_;
    admin = admin_; 
    vestingAmount = vestingAmount_;
    vestingBegin = vestingBegin_;
    vestingCliff = vestingCliff_;
    vestingEnd = vestingEnd_;

    lastUpdate = vestingBegin;
  }

  function delegate(address delegatee) external {
    require(
      msg.sender == admin,
      "DelegatingVester::delegate: unauthorized"
    );
    IBison(bison).delegate(delegatee);
  }

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

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

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

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

pragma solidity >=0.6.0 <0.8.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, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @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) {
        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, reverting 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) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * 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);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"bison_","type":"address"},{"internalType":"address","name":"admin_","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":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bison","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"}]

608060405234801561001057600080fd5b50604051610802380380610802833981810160405260e081101561003357600080fd5b508051602082015160408301516060840151608085015160a086015160c09096015194959394929391929091904283101561009f5760405162461bcd60e51b81526004018080602001828103825260348152602001806107726034913960400191505060405180910390fd5b828210156100de5760405162461bcd60e51b815260040180806020018281038252602f8152602001806107a6602f913960400191505060405180910390fd5b81811161011c5760405162461bcd60e51b815260040180806020018281038252602d8152602001806107d5602d913960400191505060405180910390fd5b600080546001600160a01b039889166001600160a01b03199182161790915560018054968916968216969096179095556002805496909716959094169490941790945560035560048390556005919091556006556007556105f0806101826000396000f3fe608060405234801561001057600080fd5b50600436106100a85760003560e01c806366d003ac1161007157806366d003ac1461014157806384a1931f14610149578063c046371114610151578063e29bc68b14610159578063f3640e7414610161578063f851a44014610169576100a8565b8062728f76146100ad5780630a7379a2146100c75780633bbed4a0146100eb5780634e71d92d146101135780635c19a95c1461011b575b600080fd5b6100b5610171565b60408051918252519081900360200190f35b6100cf610177565b604080516001600160a01b039092168252519081900360200190f35b6101116004803603602081101561010157600080fd5b50356001600160a01b0316610186565b005b6101116101f1565b6101116004803603602081101561013157600080fd5b50356001600160a01b0316610376565b6100cf610425565b6100b5610434565b6100b561043a565b6100b5610440565b6100b5610446565b6100cf61044c565b60035481565b6000546001600160a01b031681565b6002546001600160a01b031633146101cf5760405162461bcd60e51b815260040180806020018281038252602a81526020018061054d602a913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6005544210156102325760405162461bcd60e51b81526004018080602001828103825260238152602001806105986023913960400191505060405180910390fd5b600060065442106102bb57600054604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561028857600080fd5b505afa15801561029c573d6000803e3d6000fd5b505050506040513d60208110156102b257600080fd5b505190506102eb565b6102e4600454600654036102de600754420360035461045b90919063ffffffff16565b906104bd565b4260075590505b600080546001546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018690529051919092169263a9059cbb92604480820193602093909283900390910190829087803b15801561034757600080fd5b505af115801561035b573d6000803e3d6000fd5b505050506040513d602081101561037157600080fd5b505050565b6002546001600160a01b031633146103bf5760405162461bcd60e51b81526004018080602001828103825260288152602001806105256028913960400191505060405180910390fd5b60008054604080516317066a5760e21b81526001600160a01b03858116600483015291519190921692635c19a95c926024808201939182900301818387803b15801561040a57600080fd5b505af115801561041e573d6000803e3d6000fd5b5050505050565b6001546001600160a01b031681565b60065481565b60075481565b60045481565b60055481565b6002546001600160a01b031681565b60008261046a575060006104b7565b8282028284828161047757fe5b04146104b45760405162461bcd60e51b81526004018080602001828103825260218152602001806105776021913960400191505060405180910390fd5b90505b92915050565b6000808211610513576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161051c57fe5b04939250505056fe44656c65676174696e675665737465723a3a64656c65676174653a20756e617574686f72697a656454726561737572795665737465723a3a736574526563697069656e743a20756e617574686f72697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7754726561737572795665737465723a3a636c61696d3a206e6f742074696d6520796574a2646970667358221220c77696562ce72ab7226bf40c7d28a77c5fc9745cf259a1cf3b46815053132b3064736f6c634300060c003354726561737572795665737465723a3a636f6e7374727563746f723a2076657374696e6720626567696e20746f6f206561726c7954726561737572795665737465723a3a636f6e7374727563746f723a20636c69666620697320746f6f206561726c7954726561737572795665737465723a3a636f6e7374727563746f723a20656e6420697320746f6f206561726c7900000000000000000000000019a6da6e382b85f827088092a3dbe864d9ccba7300000000000000000000000060731c18edd8a0fd2a0d0c8b6462c8026e1939a700000000000000000000000015ddd3f0aad47a345cf55c5af4410b042846e4c90000000000000000000000000000000000000000000023ffb7ed6565d64000000000000000000000000000000000000000000000000000000000000061211bf80000000000000000000000000000000000000000000000000000000061997d45000000000000000000000000000000000000000000000000000000006a88b62e

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

00000000000000000000000019a6da6e382b85f827088092a3dbe864d9ccba7300000000000000000000000060731c18edd8a0fd2a0d0c8b6462c8026e1939a700000000000000000000000015ddd3f0aad47a345cf55c5af4410b042846e4c90000000000000000000000000000000000000000000023ffb7ed6565d64000000000000000000000000000000000000000000000000000000000000061211bf80000000000000000000000000000000000000000000000000000000061997d45000000000000000000000000000000000000000000000000000000006a88b62e

-----Decoded View---------------
Arg [0] : bison_ (address): 0x19a6da6e382b85f827088092a3dbe864d9ccba73
Arg [1] : admin_ (address): 0x60731c18edd8a0fd2a0d0c8b6462c8026e1939a7
Arg [2] : recipient_ (address): 0x15ddd3f0aad47a345cf55c5af4410b042846e4c9
Arg [3] : vestingAmount_ (uint256): 170000000000000000000000
Arg [4] : vestingBegin_ (uint256): 1629559800
Arg [5] : vestingCliff_ (uint256): 1637449029
Arg [6] : vestingEnd_ (uint256): 1787344430

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 00000000000000000000000019a6da6e382b85f827088092a3dbe864d9ccba73
Arg [1] : 00000000000000000000000060731c18edd8a0fd2a0d0c8b6462c8026e1939a7
Arg [2] : 00000000000000000000000015ddd3f0aad47a345cf55c5af4410b042846e4c9
Arg [3] : 0000000000000000000000000000000000000000000023ffb7ed6565d6400000
Arg [4] : 0000000000000000000000000000000000000000000000000000000061211bf8
Arg [5] : 0000000000000000000000000000000000000000000000000000000061997d45
Arg [6] : 000000000000000000000000000000000000000000000000000000006a88b62e


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.