ETH Price: $3,267.08 (+3.03%)
Gas: 2 Gwei

Contract

0x62E1a2E112fF4215B510F7eEa04B75E161C57c00
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Up Tap113565012020-11-29 23:17:501334 days ago1606691870IN
0x62E1a2E1...161C57c00
0 ETH0.0014819820
0x60806040113564862020-11-29 23:15:131334 days ago1606691713IN
 Create: Tap
0 ETH0.032266120

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Tap

Compiler Version
v0.6.2+commit.bacdbe57

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion
File 1 of 8 : Tap.sol
pragma solidity ^0.6.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./interfaces/ITap.sol";
import "./interfaces/IFundraisingController.sol";
import "./interfaces/IBatchedBancor.sol";



contract Tap is ITap, Ownable  {
    using SafeMath  for uint256;


    uint256 public constant PCT_BASE = 10 ** 18; // 0% = 0; 1% = 10 ** 16; 100% = 10 ** 18

    IFundraisingController       public controller;
    IBatchedBancor               public batchedBan;
    address                      public beneficiary;
    address                      public dao;
    uint256                      public batchBlocks;
    uint256                      public maximumTapRateIncreasePct;
    uint256                      public maximumTapFloorDecreasePct;

    mapping (address => uint256) public tappedAmounts;
    mapping (address => uint256) public rates;
    mapping (address => uint256) public floors;
    mapping (address => uint256) public lastTappedAmountUpdates; // batch ids [block numbers]
    mapping (address => uint256) public lastTapUpdates;  // timestamps

    event UpdateBeneficiary               (address indexed beneficiary);
    event UpdateMaximumTapRateIncreasePct (uint256 maximumTapRateIncreasePct);
    event UpdateMaximumTapFloorDecreasePct(uint256 maximumTapFloorDecreasePct);
    event AddTappedToken                  (address indexed token, uint256 rate, uint256 floor);
    event RemoveTappedToken               (address indexed token);
    event UpdateTappedToken               (address indexed token, uint256 rate, uint256 floor);
    event ResetTappedToken                (address indexed token);
    event UpdateTappedAmount              (address indexed token, uint256 tappedAmount);
    event Withdraw                        (address indexed token, uint256 amount);


    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyDAO() {
        require(dao == msg.sender, "DAO: caller is not the DAO");
        _;
    }

    /***** external functions *****/

    /**
     * @notice Initialize tap
     * @param _beneficiary                The address of the beneficiary [to whom funds are to be withdrawn]
     * @param _batchBlocks                The number of blocks batches are to last
     * @param _maximumTapRateIncreasePct  The maximum tap rate increase percentage allowed [in PCT_BASE]
     * @param _maximumTapFloorDecreasePct The maximum tap floor decrease percentage allowed [in PCT_BASE]
    */
    constructor (
        address _dao,
        address _beneficiary,
        uint256 _batchBlocks,
        uint256 _maximumTapRateIncreasePct,
        uint256 _maximumTapFloorDecreasePct
    )
        public
    {

        require(_beneficiaryIsValid(_beneficiary), "Invalid Beneficiary");
        require(_batchBlocks != 0, "Batch Block cannot equal zero");
        require(_maximumTapFloorDecreasePctIsValid(_maximumTapFloorDecreasePct), "Invalid Floor Decrease");

        beneficiary = _beneficiary;
        batchBlocks = _batchBlocks;
        maximumTapRateIncreasePct = _maximumTapRateIncreasePct;
        maximumTapFloorDecreasePct = _maximumTapFloorDecreasePct;
        dao = _dao;
    }

    function setUpTap(
      IFundraisingController _controller,
      IBatchedBancor _batchedBan
      ) public onlyOwner {
        controller = _controller;
        batchedBan = _batchedBan;
        transferOwnership(address(_controller));
      }

    /**
     * @notice Update beneficiary to `_beneficiary`
     * @param _beneficiary The address of the new beneficiary [to whom funds are to be withdrawn]
    */
    function updateBeneficiary(address _beneficiary) external onlyOwner override {
        require(_beneficiaryIsValid(_beneficiary), "Invalid Beneficiary");

        _updateBeneficiary(_beneficiary);
    }

    /**
     * @notice Update maximum tap rate increase percentage to `@formatPct(_maximumTapRateIncreasePct)`%
     * @param _maximumTapRateIncreasePct The new maximum tap rate increase percentage to be allowed [in PCT_BASE]
    */
    function updateMaximumTapRateIncreasePct(uint256 _maximumTapRateIncreasePct) external onlyOwner override {
        _updateMaximumTapRateIncreasePct(_maximumTapRateIncreasePct);
    }

    /**
     * @notice Update maximum tap floor decrease percentage to `@formatPct(_maximumTapFloorDecreasePct)`%
     * @param _maximumTapFloorDecreasePct The new maximum tap floor decrease percentage to be allowed [in PCT_BASE]
    */
    function updateMaximumTapFloorDecreasePct(uint256 _maximumTapFloorDecreasePct) external onlyOwner override {
        require(_maximumTapFloorDecreasePctIsValid(_maximumTapFloorDecreasePct), "Invalid floor decrease");

        _updateMaximumTapFloorDecreasePct(_maximumTapFloorDecreasePct);
    }

    /**
     * @notice Add tap for `_token.symbol(): string` with a rate of `@tokenAmount(_token, _rate)` per block and a floor of `@tokenAmount(_token, _floor)`
     * @param _token The address of the token to be tapped
     * @param _rate  The rate at which that token is to be tapped [in wei / block]
     * @param _floor The floor above which the reserve [pool] balance for that token is to be kept [in wei]
    */
    function addTappedToken(address _token, uint256 _rate, uint256 _floor) external onlyOwner override {
        require(!_tokenIsTapped(_token), "Token is already tapped");
        require(_tapRateIsValid(_rate), "Invalid tap rate");

        _addTappedToken(_token, _rate, _floor);
    }

    /**
     * @notice Remove tap for `_token.symbol(): string`
     * @param _token The address of the token to be un-tapped
    */
    function removeTappedToken(address _token) external onlyOwner {
        require(_tokenIsTapped(_token), "Token is not tapped");

        _removeTappedToken(_token);
    }

    /**
     * @notice Update tap for `_token.symbol(): string` with a rate of `@tokenAmount(_token, _rate)` per block and a floor of `@tokenAmount(_token, _floor)`
     * @param _token The address of the token whose tap is to be updated
     * @param _rate  The new rate at which that token is to be tapped [in wei / block]
     * @param _floor The new floor above which the reserve [pool] balance for that token is to be kept [in wei]
    */
    function updateTappedToken(address _token, uint256 _rate, uint256 _floor) external onlyOwner override {
        require(_tokenIsTapped(_token), "Token is not tapped");
        require(_tapRateIsValid(_rate), "Invalid tap rate");
        require(_tapUpdateIsValid(_token, _rate, _floor), "Invalid tap update");

        _updateTappedToken(_token, _rate, _floor);
    }

    /**
     * @notice Reset tap timestamps for `_token.symbol(): string`
     * @param _token The address of the token whose tap timestamps are to be reset
    */
    function resetTappedToken(address _token) external onlyOwner override {
        require(_tokenIsTapped(_token), "Token is not tapped");

        _resetTappedToken(_token);
    }

    /**
     * @notice Update tapped amount for `_token.symbol(): string`
     * @param _token The address of the token whose tapped amount is to be updated
    */
    function updateTappedAmount(address _token) external override {
        require(_tokenIsTapped(_token), "Token is not tapped");

        _updateTappedAmount(_token);
    }

    /**
     * @notice Transfer about `@tokenAmount(_token, self.getMaximalWithdrawal(_token): uint256)` from `self.reserve()` to `self.beneficiary()`
     * @param _token The address of the token to be transfered
    */
    function withdraw(address _token, uint _amount) external onlyDAO override {
        require(_tokenIsTapped(_token), "Token is not tapped");
        require(_amount > 0, "Withdraw amount is zero");

        _withdraw(_token, _amount);
    }

    /***** public view functions *****/

    function getMaximumWithdrawal(address _token) public view override returns (uint256) {
        return _tappedAmount(_token);
    }

    function getRates(address _token) public view override returns (uint256) {
        return rates[_token];
    }

    /***** internal functions *****/

    /* computation functions */

    function _currentBatchId() internal view returns (uint256) {
        return (block.number.div(batchBlocks)).mul(batchBlocks);
    }

    function _tappedAmount(address _token) internal view returns (uint256) {
        uint256 toBeKept = controller.collateralsToBeClaimed(_token).add(floors[_token]);
          IERC20 token = IERC20(_token);
        uint256 balance = token.balanceOf(address(batchedBan));
        uint256 flow = (_currentBatchId().sub(lastTappedAmountUpdates[_token])).mul(rates[_token]);
        uint256 tappedAmount = tappedAmounts[_token].add(flow);
        /**
         * whatever happens enough collateral should be
         * kept in the reserve pool to guarantee that
         * its balance is kept above the floor once
         * all pending sell orders are claimed
        */

        /**
         * the reserve's balance is already below the balance to be kept
         * the tapped amount should be reset to zero
        */
        if (balance <= toBeKept) {
            return 0;
        }

        /**
         * the reserve's balance minus the upcoming tap flow would be below the balance to be kept
         * the flow should be reduced to balance - toBeKept
        */
        if (balance <= toBeKept.add(tappedAmount)) {
            return balance.sub(toBeKept);
        }

        /**
         * the reserve's balance minus the upcoming flow is above the balance to be kept
         * the flow can be added to the tapped amount
        */
        return tappedAmount;
    }

    /* check functions */

    function _beneficiaryIsValid(address _beneficiary) internal pure returns (bool) {
        return _beneficiary != address(0);
    }

    function _maximumTapFloorDecreasePctIsValid(uint256 _maximumTapFloorDecreasePct) internal pure returns (bool) {
        return _maximumTapFloorDecreasePct <= PCT_BASE;
    }


    function _tokenIsTapped(address _token) internal view returns (bool) {
        return rates[_token] != uint256(0);
    }

    function _tapRateIsValid(uint256 _rate) internal pure returns (bool) {
        return _rate != 0;
    }

    function _tapUpdateIsValid(address _token, uint256 _rate, uint256 _floor) internal view returns (bool) {
        return _tapRateUpdateIsValid(_token, _rate) && _tapFloorUpdateIsValid(_token, _floor);
    }

    function _tapRateUpdateIsValid(address _token, uint256 _rate) internal view returns (bool) {
        uint256 rate = rates[_token];

        if (_rate <= rate) {
            return true;
        }

        if (now < lastTapUpdates[_token] + 30 days) {
            return false;
        }

        if (_rate.mul(PCT_BASE) <= rate.mul(PCT_BASE.add(maximumTapRateIncreasePct))) {
            return true;
        }

        return false;
    }

    function _tapFloorUpdateIsValid(address _token, uint256 _floor) internal view returns (bool) {
        uint256 floor = floors[_token];

        if (_floor >= floor) {
            return true;
        }

        if (now < lastTapUpdates[_token] + 30 days) {
            return false;
        }

        if (maximumTapFloorDecreasePct >= PCT_BASE) {
            return true;
        }

        if (_floor.mul(PCT_BASE) >= floor.mul(PCT_BASE.sub(maximumTapFloorDecreasePct))) {
            return true;
        }

        return false;
    }

    /* state modifying functions */

    function _updateTappedAmount(address _token) internal returns (uint256) {
        uint256 tappedAmount = _tappedAmount(_token);
        lastTappedAmountUpdates[_token] = _currentBatchId();
        tappedAmounts[_token] = tappedAmount;

        emit UpdateTappedAmount(_token, tappedAmount);

        return tappedAmount;
    }

    function _updateBeneficiary(address _beneficiary) internal {
        beneficiary = _beneficiary;

        emit UpdateBeneficiary(_beneficiary);
    }

    function _updateMaximumTapRateIncreasePct(uint256 _maximumTapRateIncreasePct) internal {
        maximumTapRateIncreasePct = _maximumTapRateIncreasePct;

        emit UpdateMaximumTapRateIncreasePct(_maximumTapRateIncreasePct);
    }

    function _updateMaximumTapFloorDecreasePct(uint256 _maximumTapFloorDecreasePct) internal {
        maximumTapFloorDecreasePct = _maximumTapFloorDecreasePct;

        emit UpdateMaximumTapFloorDecreasePct(_maximumTapFloorDecreasePct);
    }

    function _addTappedToken(address _token, uint256 _rate, uint256 _floor) internal {
        /**
         * NOTE
         * 1. if _token is tapped in the middle of a batch it will
         * reach the next batch faster than what it normally takes
         * to go through a batch [e.g. one block later]
         * 2. this will allow for a higher withdrawal than expected
         * a few blocks after _token is tapped
         * 3. this is not a problem because this extra amount is
         * static [at most rates[_token] * batchBlocks] and does
         * not increase in time
        */
        rates[_token] = _rate;
        floors[_token] = _floor;
        lastTappedAmountUpdates[_token] = _currentBatchId();
        lastTapUpdates[_token] = now;

        emit AddTappedToken(_token, _rate, _floor);
    }

    function _removeTappedToken(address _token) internal {
        delete tappedAmounts[_token];
        delete rates[_token];
        delete floors[_token];
        delete lastTappedAmountUpdates[_token];
        delete lastTapUpdates[_token];

        emit RemoveTappedToken(_token);
    }

    function _updateTappedToken(address _token, uint256 _rate, uint256 _floor) internal {
        /**
         * NOTE
         * withdraw before updating to keep the reserve
         * actual balance [balance - virtual withdrawal]
         * continuous in time [though a floor update can
         * still break this continuity]
        */
        uint256 amount = _updateTappedAmount(_token);
        if (amount > 0) {
            _withdraw(_token, amount);
        }

        rates[_token] = _rate;
        floors[_token] = _floor;
        lastTapUpdates[_token] = now;

        emit UpdateTappedToken(_token, _rate, _floor);
    }

    function _resetTappedToken(address _token) internal {
        tappedAmounts[_token] = 0;
        lastTappedAmountUpdates[_token] = _currentBatchId();
        lastTapUpdates[_token] = now;

        emit ResetTappedToken(_token);
    }

    function _withdraw(address _token, uint256 _amount) internal {
        IERC20 token = IERC20(_token);
        uint256 balance = token.balanceOf(address(batchedBan));
        require(balance > _amount);
        batchedBan.transfer(_token, _amount); // vault contract's transfer method already reverts on error

        emit Withdraw(_token, _amount);
    }
}

File 2 of 8 : IBatchedBancor.sol
pragma solidity ^0.6.0;


abstract contract IBatchedBancor {
  function transfer(address _token, uint _amount) public virtual;
}

File 3 of 8 : IFundraisingController.sol
pragma solidity ^0.6.0;


abstract contract IFundraisingController {
    function openTrading() external virtual;
    function updateTappedAmount(address _token) external virtual;
    function collateralsToBeClaimed(address _collateral) public view virtual returns (uint256);
    function balanceOf(address _who, address _token) public view virtual returns (uint256);
}

File 4 of 8 : ITap.sol
pragma solidity ^0.6.0;


abstract contract ITap {
     function updateBeneficiary(address _beneficiary) external virtual;
     function updateMaximumTapRateIncreasePct(uint256 _maximumTapRateIncreasePct) external virtual;
     function updateMaximumTapFloorDecreasePct(uint256 _maximumTapFloorDecreasePct) external virtual;
     function addTappedToken(address _token, uint256 _rate, uint256 _floor) external virtual;
     function updateTappedToken(address _token, uint256 _rate, uint256 _floor) external virtual;
     function resetTappedToken(address _token) external virtual;
     function updateTappedAmount(address _token) external virtual;
     function withdraw(address _token, uint _amount) external virtual;
     function getMaximumWithdrawal(address _token) public view virtual returns (uint256);
     function getRates(address _token) public view virtual returns (uint256);
 }

File 5 of 8 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 6 of 8 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "../GSN/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 7 of 8 : 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;
    }
}

File 8 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 1
  },
  "evmVersion": "istanbul",
  "libraries": {
    "": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_dao","type":"address"},{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"_batchBlocks","type":"uint256"},{"internalType":"uint256","name":"_maximumTapRateIncreasePct","type":"uint256"},{"internalType":"uint256","name":"_maximumTapFloorDecreasePct","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"rate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"floor","type":"uint256"}],"name":"AddTappedToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"RemoveTappedToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"ResetTappedToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"}],"name":"UpdateBeneficiary","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maximumTapFloorDecreasePct","type":"uint256"}],"name":"UpdateMaximumTapFloorDecreasePct","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maximumTapRateIncreasePct","type":"uint256"}],"name":"UpdateMaximumTapRateIncreasePct","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tappedAmount","type":"uint256"}],"name":"UpdateTappedAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"rate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"floor","type":"uint256"}],"name":"UpdateTappedToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"PCT_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_floor","type":"uint256"}],"name":"addTappedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"batchBlocks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"batchedBan","outputs":[{"internalType":"contract IBatchedBancor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beneficiary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"controller","outputs":[{"internalType":"contract IFundraisingController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dao","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"floors","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"getMaximumWithdrawal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"getRates","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastTapUpdates","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastTappedAmountUpdates","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maximumTapFloorDecreasePct","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maximumTapRateIncreasePct","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rates","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"removeTappedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"resetTappedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IFundraisingController","name":"_controller","type":"address"},{"internalType":"contract IBatchedBancor","name":"_batchedBan","type":"address"}],"name":"setUpTap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tappedAmounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"}],"name":"updateBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maximumTapFloorDecreasePct","type":"uint256"}],"name":"updateMaximumTapFloorDecreasePct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maximumTapRateIncreasePct","type":"uint256"}],"name":"updateMaximumTapRateIncreasePct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"updateTappedAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_floor","type":"uint256"}],"name":"updateTappedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162001c1338038062001c13833981810160405260a08110156200003757600080fd5b5080516020820151604083015160608401516080909401519293919290919060006200006b6001600160e01b036200021816565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620000c9846001600160e01b036200021c16565b6200011b576040805162461bcd60e51b815260206004820152601360248201527f496e76616c69642042656e656669636961727900000000000000000000000000604482015290519081900360640190fd5b826200016e576040805162461bcd60e51b815260206004820152601d60248201527f426174636820426c6f636b2063616e6e6f7420657175616c207a65726f000000604482015290519081900360640190fd5b62000182816001600160e01b036200022a16565b620001d4576040805162461bcd60e51b815260206004820152601660248201527f496e76616c696420466c6f6f7220446563726561736500000000000000000000604482015290519081900360640190fd5b600380546001600160a01b039586166001600160a01b0319918216179091556005939093556006919091556007556004805493909216921691909117905562000238565b3390565b6001600160a01b0316151590565b670de0b6b3a7640000101590565b6119cb80620002486000396000f3fe608060405234801561001057600080fd5b50600436106101545760003560e01c806302f55b611461015957806307e18bc8146101915780630aaffd2a146101b057806338af3eed146101d65780634162169f146101fa578063486b6d1a146102025780634c862136146102285780635503c656146102305780635567de4514610256578063715018a61461027c578063846a0a89146102845780638da5cb5b146102aa5780639cbbba88146102b2578063a8734f0b146102d8578063b3fb4754146102fe578063b897b6281461032c578063c56f0f6c1461035e578063cc3f861f14610366578063d21bd8201461038c578063e1264fcd146103a9578063e2a5aec5146103cf578063ed20de58146103f5578063efb89148146103fd578063f2fde38b14610405578063f30a00ce1461042b578063f3fef3a31461045d578063f77c479114610489578063fc157cb414610491575b600080fd5b61017f6004803603602081101561016f57600080fd5b50356001600160a01b0316610499565b60408051918252519081900360200190f35b6101ae600480360360208110156101a757600080fd5b50356104b8565b005b6101ae600480360360208110156101c657600080fd5b50356001600160a01b031661051c565b6101de6105cd565b604080516001600160a01b039092168252519081900360200190f35b6101de6105dc565b6101ae6004803603602081101561021857600080fd5b50356001600160a01b03166105eb565b61017f610694565b61017f6004803603602081101561024657600080fd5b50356001600160a01b031661069a565b61017f6004803603602081101561026c57600080fd5b50356001600160a01b03166106ac565b6101ae6106be565b6101ae6004803603602081101561029a57600080fd5b50356001600160a01b031661074e565b6101de6107a3565b6101ae600480360360208110156102c857600080fd5b50356001600160a01b03166107b2565b61017f600480360360208110156102ee57600080fd5b50356001600160a01b031661085b565b6101ae6004803603604081101561031457600080fd5b506001600160a01b038135811691602001351661086d565b6101ae6004803603606081101561034257600080fd5b506001600160a01b0381351690602081013590604001356108fe565b61017f610a08565b61017f6004803603602081101561037c57600080fd5b50356001600160a01b0316610a0e565b6101ae600480360360208110156103a257600080fd5b5035610a20565b61017f600480360360208110156103bf57600080fd5b50356001600160a01b0316610ad4565b61017f600480360360208110156103e557600080fd5b50356001600160a01b0316610ae6565b61017f610af7565b6101de610afd565b6101ae6004803603602081101561041b57600080fd5b50356001600160a01b0316610b0c565b6101ae6004803603606081101561044157600080fd5b506001600160a01b038135169060208101359060400135610bf2565b6101ae6004803603604081101561047357600080fd5b506001600160a01b038135169060200135610d3b565b6101de610e38565b61017f610e47565b6001600160a01b0381166000908152600960205260409020545b919050565b6104c0610e53565b6000546001600160a01b03908116911614610510576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b61051981610e57565b50565b610524610e53565b6000546001600160a01b03908116911614610574576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b61057d81610e92565b6105c4576040805162461bcd60e51b8152602060048201526013602482015272496e76616c69642042656e656669636961727960681b604482015290519081900360640190fd5b61051981610ea0565b6003546001600160a01b031681565b6004546001600160a01b031681565b6105f3610e53565b6000546001600160a01b03908116911614610643576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b61064c81610eea565b61068b576040805162461bcd60e51b81526020600482015260136024820152600080516020611915833981519152604482015290519081900360640190fd5b61051981610f07565b60065481565b600b6020526000908152604090205481565b60086020526000908152604090205481565b6106c6610e53565b6000546001600160a01b03908116911614610716576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b600080546040516001600160a01b0390911690600080516020611976833981519152908390a3600080546001600160a01b0319169055565b61075781610eea565b610796576040805162461bcd60e51b81526020600482015260136024820152600080516020611915833981519152604482015290519081900360640190fd5b61079f81610f76565b5050565b6000546001600160a01b031690565b6107ba610e53565b6000546001600160a01b0390811691161461080a576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b61081381610eea565b610852576040805162461bcd60e51b81526020600482015260136024820152600080516020611915833981519152604482015290519081900360640190fd5b61051981610ff0565b60096020526000908152604090205481565b610875610e53565b6000546001600160a01b039081169116146108c5576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b600180546001600160a01b038085166001600160a01b031992831617909255600280549284169290911691909117905561079f82610b0c565b610906610e53565b6000546001600160a01b03908116911614610956576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b61095f83610eea565b156109ab576040805162461bcd60e51b8152602060048201526017602482015276151bdad95b881a5cc8185b1c9958591e481d185c1c1959604a1b604482015290519081900360640190fd5b6109b482611064565b6109f8576040805162461bcd60e51b815260206004820152601060248201526f496e76616c696420746170207261746560801b604482015290519081900360640190fd5b610a03838383611069565b505050565b60055481565b600a6020526000908152604090205481565b610a28610e53565b6000546001600160a01b03908116911614610a78576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b610a8181611100565b610acb576040805162461bcd60e51b8152602060048201526016602482015275496e76616c696420666c6f6f7220646563726561736560501b604482015290519081900360640190fd5b6105198161110e565b600c6020526000908152604090205481565b6000610af182611149565b92915050565b60075481565b6002546001600160a01b031681565b610b14610e53565b6000546001600160a01b03908116911614610b64576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b6001600160a01b038116610ba95760405162461bcd60e51b81526004018080602001828103825260268152602001806118ef6026913960400191505060405180910390fd5b600080546040516001600160a01b038085169392169160008051602061197683398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b610bfa610e53565b6000546001600160a01b03908116911614610c4a576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b610c5383610eea565b610c92576040805162461bcd60e51b81526020600482015260136024820152600080516020611915833981519152604482015290519081900360640190fd5b610c9b82611064565b610cdf576040805162461bcd60e51b815260206004820152601060248201526f496e76616c696420746170207261746560801b604482015290519081900360640190fd5b610cea838383611337565b610d30576040805162461bcd60e51b8152602060048201526012602482015271496e76616c6964207461702075706461746560701b604482015290519081900360640190fd5b610a0383838361135c565b6004546001600160a01b03163314610d97576040805162461bcd60e51b815260206004820152601a60248201527944414f3a2063616c6c6572206973206e6f74207468652044414f60301b604482015290519081900360640190fd5b610da082610eea565b610ddf576040805162461bcd60e51b81526020600482015260136024820152600080516020611915833981519152604482015290519081900360640190fd5b60008111610e2e576040805162461bcd60e51b8152602060048201526017602482015276576974686472617720616d6f756e74206973207a65726f60481b604482015290519081900360640190fd5b61079f82826113ea565b6001546001600160a01b031681565b670de0b6b3a764000081565b3390565b60068190556040805182815290517f9b7e646ff02dfcf5eb44312fe1246b19fbd7cd135b5e8fc87ea8dabdba0a557a9181900360200190a150565b6001600160a01b0316151590565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fe6131a64e93e9aa4ff38892c34d563c06dcc1e03b3d6897cc65f0903e2ad684890600090a250565b6001600160a01b0316600090815260096020526040902054151590565b6001600160a01b038116600081815260086020908152604080832083905560098252808320839055600a8252808320839055600b8252808320839055600c909152808220829055517f501177e27fa4ac1960010be66ac3465730ea30d032efffb194ecdab56780a9a19190a250565b600080610f8283611149565b9050610f8c611528565b6001600160a01b0384166000818152600b602090815260408083209490945560088152908390208490558251848152925191927f52a0ec2acc756c1e658413fdceb6e3d7621deafa23d6f7cf8cfe8dac74f58f38929081900390910190a292915050565b6001600160a01b038116600090815260086020526040812055611011611528565b6001600160a01b0382166000818152600b6020908152604080832094909455600c9052828120429055915190917fd6bb4268f8b24a4b1224ccb373917deefefc838e5deb90fc31bf588f809eb5b091a250565b151590565b6001600160a01b0383166000908152600960209081526040808320859055600a9091529020819055611099611528565b6001600160a01b0384166000818152600b6020908152604080832094909455600c8152908390204290558251858152908101849052825191927fd68f3ca2b9dba133e5d2c7434e9354e135d834bb79a415b6ee8a640d6163126092918290030190a2505050565b670de0b6b3a7640000101590565b60078190556040805182815290517fa9ff459c90a69cad3990e8d42d4becd66f4252de3fd0da15700f4eb1f31d33e49181900360200190a150565b6001600160a01b038082166000818152600a60209081526040808320546001548251634afe6c4760e01b815260048101969096529151939586956111e69592949390911692634afe6c4792602480840193829003018186803b1580156111ae57600080fd5b505afa1580156111c2573d6000803e3d6000fd5b505050506040513d60208110156111d857600080fd5b50519063ffffffff61154716565b600254604080516370a0823160e01b81526001600160a01b039283166004820152905192935085926000928416916370a08231916024808301926020929190829003018186803b15801561123957600080fd5b505afa15801561124d573d6000803e3d6000fd5b505050506040513d602081101561126357600080fd5b50516001600160a01b038616600090815260096020908152604080832054600b90925282205492935090916112b791906112ab9061129f611528565b9063ffffffff6115a616565b9063ffffffff6115e816565b6001600160a01b038716600090815260086020526040812054919250906112e4908363ffffffff61154716565b90508483116112fb576000955050505050506104b3565b61130b858263ffffffff61154716565b831161132d57611321838663ffffffff6115a616565b955050505050506104b3565b9695505050505050565b60006113438484611641565b8015611354575061135484836116f8565b949350505050565b600061136784610f76565b905080156113795761137984826113ea565b6001600160a01b0384166000818152600960209081526040808320879055600a8252808320869055600c825291829020429055815186815290810185905281517fd163e19d68c378e6a686a4f7b29752e9132fcb27e94cba5824967cda8f707746929181900390910190a250505050565b600254604080516370a0823160e01b81526001600160a01b03928316600482015290518492600092908416916370a0823191602480820192602092909190829003018186803b15801561143c57600080fd5b505afa158015611450573d6000803e3d6000fd5b505050506040513d602081101561146657600080fd5b5051905082811161147657600080fd5b6002546040805163a9059cbb60e01b81526001600160a01b038781166004830152602482018790529151919092169163a9059cbb91604480830192600092919082900301818387803b1580156114cb57600080fd5b505af11580156114df573d6000803e3d6000fd5b50506040805186815290516001600160a01b03881693507f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436492509081900360200190a250505050565b600554600090611542906112ab438263ffffffff6117b316565b905090565b60008282018381101561159f576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b9392505050565b600061159f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506117f2565b6000826115f757506000610af1565b8282028284828161160457fe5b041461159f5760405162461bcd60e51b81526004018080602001828103825260218152602001806119356021913960400191505060405180910390fd5b6001600160a01b03821660009081526009602052604081205480831161166b576001915050610af1565b6001600160a01b0384166000908152600c602052604090205462278d000142101561169a576000915050610af1565b6116c76116ba600654670de0b6b3a764000061154790919063ffffffff16565b829063ffffffff6115e816565b6116df84670de0b6b3a764000063ffffffff6115e816565b116116ee576001915050610af1565b5060009392505050565b6001600160a01b0382166000908152600a6020526040812054808310611722576001915050610af1565b6001600160a01b0384166000908152600c602052604090205462278d0001421015611751576000915050610af1565b670de0b6b3a76400006007541061176c576001915050610af1565b61178c6116ba600754670de0b6b3a76400006115a690919063ffffffff16565b6117a484670de0b6b3a764000063ffffffff6115e816565b106116ee576001915050610af1565b600061159f83836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b815250611889565b600081848411156118815760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561184657818101518382015260200161182e565b50505050905090810190601f1680156118735780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836118d85760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561184657818101518382015260200161182e565b5060008385816118e457fe5b049594505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373546f6b656e206973206e6f742074617070656400000000000000000000000000536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a26469706673582212206762b66b9b791f1fc35a4c1595e2e498fa999d3b975e611970e8a8e37be81bc664736f6c63430006020033000000000000000000000000e06748876bf92340d56c536388568cbcf679bc1100000000000000000000000077a9d21bef6a21a045503df0d8d58678392bafa5000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000006f05b59d3b2000000000000000000000000000000000000000000000000000006f05b59d3b20000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101545760003560e01c806302f55b611461015957806307e18bc8146101915780630aaffd2a146101b057806338af3eed146101d65780634162169f146101fa578063486b6d1a146102025780634c862136146102285780635503c656146102305780635567de4514610256578063715018a61461027c578063846a0a89146102845780638da5cb5b146102aa5780639cbbba88146102b2578063a8734f0b146102d8578063b3fb4754146102fe578063b897b6281461032c578063c56f0f6c1461035e578063cc3f861f14610366578063d21bd8201461038c578063e1264fcd146103a9578063e2a5aec5146103cf578063ed20de58146103f5578063efb89148146103fd578063f2fde38b14610405578063f30a00ce1461042b578063f3fef3a31461045d578063f77c479114610489578063fc157cb414610491575b600080fd5b61017f6004803603602081101561016f57600080fd5b50356001600160a01b0316610499565b60408051918252519081900360200190f35b6101ae600480360360208110156101a757600080fd5b50356104b8565b005b6101ae600480360360208110156101c657600080fd5b50356001600160a01b031661051c565b6101de6105cd565b604080516001600160a01b039092168252519081900360200190f35b6101de6105dc565b6101ae6004803603602081101561021857600080fd5b50356001600160a01b03166105eb565b61017f610694565b61017f6004803603602081101561024657600080fd5b50356001600160a01b031661069a565b61017f6004803603602081101561026c57600080fd5b50356001600160a01b03166106ac565b6101ae6106be565b6101ae6004803603602081101561029a57600080fd5b50356001600160a01b031661074e565b6101de6107a3565b6101ae600480360360208110156102c857600080fd5b50356001600160a01b03166107b2565b61017f600480360360208110156102ee57600080fd5b50356001600160a01b031661085b565b6101ae6004803603604081101561031457600080fd5b506001600160a01b038135811691602001351661086d565b6101ae6004803603606081101561034257600080fd5b506001600160a01b0381351690602081013590604001356108fe565b61017f610a08565b61017f6004803603602081101561037c57600080fd5b50356001600160a01b0316610a0e565b6101ae600480360360208110156103a257600080fd5b5035610a20565b61017f600480360360208110156103bf57600080fd5b50356001600160a01b0316610ad4565b61017f600480360360208110156103e557600080fd5b50356001600160a01b0316610ae6565b61017f610af7565b6101de610afd565b6101ae6004803603602081101561041b57600080fd5b50356001600160a01b0316610b0c565b6101ae6004803603606081101561044157600080fd5b506001600160a01b038135169060208101359060400135610bf2565b6101ae6004803603604081101561047357600080fd5b506001600160a01b038135169060200135610d3b565b6101de610e38565b61017f610e47565b6001600160a01b0381166000908152600960205260409020545b919050565b6104c0610e53565b6000546001600160a01b03908116911614610510576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b61051981610e57565b50565b610524610e53565b6000546001600160a01b03908116911614610574576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b61057d81610e92565b6105c4576040805162461bcd60e51b8152602060048201526013602482015272496e76616c69642042656e656669636961727960681b604482015290519081900360640190fd5b61051981610ea0565b6003546001600160a01b031681565b6004546001600160a01b031681565b6105f3610e53565b6000546001600160a01b03908116911614610643576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b61064c81610eea565b61068b576040805162461bcd60e51b81526020600482015260136024820152600080516020611915833981519152604482015290519081900360640190fd5b61051981610f07565b60065481565b600b6020526000908152604090205481565b60086020526000908152604090205481565b6106c6610e53565b6000546001600160a01b03908116911614610716576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b600080546040516001600160a01b0390911690600080516020611976833981519152908390a3600080546001600160a01b0319169055565b61075781610eea565b610796576040805162461bcd60e51b81526020600482015260136024820152600080516020611915833981519152604482015290519081900360640190fd5b61079f81610f76565b5050565b6000546001600160a01b031690565b6107ba610e53565b6000546001600160a01b0390811691161461080a576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b61081381610eea565b610852576040805162461bcd60e51b81526020600482015260136024820152600080516020611915833981519152604482015290519081900360640190fd5b61051981610ff0565b60096020526000908152604090205481565b610875610e53565b6000546001600160a01b039081169116146108c5576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b600180546001600160a01b038085166001600160a01b031992831617909255600280549284169290911691909117905561079f82610b0c565b610906610e53565b6000546001600160a01b03908116911614610956576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b61095f83610eea565b156109ab576040805162461bcd60e51b8152602060048201526017602482015276151bdad95b881a5cc8185b1c9958591e481d185c1c1959604a1b604482015290519081900360640190fd5b6109b482611064565b6109f8576040805162461bcd60e51b815260206004820152601060248201526f496e76616c696420746170207261746560801b604482015290519081900360640190fd5b610a03838383611069565b505050565b60055481565b600a6020526000908152604090205481565b610a28610e53565b6000546001600160a01b03908116911614610a78576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b610a8181611100565b610acb576040805162461bcd60e51b8152602060048201526016602482015275496e76616c696420666c6f6f7220646563726561736560501b604482015290519081900360640190fd5b6105198161110e565b600c6020526000908152604090205481565b6000610af182611149565b92915050565b60075481565b6002546001600160a01b031681565b610b14610e53565b6000546001600160a01b03908116911614610b64576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b6001600160a01b038116610ba95760405162461bcd60e51b81526004018080602001828103825260268152602001806118ef6026913960400191505060405180910390fd5b600080546040516001600160a01b038085169392169160008051602061197683398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b610bfa610e53565b6000546001600160a01b03908116911614610c4a576040805162461bcd60e51b81526020600482018190526024820152600080516020611956833981519152604482015290519081900360640190fd5b610c5383610eea565b610c92576040805162461bcd60e51b81526020600482015260136024820152600080516020611915833981519152604482015290519081900360640190fd5b610c9b82611064565b610cdf576040805162461bcd60e51b815260206004820152601060248201526f496e76616c696420746170207261746560801b604482015290519081900360640190fd5b610cea838383611337565b610d30576040805162461bcd60e51b8152602060048201526012602482015271496e76616c6964207461702075706461746560701b604482015290519081900360640190fd5b610a0383838361135c565b6004546001600160a01b03163314610d97576040805162461bcd60e51b815260206004820152601a60248201527944414f3a2063616c6c6572206973206e6f74207468652044414f60301b604482015290519081900360640190fd5b610da082610eea565b610ddf576040805162461bcd60e51b81526020600482015260136024820152600080516020611915833981519152604482015290519081900360640190fd5b60008111610e2e576040805162461bcd60e51b8152602060048201526017602482015276576974686472617720616d6f756e74206973207a65726f60481b604482015290519081900360640190fd5b61079f82826113ea565b6001546001600160a01b031681565b670de0b6b3a764000081565b3390565b60068190556040805182815290517f9b7e646ff02dfcf5eb44312fe1246b19fbd7cd135b5e8fc87ea8dabdba0a557a9181900360200190a150565b6001600160a01b0316151590565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fe6131a64e93e9aa4ff38892c34d563c06dcc1e03b3d6897cc65f0903e2ad684890600090a250565b6001600160a01b0316600090815260096020526040902054151590565b6001600160a01b038116600081815260086020908152604080832083905560098252808320839055600a8252808320839055600b8252808320839055600c909152808220829055517f501177e27fa4ac1960010be66ac3465730ea30d032efffb194ecdab56780a9a19190a250565b600080610f8283611149565b9050610f8c611528565b6001600160a01b0384166000818152600b602090815260408083209490945560088152908390208490558251848152925191927f52a0ec2acc756c1e658413fdceb6e3d7621deafa23d6f7cf8cfe8dac74f58f38929081900390910190a292915050565b6001600160a01b038116600090815260086020526040812055611011611528565b6001600160a01b0382166000818152600b6020908152604080832094909455600c9052828120429055915190917fd6bb4268f8b24a4b1224ccb373917deefefc838e5deb90fc31bf588f809eb5b091a250565b151590565b6001600160a01b0383166000908152600960209081526040808320859055600a9091529020819055611099611528565b6001600160a01b0384166000818152600b6020908152604080832094909455600c8152908390204290558251858152908101849052825191927fd68f3ca2b9dba133e5d2c7434e9354e135d834bb79a415b6ee8a640d6163126092918290030190a2505050565b670de0b6b3a7640000101590565b60078190556040805182815290517fa9ff459c90a69cad3990e8d42d4becd66f4252de3fd0da15700f4eb1f31d33e49181900360200190a150565b6001600160a01b038082166000818152600a60209081526040808320546001548251634afe6c4760e01b815260048101969096529151939586956111e69592949390911692634afe6c4792602480840193829003018186803b1580156111ae57600080fd5b505afa1580156111c2573d6000803e3d6000fd5b505050506040513d60208110156111d857600080fd5b50519063ffffffff61154716565b600254604080516370a0823160e01b81526001600160a01b039283166004820152905192935085926000928416916370a08231916024808301926020929190829003018186803b15801561123957600080fd5b505afa15801561124d573d6000803e3d6000fd5b505050506040513d602081101561126357600080fd5b50516001600160a01b038616600090815260096020908152604080832054600b90925282205492935090916112b791906112ab9061129f611528565b9063ffffffff6115a616565b9063ffffffff6115e816565b6001600160a01b038716600090815260086020526040812054919250906112e4908363ffffffff61154716565b90508483116112fb576000955050505050506104b3565b61130b858263ffffffff61154716565b831161132d57611321838663ffffffff6115a616565b955050505050506104b3565b9695505050505050565b60006113438484611641565b8015611354575061135484836116f8565b949350505050565b600061136784610f76565b905080156113795761137984826113ea565b6001600160a01b0384166000818152600960209081526040808320879055600a8252808320869055600c825291829020429055815186815290810185905281517fd163e19d68c378e6a686a4f7b29752e9132fcb27e94cba5824967cda8f707746929181900390910190a250505050565b600254604080516370a0823160e01b81526001600160a01b03928316600482015290518492600092908416916370a0823191602480820192602092909190829003018186803b15801561143c57600080fd5b505afa158015611450573d6000803e3d6000fd5b505050506040513d602081101561146657600080fd5b5051905082811161147657600080fd5b6002546040805163a9059cbb60e01b81526001600160a01b038781166004830152602482018790529151919092169163a9059cbb91604480830192600092919082900301818387803b1580156114cb57600080fd5b505af11580156114df573d6000803e3d6000fd5b50506040805186815290516001600160a01b03881693507f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436492509081900360200190a250505050565b600554600090611542906112ab438263ffffffff6117b316565b905090565b60008282018381101561159f576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b9392505050565b600061159f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506117f2565b6000826115f757506000610af1565b8282028284828161160457fe5b041461159f5760405162461bcd60e51b81526004018080602001828103825260218152602001806119356021913960400191505060405180910390fd5b6001600160a01b03821660009081526009602052604081205480831161166b576001915050610af1565b6001600160a01b0384166000908152600c602052604090205462278d000142101561169a576000915050610af1565b6116c76116ba600654670de0b6b3a764000061154790919063ffffffff16565b829063ffffffff6115e816565b6116df84670de0b6b3a764000063ffffffff6115e816565b116116ee576001915050610af1565b5060009392505050565b6001600160a01b0382166000908152600a6020526040812054808310611722576001915050610af1565b6001600160a01b0384166000908152600c602052604090205462278d0001421015611751576000915050610af1565b670de0b6b3a76400006007541061176c576001915050610af1565b61178c6116ba600754670de0b6b3a76400006115a690919063ffffffff16565b6117a484670de0b6b3a764000063ffffffff6115e816565b106116ee576001915050610af1565b600061159f83836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b815250611889565b600081848411156118815760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561184657818101518382015260200161182e565b50505050905090810190601f1680156118735780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836118d85760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561184657818101518382015260200161182e565b5060008385816118e457fe5b049594505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373546f6b656e206973206e6f742074617070656400000000000000000000000000536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a26469706673582212206762b66b9b791f1fc35a4c1595e2e498fa999d3b975e611970e8a8e37be81bc664736f6c63430006020033

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

000000000000000000000000e06748876bf92340d56c536388568cbcf679bc1100000000000000000000000077a9d21bef6a21a045503df0d8d58678392bafa5000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000006f05b59d3b2000000000000000000000000000000000000000000000000000006f05b59d3b20000

-----Decoded View---------------
Arg [0] : _dao (address): 0xe06748876bf92340D56C536388568cbcf679bc11
Arg [1] : _beneficiary (address): 0x77A9d21bEf6a21a045503df0d8D58678392BAFa5
Arg [2] : _batchBlocks (uint256): 1
Arg [3] : _maximumTapRateIncreasePct (uint256): 500000000000000000
Arg [4] : _maximumTapFloorDecreasePct (uint256): 500000000000000000

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000e06748876bf92340d56c536388568cbcf679bc11
Arg [1] : 00000000000000000000000077a9d21bef6a21a045503df0d8d58678392bafa5
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [3] : 00000000000000000000000000000000000000000000000006f05b59d3b20000
Arg [4] : 00000000000000000000000000000000000000000000000006f05b59d3b20000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

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