ETH Price: $1,984.83 (+1.29%)
 

Overview

Max Total Supply

22.937043 ERC20...

Holders

4

Market

Price

$0.00 @ 0.000000 ETH

Onchain Market Cap

-

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 6 Decimals)

Balance
0.499802 ERC20 ***

Value
$0.00
0xaCfE4511CE883C14c4eA40563F176C3C09b4c47C
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
PickleJar

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
// https://github.com/iearn-finance/vaults/blob/master/contracts/vaults/yVault.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

import "./interfaces/controller.sol";

import "./lib/erc20.sol";
import "./lib/safe-math.sol";

contract PickleJar is ERC20 {
    using SafeERC20 for IERC20;
    using Address for address;
    using SafeMath for uint256;

    IERC20 public token;

    uint256 public min = 9500;
    uint256 public constant max = 10000;

    address public governance;
    address public timelock;
    address public controller;

    constructor(address _token, address _governance, address _timelock, address _controller)
        public
        ERC20(
            string(abi.encodePacked("pickling ", ERC20(_token).name())),
            string(abi.encodePacked("p", ERC20(_token).symbol()))
        )
    {
        _setupDecimals(ERC20(_token).decimals());
        token = IERC20(_token);
        governance = _governance;
        timelock = _timelock;
        controller = _controller;
    }

    function balance() public view returns (uint256) {
        return
            token.balanceOf(address(this)).add(
                IController(controller).balanceOf(address(token))
            );
    }

    function setMin(uint256 _min) external {
        require(msg.sender == governance, "!governance");
        require(_min <= max, "numerator cannot be greater than denominator");
        min = _min;
    }

    function setGovernance(address _governance) public {
        require(msg.sender == governance, "!governance");
        governance = _governance;
    }

    function setTimelock(address _timelock) public {
        require(msg.sender == timelock, "!timelock");
        timelock = _timelock;
    }

    function setController(address _controller) public {
        require(msg.sender == timelock, "!timelock");
        controller = _controller;
    }

    // Custom logic in here for how much the jars allows to be borrowed
    // Sets minimum required on-hand to keep small withdrawals cheap
    function available() public view returns (uint256) {
        return token.balanceOf(address(this)).mul(min).div(max);
    }

    function earn() public {
        uint256 _bal = available();
        token.safeTransfer(controller, _bal);
        IController(controller).earn(address(token), _bal);
    }

    function depositAll() external {
        deposit(token.balanceOf(msg.sender));
    }

    function deposit(uint256 _amount) public {
        uint256 _pool = balance();
        uint256 _before = token.balanceOf(address(this));
        token.safeTransferFrom(msg.sender, address(this), _amount);
        uint256 _after = token.balanceOf(address(this));
        _amount = _after.sub(_before); // Additional check for deflationary tokens
        uint256 shares = 0;
        if (totalSupply() == 0) {
            shares = _amount;
        } else {
            shares = (_amount.mul(totalSupply())).div(_pool);
        }
        _mint(msg.sender, shares);
    }

    function withdrawAll() external {
        withdraw(balanceOf(msg.sender));
    }

    // Used to swap any borrowed reserve over the debt limit to liquidate to 'token'
    function harvest(address reserve, uint256 amount) external {
        require(msg.sender == controller, "!controller");
        require(reserve != address(token), "token");
        IERC20(reserve).safeTransfer(controller, amount);
    }

    // No rebalance implementation for lower fees and faster swaps
    function withdraw(uint256 _shares) public {
        uint256 r = (balance().mul(_shares)).div(totalSupply());
        _burn(msg.sender, _shares);

        // Check balance
        uint256 b = token.balanceOf(address(this));
        if (b < r) {
            uint256 _withdraw = r.sub(b);
            IController(controller).withdraw(address(token), _withdraw);
            uint256 _after = token.balanceOf(address(this));
            uint256 _diff = _after.sub(b);
            if (_diff < _withdraw) {
                r = b.add(_diff);
            }
        }

        token.safeTransfer(msg.sender, r);
    }

    function getRatio() public view returns (uint256) {
        if (totalSupply() == 0) return 0;
        return balance().mul(1e18).div(totalSupply());
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

interface IController {
    function jars(address) external view returns (address);

    function rewards() external view returns (address);

    function devfund() external view returns (address);

    function treasury() external view returns (address);

    function balanceOf(address) external view returns (uint256);

    function withdraw(address, uint256) external;

    function withdrawReward(address, uint256) external;

    function earn(address, uint256) external;

    function strategies(address) external view returns (address);
}

File 3 of 5 : erc20.sol
// File: contracts/GSN/Context.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

import "./safe-math.sol";
import "./context.sol";

// File: contracts/token/ERC20/IERC20.sol

/**
 * @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
    );
}

// File: contracts/utils/Address.sol

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(
            address(this).balance >= amount,
            "Address: insufficient balance"
        );

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{value: amount}("");
        require(
            success,
            "Address: unable to send value, recipient may have reverted"
        );
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data)
        internal
        returns (bytes memory)
    {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return
            functionCallWithValue(
                target,
                data,
                value,
                "Address: low-level call with value failed"
            );
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(
            address(this).balance >= value,
            "Address: insufficient balance for call"
        );
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint256 weiValue,
        string memory errorMessage
    ) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: weiValue}(
            data
        );
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: contracts/token/ERC20/ERC20.sol

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;
    using Address for address;

    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount)
        public
        virtual
        override
        returns (bool)
    {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender)
        public
        view
        virtual
        override
        returns (uint256)
    {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount)
        public
        virtual
        override
        returns (bool)
    {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(
            sender,
            _msgSender(),
            _allowances[sender][_msgSender()].sub(
                amount,
                "ERC20: transfer amount exceeds allowance"
            )
        );
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue)
        public
        virtual
        returns (bool)
    {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender].add(addedValue)
        );
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue)
        public
        virtual
        returns (bool)
    {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender].sub(
                subtractedValue,
                "ERC20: decreased allowance below zero"
            )
        );
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(
            amount,
            "ERC20: transfer amount exceeds balance"
        );
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(
            amount,
            "ERC20: burn amount exceeds balance"
        );
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.transfer.selector, to, value)
        );
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.transferFrom.selector, from, to, value)
        );
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.approve.selector, spender, value)
        );
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(
            value
        );
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(
                token.approve.selector,
                spender,
                newAllowance
            )
        );
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(
            value,
            "SafeERC20: decreased allowance below zero"
        );
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(
                token.approve.selector,
                spender,
                newAllowance
            )
        );
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(
            data,
            "SafeERC20: low-level call failed"
        );
        if (returndata.length > 0) {
            // Return data is optional
            // solhint-disable-next-line max-line-length
            require(
                abi.decode(returndata, (bool)),
                "SafeERC20: ERC20 operation did not succeed"
            );
        }
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

/**
 * @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;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

/*
 * @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 payable(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;
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_governance","type":"address"},{"internalType":"address","name":"_timelock","type":"address"},{"internalType":"address","name":"_controller","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"earn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"reserve","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"max","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_min","type":"uint256"}],"name":"setMin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_timelock","type":"address"}],"name":"setTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timelock","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405261251c6006553480156200001757600080fd5b5060405162002004380380620020048339810160408190526200003a9162000332565b836001600160a01b03166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000079573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620000a39190810190620003d8565b604051602001620000b5919062000490565b604051602081830303815290604052846001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000103573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200012d9190810190620003d8565b6040516020016200013f9190620004c3565b60408051601f198184030181529190528151620001649060039060208501906200026f565b5080516200017a9060049060208401906200026f565b50506005805460ff19166012179055506040805163313ce56760e01b8152905162000212916001600160a01b0387169163313ce567916004808201926020929091908290030181865afa158015620001d6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001fc9190620004ee565b6005805460ff191660ff92909216919091179055565b600580546001600160a01b0395861661010002610100600160a81b0319909116179055600780549385166001600160a01b031994851617905560088054928516928416929092179091556009805491909316911617905562000557565b8280546200027d906200051a565b90600052602060002090601f016020900481019282620002a15760008555620002ec565b82601f10620002bc57805160ff1916838001178555620002ec565b82800160010185558215620002ec579182015b82811115620002ec578251825591602001919060010190620002cf565b50620002fa929150620002fe565b5090565b5b80821115620002fa5760008155600101620002ff565b80516001600160a01b03811681146200032d57600080fd5b919050565b600080600080608085870312156200034957600080fd5b620003548562000315565b9350620003646020860162000315565b9250620003746040860162000315565b9150620003846060860162000315565b905092959194509250565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620003c2578181015183820152602001620003a8565b83811115620003d2576000848401525b50505050565b600060208284031215620003eb57600080fd5b81516001600160401b03808211156200040357600080fd5b818401915084601f8301126200041857600080fd5b8151818111156200042d576200042d6200038f565b604051601f8201601f19908116603f011681019083821181831017156200045857620004586200038f565b816040528281528760208487010111156200047257600080fd5b62000485836020830160208801620003a5565b979650505050505050565b6803834b1b5b634b733960bd1b815260008251620004b6816009850160208701620003a5565b9190910160090192915050565b600760fc1b815260008251620004e1816001850160208701620003a5565b9190910160010192915050565b6000602082840312156200050157600080fd5b815160ff811681146200051357600080fd5b9392505050565b600181811c908216806200052f57607f821691505b602082108114156200055157634e487b7160e01b600052602260045260246000fd5b50919050565b611a9d80620005676000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c806395d89b4111610104578063d33219b4116100a2578063ec1ebd7a11610071578063ec1ebd7a146103f3578063f77c4791146103fb578063f88979451461040e578063fc0c546a1461041757600080fd5b8063d33219b414610397578063d389800f146103aa578063dd62ed3e146103b2578063de5f6268146103eb57600080fd5b8063ab033ea9116100de578063ab033ea914610356578063b69ef8a814610369578063b6b55f2514610371578063bdacb3031461038457600080fd5b806395d89b4114610328578063a457c2d714610330578063a9059cbb1461034357600080fd5b8063395093511161017c5780636ac5db191161014b5780636ac5db19146102db57806370a08231146102e4578063853828b61461030d57806392eefe9b1461031557600080fd5b8063395093511461028257806345dc3dd81461029557806348a0d754146102a85780635aa6e675146102b057600080fd5b806318160ddd116101b857806318160ddd1461023557806323b872dd146102475780632e1a7d4d1461025a578063313ce5671461026d57600080fd5b8063018ee9b7146101df57806306fdde03146101f4578063095ea7b314610212575b600080fd5b6101f26101ed36600461178e565b61042f565b005b6101fc6104e5565b60405161020991906117e4565b60405180910390f35b61022561022036600461178e565b610577565b6040519015158152602001610209565b6002545b604051908152602001610209565b610225610255366004611817565b61058e565b6101f2610268366004611853565b6105f7565b60055460405160ff9091168152602001610209565b61022561029036600461178e565b6107dd565b6101f26102a3366004611853565b610813565b6102396108c7565b6007546102c3906001600160a01b031681565b6040516001600160a01b039091168152602001610209565b61023961271081565b6102396102f236600461186c565b6001600160a01b031660009081526020819052604090205490565b6101f261094e565b6101f261032336600461186c565b610969565b6101fc6109d1565b61022561033e36600461178e565b6109e0565b61022561035136600461178e565b610a2f565b6101f261036436600461186c565b610a3c565b610239610aa6565b6101f261037f366004611853565b610b97565b6101f261039236600461186c565b610cf8565b6008546102c3906001600160a01b031681565b6101f2610d60565b6102396103c0366004611887565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101f2610df8565b610239610e6b565b6009546102c3906001600160a01b031681565b61023960065481565b6005546102c39061010090046001600160a01b031681565b6009546001600160a01b0316331461047c5760405162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b60448201526064015b60405180910390fd5b6005546001600160a01b038381166101009092041614156104c75760405162461bcd60e51b81526020600482015260056024820152643a37b5b2b760d91b6044820152606401610473565b6009546104e1906001600160a01b03848116911683610ea0565b5050565b6060600380546104f4906118ba565b80601f0160208091040260200160405190810160405280929190818152602001828054610520906118ba565b801561056d5780601f106105425761010080835404028352916020019161056d565b820191906000526020600020905b81548152906001019060200180831161055057829003601f168201915b5050505050905090565b6000610584338484610f03565b5060015b92915050565b600061059b848484611028565b6105ed84336105e885604051806060016040528060288152602001611a1b602891396001600160a01b038a16600090815260016020908152604080832033845290915290205491906111ab565b610f03565b5060019392505050565b600061061d61060560025490565b61061784610611610aa6565b906111e5565b9061126b565b905061062933836112ad565b6005546040516370a0823160e01b815230600482015260009161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610677573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069b91906118f5565b9050818110156107bc5760006106b183836113b9565b60095460055460405163f3fef3a360e01b81526001600160a01b036101009092048216600482015260248101849052929350169063f3fef3a390604401600060405180830381600087803b15801561070857600080fd5b505af115801561071c573d6000803e3d6000fd5b50506005546040516370a0823160e01b8152306004820152600093506101009091046001600160a01b031691506370a0823190602401602060405180830381865afa15801561076f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079391906118f5565b905060006107a182856113b9565b9050828110156107b8576107b584826113fb565b94505b5050505b6005546107d89061010090046001600160a01b03163384610ea0565b505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105849185906105e890866113fb565b6007546001600160a01b0316331461085b5760405162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b6044820152606401610473565b6127108111156108c25760405162461bcd60e51b815260206004820152602c60248201527f6e756d657261746f722063616e6e6f742062652067726561746572207468616e60448201526b103232b737b6b4b730ba37b960a11b6064820152608401610473565b600655565b6006546005546040516370a0823160e01b81523060048201526000926109499261271092610617929161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610925573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061191906118f5565b905090565b33600090815260208190526040902054610967906105f7565b565b6008546001600160a01b031633146109af5760405162461bcd60e51b81526020600482015260096024820152682174696d656c6f636b60b81b6044820152606401610473565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6060600480546104f4906118ba565b600061058433846105e885604051806060016040528060258152602001611a43602591393360009081526001602090815260408083206001600160a01b038d16845290915290205491906111ab565b6000610584338484611028565b6007546001600160a01b03163314610a845760405162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b6044820152606401610473565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6009546005546040516370a0823160e01b81526001600160a01b03610100909204821660048201526000926109499216906370a0823190602401602060405180830381865afa158015610afd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2191906118f5565b6005546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015610b6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9191906118f5565b906113fb565b6000610ba1610aa6565b6005546040516370a0823160e01b81523060048201529192506000916101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015610bf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1791906118f5565b600554909150610c379061010090046001600160a01b031633308661145a565b6005546040516370a0823160e01b815230600482015260009161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca991906118f5565b9050610cb581836113b9565b93506000610cc260025490565b610ccd575083610ce7565b610ce484610617610cdd60025490565b88906111e5565b90505b610cf13382611498565b5050505050565b6008546001600160a01b03163314610d3e5760405162461bcd60e51b81526020600482015260096024820152682174696d656c6f636b60b81b6044820152606401610473565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6000610d6a6108c7565b600954600554919250610d8f9161010090046001600160a01b03908116911683610ea0565b60095460055460405163b02bf4b960e01b81526001600160a01b03610100909204821660048201526024810184905291169063b02bf4b990604401600060405180830381600087803b158015610de457600080fd5b505af1158015610cf1573d6000803e3d6000fd5b6005546040516370a0823160e01b81523360048201526109679161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037f91906118f5565b6000610e7660025490565b610e805750600090565b610949610e8c60025490565b610617670de0b6b3a7640000610611610aa6565b6040516001600160a01b0383166024820152604481018290526107d890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261156f565b6001600160a01b038316610f655760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610473565b6001600160a01b038216610fc65760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610473565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b03831661108c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610473565b6001600160a01b0382166110ee5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610473565b61112b816040518060600160405280602681526020016119f5602691396001600160a01b03861660009081526020819052604090205491906111ab565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461115a90826113fb565b6001600160a01b038381166000818152602081815260409182902094909455518481529092918616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910161101b565b600081848411156111cf5760405162461bcd60e51b815260040161047391906117e4565b5060006111dc8486611924565b95945050505050565b6000826111f457506000610588565b6000611200838561193b565b90508261120d858361195a565b146112645760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610473565b9392505050565b600061126483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611641565b6001600160a01b03821661130d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610473565b61134a816040518060600160405280602281526020016119d3602291396001600160a01b03851660009081526020819052604090205491906111ab565b6001600160a01b03831660009081526020819052604090205560025461137090826113b9565b6002556040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b600061126483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ab565b600080611408838561197c565b9050838110156112645760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610473565b6040516001600160a01b03808516602483015283166044820152606481018290526114929085906323b872dd60e01b90608401610ecc565b50505050565b6001600160a01b0382166114ee5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610473565b6002546114fb90826113fb565b6002556001600160a01b03821660009081526020819052604090205461152190826113fb565b6001600160a01b038316600081815260208181526040808320949094559251848152919290917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91016113ad565b60006115c4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661166f9092919063ffffffff16565b8051909150156107d857808060200190518101906115e29190611994565b6107d85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610473565b600081836116625760405162461bcd60e51b815260040161047391906117e4565b5060006111dc848661195a565b606061167e8484600085611686565b949350505050565b6060843b6116d65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610473565b600080866001600160a01b031685876040516116f291906119b6565b60006040518083038185875af1925050503d806000811461172f576040519150601f19603f3d011682016040523d82523d6000602084013e611734565b606091505b5091509150811561174857915061167e9050565b8051156117585780518082602001fd5b8360405162461bcd60e51b815260040161047391906117e4565b80356001600160a01b038116811461178957600080fd5b919050565b600080604083850312156117a157600080fd5b6117aa83611772565b946020939093013593505050565b60005b838110156117d35781810151838201526020016117bb565b838111156114925750506000910152565b60208152600082518060208401526118038160408501602087016117b8565b601f01601f19169190910160400192915050565b60008060006060848603121561182c57600080fd5b61183584611772565b925061184360208501611772565b9150604084013590509250925092565b60006020828403121561186557600080fd5b5035919050565b60006020828403121561187e57600080fd5b61126482611772565b6000806040838503121561189a57600080fd5b6118a383611772565b91506118b160208401611772565b90509250929050565b600181811c908216806118ce57607f821691505b602082108114156118ef57634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561190757600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156119365761193661190e565b500390565b60008160001904831182151516156119555761195561190e565b500290565b60008261197757634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561198f5761198f61190e565b500190565b6000602082840312156119a657600080fd5b8151801515811461126457600080fd5b600082516119c88184602087016117b8565b919091019291505056fe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220f4bed144cd028a03c2065a3f22839bb6c2cb29a0bda1ac087aa57b1a888e707464736f6c634300080b0033000000000000000000000000decc0c09c3b5f6e92ef4184125d5648a66e352980000000000000000000000007a79e2e867d36a91bb47e0929787305c95e793c50000000000000000000000007a79e2e867d36a91bb47e0929787305c95e793c5000000000000000000000000a1d43d97fc5f1026597c67805aa02aae558e0fef

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101da5760003560e01c806395d89b4111610104578063d33219b4116100a2578063ec1ebd7a11610071578063ec1ebd7a146103f3578063f77c4791146103fb578063f88979451461040e578063fc0c546a1461041757600080fd5b8063d33219b414610397578063d389800f146103aa578063dd62ed3e146103b2578063de5f6268146103eb57600080fd5b8063ab033ea9116100de578063ab033ea914610356578063b69ef8a814610369578063b6b55f2514610371578063bdacb3031461038457600080fd5b806395d89b4114610328578063a457c2d714610330578063a9059cbb1461034357600080fd5b8063395093511161017c5780636ac5db191161014b5780636ac5db19146102db57806370a08231146102e4578063853828b61461030d57806392eefe9b1461031557600080fd5b8063395093511461028257806345dc3dd81461029557806348a0d754146102a85780635aa6e675146102b057600080fd5b806318160ddd116101b857806318160ddd1461023557806323b872dd146102475780632e1a7d4d1461025a578063313ce5671461026d57600080fd5b8063018ee9b7146101df57806306fdde03146101f4578063095ea7b314610212575b600080fd5b6101f26101ed36600461178e565b61042f565b005b6101fc6104e5565b60405161020991906117e4565b60405180910390f35b61022561022036600461178e565b610577565b6040519015158152602001610209565b6002545b604051908152602001610209565b610225610255366004611817565b61058e565b6101f2610268366004611853565b6105f7565b60055460405160ff9091168152602001610209565b61022561029036600461178e565b6107dd565b6101f26102a3366004611853565b610813565b6102396108c7565b6007546102c3906001600160a01b031681565b6040516001600160a01b039091168152602001610209565b61023961271081565b6102396102f236600461186c565b6001600160a01b031660009081526020819052604090205490565b6101f261094e565b6101f261032336600461186c565b610969565b6101fc6109d1565b61022561033e36600461178e565b6109e0565b61022561035136600461178e565b610a2f565b6101f261036436600461186c565b610a3c565b610239610aa6565b6101f261037f366004611853565b610b97565b6101f261039236600461186c565b610cf8565b6008546102c3906001600160a01b031681565b6101f2610d60565b6102396103c0366004611887565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101f2610df8565b610239610e6b565b6009546102c3906001600160a01b031681565b61023960065481565b6005546102c39061010090046001600160a01b031681565b6009546001600160a01b0316331461047c5760405162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b60448201526064015b60405180910390fd5b6005546001600160a01b038381166101009092041614156104c75760405162461bcd60e51b81526020600482015260056024820152643a37b5b2b760d91b6044820152606401610473565b6009546104e1906001600160a01b03848116911683610ea0565b5050565b6060600380546104f4906118ba565b80601f0160208091040260200160405190810160405280929190818152602001828054610520906118ba565b801561056d5780601f106105425761010080835404028352916020019161056d565b820191906000526020600020905b81548152906001019060200180831161055057829003601f168201915b5050505050905090565b6000610584338484610f03565b5060015b92915050565b600061059b848484611028565b6105ed84336105e885604051806060016040528060288152602001611a1b602891396001600160a01b038a16600090815260016020908152604080832033845290915290205491906111ab565b610f03565b5060019392505050565b600061061d61060560025490565b61061784610611610aa6565b906111e5565b9061126b565b905061062933836112ad565b6005546040516370a0823160e01b815230600482015260009161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610677573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069b91906118f5565b9050818110156107bc5760006106b183836113b9565b60095460055460405163f3fef3a360e01b81526001600160a01b036101009092048216600482015260248101849052929350169063f3fef3a390604401600060405180830381600087803b15801561070857600080fd5b505af115801561071c573d6000803e3d6000fd5b50506005546040516370a0823160e01b8152306004820152600093506101009091046001600160a01b031691506370a0823190602401602060405180830381865afa15801561076f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079391906118f5565b905060006107a182856113b9565b9050828110156107b8576107b584826113fb565b94505b5050505b6005546107d89061010090046001600160a01b03163384610ea0565b505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105849185906105e890866113fb565b6007546001600160a01b0316331461085b5760405162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b6044820152606401610473565b6127108111156108c25760405162461bcd60e51b815260206004820152602c60248201527f6e756d657261746f722063616e6e6f742062652067726561746572207468616e60448201526b103232b737b6b4b730ba37b960a11b6064820152608401610473565b600655565b6006546005546040516370a0823160e01b81523060048201526000926109499261271092610617929161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610925573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061191906118f5565b905090565b33600090815260208190526040902054610967906105f7565b565b6008546001600160a01b031633146109af5760405162461bcd60e51b81526020600482015260096024820152682174696d656c6f636b60b81b6044820152606401610473565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6060600480546104f4906118ba565b600061058433846105e885604051806060016040528060258152602001611a43602591393360009081526001602090815260408083206001600160a01b038d16845290915290205491906111ab565b6000610584338484611028565b6007546001600160a01b03163314610a845760405162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b6044820152606401610473565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6009546005546040516370a0823160e01b81526001600160a01b03610100909204821660048201526000926109499216906370a0823190602401602060405180830381865afa158015610afd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2191906118f5565b6005546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015610b6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9191906118f5565b906113fb565b6000610ba1610aa6565b6005546040516370a0823160e01b81523060048201529192506000916101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015610bf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1791906118f5565b600554909150610c379061010090046001600160a01b031633308661145a565b6005546040516370a0823160e01b815230600482015260009161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca991906118f5565b9050610cb581836113b9565b93506000610cc260025490565b610ccd575083610ce7565b610ce484610617610cdd60025490565b88906111e5565b90505b610cf13382611498565b5050505050565b6008546001600160a01b03163314610d3e5760405162461bcd60e51b81526020600482015260096024820152682174696d656c6f636b60b81b6044820152606401610473565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6000610d6a6108c7565b600954600554919250610d8f9161010090046001600160a01b03908116911683610ea0565b60095460055460405163b02bf4b960e01b81526001600160a01b03610100909204821660048201526024810184905291169063b02bf4b990604401600060405180830381600087803b158015610de457600080fd5b505af1158015610cf1573d6000803e3d6000fd5b6005546040516370a0823160e01b81523360048201526109679161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037f91906118f5565b6000610e7660025490565b610e805750600090565b610949610e8c60025490565b610617670de0b6b3a7640000610611610aa6565b6040516001600160a01b0383166024820152604481018290526107d890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261156f565b6001600160a01b038316610f655760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610473565b6001600160a01b038216610fc65760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610473565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b03831661108c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610473565b6001600160a01b0382166110ee5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610473565b61112b816040518060600160405280602681526020016119f5602691396001600160a01b03861660009081526020819052604090205491906111ab565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461115a90826113fb565b6001600160a01b038381166000818152602081815260409182902094909455518481529092918616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910161101b565b600081848411156111cf5760405162461bcd60e51b815260040161047391906117e4565b5060006111dc8486611924565b95945050505050565b6000826111f457506000610588565b6000611200838561193b565b90508261120d858361195a565b146112645760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610473565b9392505050565b600061126483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611641565b6001600160a01b03821661130d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610473565b61134a816040518060600160405280602281526020016119d3602291396001600160a01b03851660009081526020819052604090205491906111ab565b6001600160a01b03831660009081526020819052604090205560025461137090826113b9565b6002556040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b600061126483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ab565b600080611408838561197c565b9050838110156112645760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610473565b6040516001600160a01b03808516602483015283166044820152606481018290526114929085906323b872dd60e01b90608401610ecc565b50505050565b6001600160a01b0382166114ee5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610473565b6002546114fb90826113fb565b6002556001600160a01b03821660009081526020819052604090205461152190826113fb565b6001600160a01b038316600081815260208181526040808320949094559251848152919290917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91016113ad565b60006115c4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661166f9092919063ffffffff16565b8051909150156107d857808060200190518101906115e29190611994565b6107d85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610473565b600081836116625760405162461bcd60e51b815260040161047391906117e4565b5060006111dc848661195a565b606061167e8484600085611686565b949350505050565b6060843b6116d65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610473565b600080866001600160a01b031685876040516116f291906119b6565b60006040518083038185875af1925050503d806000811461172f576040519150601f19603f3d011682016040523d82523d6000602084013e611734565b606091505b5091509150811561174857915061167e9050565b8051156117585780518082602001fd5b8360405162461bcd60e51b815260040161047391906117e4565b80356001600160a01b038116811461178957600080fd5b919050565b600080604083850312156117a157600080fd5b6117aa83611772565b946020939093013593505050565b60005b838110156117d35781810151838201526020016117bb565b838111156114925750506000910152565b60208152600082518060208401526118038160408501602087016117b8565b601f01601f19169190910160400192915050565b60008060006060848603121561182c57600080fd5b61183584611772565b925061184360208501611772565b9150604084013590509250925092565b60006020828403121561186557600080fd5b5035919050565b60006020828403121561187e57600080fd5b61126482611772565b6000806040838503121561189a57600080fd5b6118a383611772565b91506118b160208401611772565b90509250929050565b600181811c908216806118ce57607f821691505b602082108114156118ef57634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561190757600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156119365761193661190e565b500390565b60008160001904831182151516156119555761195561190e565b500290565b60008261197757634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561198f5761198f61190e565b500190565b6000602082840312156119a657600080fd5b8151801515811461126457600080fd5b600082516119c88184602087016117b8565b919091019291505056fe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220f4bed144cd028a03c2065a3f22839bb6c2cb29a0bda1ac087aa57b1a888e707464736f6c634300080b0033

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

000000000000000000000000decc0c09c3b5f6e92ef4184125d5648a66e352980000000000000000000000007a79e2e867d36a91bb47e0929787305c95e793c50000000000000000000000007a79e2e867d36a91bb47e0929787305c95e793c5000000000000000000000000a1d43d97fc5f1026597c67805aa02aae558e0fef

-----Decoded View---------------
Arg [0] : _token (address): 0xDecC0c09c3B5f6e92EF4184125D5648a66E35298
Arg [1] : _governance (address): 0x7A79e2e867d36a91Bb47e0929787305c95E793C5
Arg [2] : _timelock (address): 0x7A79e2e867d36a91Bb47e0929787305c95E793C5
Arg [3] : _controller (address): 0xA1D43D97Fc5F1026597c67805aA02aAe558E0FeF

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000decc0c09c3b5f6e92ef4184125d5648a66e35298
Arg [1] : 0000000000000000000000007a79e2e867d36a91bb47e0929787305c95e793c5
Arg [2] : 0000000000000000000000007a79e2e867d36a91bb47e0929787305c95e793c5
Arg [3] : 000000000000000000000000a1d43d97fc5f1026597c67805aa02aae558e0fef


Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.