Address Details
contract

0x71AD09f7a7E98d6D0c88Ff0358334c92F33bDDD9

Contract Name
NoExternalStrategy
Creator
0x913503–14682a at 0x77330b–725f74
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
1 Transactions
Transfers
2,865 Transfers
Gas Used
28,614
Last Balance Update
18096750
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
NoExternalStrategy




Optimization enabled
true
Compiler version
v0.8.7+commit.e28d00a7




Optimization runs
1500
EVM Version
london




Verified at
2022-09-20T18:14:11.129413Z

project:/contracts/strategies/NoExternalStrategy.sol

// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.7;

import "./IStrategy.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

//*********************************************************************//
// --------------------------- custom errors ------------------------- //
//*********************************************************************//
error INVALID_REWARD_TOKEN();
error TOKEN_TRANSFER_FAILURE();
error TRANSACTIONAL_TOKEN_TRANSFER_FAILURE();

/**
  @notice
  This strategy holds the deposited funds without transferring them to an external protocol.
  @author Francis Odisi & Viraz Malhotra.
*/
contract NoExternalStrategy is Ownable, IStrategy {
    /// @notice inbound token (deposit token) address
    IERC20 public inboundToken;

    /// @notice reward token address
    IERC20[] public rewardTokens;

    //*********************************************************************//
    // ------------------------- external views -------------------------- //
    //*********************************************************************//

    /** 
    @notice
    Get strategy owner address.
    @return Strategy owner.
    */
    function strategyOwner() external view override returns (address) {
        return super.owner();
    }

    /** 
    @notice
    Returns the total accumulated amount (i.e., principal + interest) stored in curve.
    Intended for usage by external clients and in case of variable deposit pools.
    @return Total accumulated amount.
    */
    function getTotalAmount() external view override returns (uint256) {
        return address(inboundToken) == address(0) ? address(this).balance : inboundToken.balanceOf(address(this));
    }

    /** 
    @notice
    Get the expected net deposit amount (amount minus slippage) for a given amount. Used only for AMM strategies.
    @return net amount.
    */
    function getNetDepositAmount(uint256 _amount) external pure override returns (uint256) {
        return _amount;
    }

    /** 
    @notice
    Returns the underlying token address.
    @return Returns the underlying inbound (deposit) token address.
    */
    function getUnderlyingAsset() external view override returns (address) {
        return address(inboundToken);
    }

    /** 
    @notice
    Returns the instances of the reward tokens
    */
    function getRewardTokens() external view override returns (IERC20[] memory) {
        return rewardTokens;
    }

    //*********************************************************************//
    // -------------------------- constructor ---------------------------- //
    //*********************************************************************//

    /** 
    @param _inboundCurrency inbound currency address.
    */
    constructor(address _inboundCurrency, IERC20[] memory _rewardTokens) {
        inboundToken = IERC20(_inboundCurrency);
        for (uint256 i = 0; i < _rewardTokens.length; ) {
            if (address(_rewardTokens[i]) == address(0)) {
                revert INVALID_REWARD_TOKEN();
            }
            unchecked {
                ++i;
            }
        }
        rewardTokens = _rewardTokens;
    }

    //*********************************************************************//
    // ------------------------- internal method -------------------------- //
    //*********************************************************************//
    /** 
    @notice
    Transfers inbound token amount back to pool.
    @param _inboundCurrency Address of the inbound token.
    @param _amount transfer amount
    */
    function _transferInboundTokenToPool(address _inboundCurrency, uint256 _amount) internal {
        if (_inboundCurrency == address(0)) {
            (bool success, ) = msg.sender.call{ value: _amount }("");
            if (!success) {
                revert TRANSACTIONAL_TOKEN_TRANSFER_FAILURE();
            }
        } else {
            bool success = IERC20(_inboundCurrency).transfer(msg.sender, _amount);
            if (!success) {
                revert TOKEN_TRANSFER_FAILURE();
            }
        }
    }

    /**
    @notice
    Deposits funds into this contract.
    @param _inboundCurrency Address of the inbound token.
    @param _minAmount Used for aam strategies, since every strategy overrides from the same strategy interface hence it is defined here.
    _minAmount isn't needed in this strategy but since all strategies override from the same interface and the amm strategies need it hence it is used here.
    */
    function invest(address _inboundCurrency, uint256 _minAmount) external payable override onlyOwner {}

    /**
    @notice
    Withdraws funds from this strategy in case of an early withdrawal.
    @param _inboundCurrency Address of the inbound token.
    @param _amount Amount to withdraw.
    @param _minAmount Used for aam strategies, since every strategy overrides from the same strategy interface hence it is defined here.
    _minAmount isn't needed in this strategy but since all strategies override from the same interface and the amm strategies need it hence it is used here.
    */
    function earlyWithdraw(
        address _inboundCurrency,
        uint256 _amount,
        uint256 _minAmount
    ) external override onlyOwner {
        _transferInboundTokenToPool(_inboundCurrency, _amount);
    }

    /**
    @notice
    Redeems funds from this strategy when the waiting round for the good ghosting pool is over.
    @param _inboundCurrency Address of the inbound token.
    @param _amount Amount to withdraw.
    @param _minAmount Used for aam strategies, since every strategy overrides from the same strategy interface hence it is defined here.
    _minAmount isn't needed in this strategy but since all strategies override from the same interface and the amm strategies need it hence it is used here.
    @param disableRewardTokenClaim Reward claim disable flag.
    */
    function redeem(
        address _inboundCurrency,
        uint256 _amount,
        uint256 _minAmount,
        bool disableRewardTokenClaim
    ) external override onlyOwner {
        uint256 _balance = _inboundCurrency == address(0)
            ? address(this).balance
            : IERC20(_inboundCurrency).balanceOf(address(this));
        // safety check since funds don't get transferred to a extrnal protocol
        if (_amount > _balance) {
            _amount = _balance;
        }

        _transferInboundTokenToPool(_inboundCurrency, _amount);

        if (!disableRewardTokenClaim) {
            for (uint256 i = 0; i < rewardTokens.length; ) {
                // safety check since funds don't get transferred to a extrnal protocol
                if (IERC20(rewardTokens[i]).balanceOf(address(this)) != 0) {
                    bool success = IERC20(rewardTokens[i]).transfer(
                        msg.sender,
                        IERC20(rewardTokens[i]).balanceOf(address(this))
                    );
                    if (!success) {
                        revert TOKEN_TRANSFER_FAILURE();
                    }
                }
                unchecked {
                    ++i;
                }
            }
        }
    }

    /**
    @notice
    Returns total accumulated reward token amount.
    @param disableRewardTokenClaim Reward claim disable flag.
    */
    function getAccumulatedRewardTokenAmounts(bool disableRewardTokenClaim)
        external
        view
        override
        returns (uint256[] memory)
    {
        uint256[] memory amounts = new uint256[](rewardTokens.length);
        for (uint256 i = 0; i < rewardTokens.length; ) {
            amounts[i] = rewardTokens[i].balanceOf(address(this));
            unchecked {
                ++i;
            }
        }
        return amounts;
    }
}
        

/_openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/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.
 */
abstract 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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual 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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
          

/_openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}
          

/_openzeppelin/contracts/utils/Context.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.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 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) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}
          

/project_/contracts/strategies/IStrategy.sol

pragma solidity 0.8.7;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IStrategy {
    function invest(address _inboundCurrency, uint256 _minAmount) external payable;

    function earlyWithdraw(
        address _inboundCurrency,
        uint256 _amount,
        uint256 _minAmount
    ) external;

    function redeem(
        address _inboundCurrency,
        uint256 _amount,
        uint256 _minAmount,
        bool disableRewardTokenClaim
    ) external;

    function getTotalAmount() external view returns (uint256);

    function getNetDepositAmount(uint256 _amount) external view returns (uint256);

    function getAccumulatedRewardTokenAmounts(bool disableRewardTokenClaim) external returns (uint256[] memory);

    function getRewardTokens() external view returns (IERC20[] memory);

    function getUnderlyingAsset() external view returns (address);

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

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_inboundCurrency","internalType":"address"},{"type":"address[]","name":"_rewardTokens","internalType":"contract IERC20[]"}]},{"type":"error","name":"INVALID_REWARD_TOKEN","inputs":[]},{"type":"error","name":"TOKEN_TRANSFER_FAILURE","inputs":[]},{"type":"error","name":"TRANSACTIONAL_TOKEN_TRANSFER_FAILURE","inputs":[]},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"earlyWithdraw","inputs":[{"type":"address","name":"_inboundCurrency","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"uint256","name":"_minAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getAccumulatedRewardTokenAmounts","inputs":[{"type":"bool","name":"disableRewardTokenClaim","internalType":"bool"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNetDepositAmount","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"contract IERC20[]"}],"name":"getRewardTokens","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTotalAmount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getUnderlyingAsset","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"inboundToken","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"invest","inputs":[{"type":"address","name":"_inboundCurrency","internalType":"address"},{"type":"uint256","name":"_minAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"redeem","inputs":[{"type":"address","name":"_inboundCurrency","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"uint256","name":"_minAmount","internalType":"uint256"},{"type":"bool","name":"disableRewardTokenClaim","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"rewardTokens","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"strategyOwner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]}]
              

Contract Creation Code

0x60806040523480156200001157600080fd5b506040516200112e3803806200112e8339810160408190526200003491620001c3565b6200003f33620000e0565b600180546001600160a01b0319166001600160a01b03841617905560005b8151811015620000c15760006001600160a01b0316828281518110620000875762000087620002b5565b60200260200101516001600160a01b03161415620000b857604051631a26e5dd60e31b815260040160405180910390fd5b6001016200005d565b508051620000d790600290602084019062000130565b505050620002fa565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82805482825590600052602060002090810192821562000188579160200282015b828111156200018857825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000151565b50620001969291506200019a565b5090565b5b808211156200019657600081556001016200019b565b8051620001be81620002e1565b919050565b60008060408385031215620001d757600080fd5b8251620001e481620002e1565b602084810151919350906001600160401b03808211156200020457600080fd5b818601915086601f8301126200021957600080fd5b8151818111156200022e576200022e620002cb565b8060051b604051601f19603f83011681018181108582111715620002565762000256620002cb565b604052828152858101935084860182860187018b10156200027657600080fd5b600095505b83861015620002a4576200028f81620001b1565b8552600195909501949386019386016200027b565b508096505050505050509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114620002f757600080fd5b50565b610e24806200030a6000396000f3fe6080604052600436106100dd5760003560e01c80637bb7bed11161007f578063c4f59f9b11610059578063c4f59f9b14610222578063ca63279b14610244578063e3daf456146101f1578063f2fde38b1461027157600080fd5b80637bb7bed1146101d15780638da5cb5b146101f1578063b9b8c2461461020f57600080fd5b806365237abb116100bb57806365237abb1461015b57806365ac43411461018757806365e0d7311461019c578063715018a6146101bc57600080fd5b80631b206b73146100e25780634281b1fb146101195780634bfd657114610139575b600080fd5b3480156100ee57600080fd5b506001546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012557600080fd5b506001546100fc906001600160a01b031681565b34801561014557600080fd5b50610159610154366004610c48565b610291565b005b34801561016757600080fd5b50610179610176366004610cfd565b90565b604051908152602001610110565b34801561019357600080fd5b506101796102ff565b3480156101a857600080fd5b506101596101b7366004610c7b565b610398565b3480156101c857600080fd5b506101596106dd565b3480156101dd57600080fd5b506100fc6101ec366004610cfd565b610743565b3480156101fd57600080fd5b506000546001600160a01b03166100fc565b61015961021d366004610c1e565b61076d565b34801561022e57600080fd5b506102376107cb565b6040516101109190610d2f565b34801561025057600080fd5b5061026461025f366004610cc3565b61082d565b6040516101109190610d7c565b34801561027d57600080fd5b5061015961028c366004610bfc565b61094a565b6000546001600160a01b031633146102f05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6102fa8383610a2c565b505050565b6001546000906001600160a01b031615610393576001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561035657600080fd5b505afa15801561036a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038e9190610d16565b905090565b504790565b6000546001600160a01b031633146103f25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e7565b60006001600160a01b0385161561047f576040516370a0823160e01b81523060048201526001600160a01b038616906370a082319060240160206040518083038186803b15801561044257600080fd5b505afa158015610456573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047a9190610d16565b610481565b475b90508084111561048f578093505b6104998585610a2c565b816106d65760005b6002548110156106d457600281815481106104be576104be610db4565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561050a57600080fd5b505afa15801561051e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105429190610d16565b156106cc5760006002828154811061055c5761055c610db4565b600091825260209091200154600280546001600160a01b039092169163a9059cbb9133918690811061059057610590610db4565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156105dc57600080fd5b505afa1580156105f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106149190610d16565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561067257600080fd5b505af1158015610686573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106aa9190610ce0565b9050806106ca57604051638dc18fdb60e01b815260040160405180910390fd5b505b6001016104a1565b505b5050505050565b6000546001600160a01b031633146107375760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e7565b6107416000610b78565b565b6002818154811061075357600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633146107c75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e7565b5050565b6060600280548060200260200160405190810160405280929190818152602001828054801561082357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610805575b5050505050905090565b60025460609060009067ffffffffffffffff81111561084e5761084e610dca565b604051908082528060200260200182016040528015610877578160200160208202803683370190505b50905060005b600254811015610943576002818154811061089a5761089a610db4565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156108e657600080fd5b505afa1580156108fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091e9190610d16565b82828151811061093057610930610db4565b602090810291909101015260010161087d565b5092915050565b6000546001600160a01b031633146109a45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e7565b6001600160a01b038116610a205760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102e7565b610a2981610b78565b50565b6001600160a01b038216610abc57604051600090339083908381818185875af1925050503d8060008114610a7c576040519150601f19603f3d011682016040523d82523d6000602084013e610a81565b606091505b50509050806102fa576040517f9a98b7a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290526000906001600160a01b0384169063a9059cbb90604401602060405180830381600087803b158015610b2057600080fd5b505af1158015610b34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b589190610ce0565b9050806102fa57604051638dc18fdb60e01b815260040160405180910390fd5b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b0381168114610bf757600080fd5b919050565b600060208284031215610c0e57600080fd5b610c1782610be0565b9392505050565b60008060408385031215610c3157600080fd5b610c3a83610be0565b946020939093013593505050565b600080600060608486031215610c5d57600080fd5b610c6684610be0565b95602085013595506040909401359392505050565b60008060008060808587031215610c9157600080fd5b610c9a85610be0565b935060208501359250604085013591506060850135610cb881610de0565b939692955090935050565b600060208284031215610cd557600080fd5b8135610c1781610de0565b600060208284031215610cf257600080fd5b8151610c1781610de0565b600060208284031215610d0f57600080fd5b5035919050565b600060208284031215610d2857600080fd5b5051919050565b6020808252825182820181905260009190848201906040850190845b81811015610d705783516001600160a01b031683529284019291840191600101610d4b565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610d7057835183529284019291840191600101610d98565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610a2957600080fdfea2646970667358221220f95dca10c01cc8fde8c31e422433a88244d1bf36648eef22ab8487815a2b51d164736f6c63430008070033000000000000000000000000ad2f9f4cd2ae4f2dd2841eb1ea7e162fb4767d4d000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000008427bd503dd3169ccc9aff7326c15258bc3054780000000000000000000000009995cc8f20db5896943afc8ee0ba463259c931ed

Deployed ByteCode

0x6080604052600436106100dd5760003560e01c80637bb7bed11161007f578063c4f59f9b11610059578063c4f59f9b14610222578063ca63279b14610244578063e3daf456146101f1578063f2fde38b1461027157600080fd5b80637bb7bed1146101d15780638da5cb5b146101f1578063b9b8c2461461020f57600080fd5b806365237abb116100bb57806365237abb1461015b57806365ac43411461018757806365e0d7311461019c578063715018a6146101bc57600080fd5b80631b206b73146100e25780634281b1fb146101195780634bfd657114610139575b600080fd5b3480156100ee57600080fd5b506001546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012557600080fd5b506001546100fc906001600160a01b031681565b34801561014557600080fd5b50610159610154366004610c48565b610291565b005b34801561016757600080fd5b50610179610176366004610cfd565b90565b604051908152602001610110565b34801561019357600080fd5b506101796102ff565b3480156101a857600080fd5b506101596101b7366004610c7b565b610398565b3480156101c857600080fd5b506101596106dd565b3480156101dd57600080fd5b506100fc6101ec366004610cfd565b610743565b3480156101fd57600080fd5b506000546001600160a01b03166100fc565b61015961021d366004610c1e565b61076d565b34801561022e57600080fd5b506102376107cb565b6040516101109190610d2f565b34801561025057600080fd5b5061026461025f366004610cc3565b61082d565b6040516101109190610d7c565b34801561027d57600080fd5b5061015961028c366004610bfc565b61094a565b6000546001600160a01b031633146102f05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6102fa8383610a2c565b505050565b6001546000906001600160a01b031615610393576001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561035657600080fd5b505afa15801561036a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038e9190610d16565b905090565b504790565b6000546001600160a01b031633146103f25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e7565b60006001600160a01b0385161561047f576040516370a0823160e01b81523060048201526001600160a01b038616906370a082319060240160206040518083038186803b15801561044257600080fd5b505afa158015610456573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047a9190610d16565b610481565b475b90508084111561048f578093505b6104998585610a2c565b816106d65760005b6002548110156106d457600281815481106104be576104be610db4565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561050a57600080fd5b505afa15801561051e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105429190610d16565b156106cc5760006002828154811061055c5761055c610db4565b600091825260209091200154600280546001600160a01b039092169163a9059cbb9133918690811061059057610590610db4565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156105dc57600080fd5b505afa1580156105f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106149190610d16565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561067257600080fd5b505af1158015610686573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106aa9190610ce0565b9050806106ca57604051638dc18fdb60e01b815260040160405180910390fd5b505b6001016104a1565b505b5050505050565b6000546001600160a01b031633146107375760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e7565b6107416000610b78565b565b6002818154811061075357600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633146107c75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e7565b5050565b6060600280548060200260200160405190810160405280929190818152602001828054801561082357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610805575b5050505050905090565b60025460609060009067ffffffffffffffff81111561084e5761084e610dca565b604051908082528060200260200182016040528015610877578160200160208202803683370190505b50905060005b600254811015610943576002818154811061089a5761089a610db4565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156108e657600080fd5b505afa1580156108fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091e9190610d16565b82828151811061093057610930610db4565b602090810291909101015260010161087d565b5092915050565b6000546001600160a01b031633146109a45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e7565b6001600160a01b038116610a205760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102e7565b610a2981610b78565b50565b6001600160a01b038216610abc57604051600090339083908381818185875af1925050503d8060008114610a7c576040519150601f19603f3d011682016040523d82523d6000602084013e610a81565b606091505b50509050806102fa576040517f9a98b7a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290526000906001600160a01b0384169063a9059cbb90604401602060405180830381600087803b158015610b2057600080fd5b505af1158015610b34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b589190610ce0565b9050806102fa57604051638dc18fdb60e01b815260040160405180910390fd5b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b0381168114610bf757600080fd5b919050565b600060208284031215610c0e57600080fd5b610c1782610be0565b9392505050565b60008060408385031215610c3157600080fd5b610c3a83610be0565b946020939093013593505050565b600080600060608486031215610c5d57600080fd5b610c6684610be0565b95602085013595506040909401359392505050565b60008060008060808587031215610c9157600080fd5b610c9a85610be0565b935060208501359250604085013591506060850135610cb881610de0565b939692955090935050565b600060208284031215610cd557600080fd5b8135610c1781610de0565b600060208284031215610cf257600080fd5b8151610c1781610de0565b600060208284031215610d0f57600080fd5b5035919050565b600060208284031215610d2857600080fd5b5051919050565b6020808252825182820181905260009190848201906040850190845b81811015610d705783516001600160a01b031683529284019291840191600101610d4b565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015610d7057835183529284019291840191600101610d98565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8015158114610a2957600080fdfea2646970667358221220f95dca10c01cc8fde8c31e422433a88244d1bf36648eef22ab8487815a2b51d164736f6c63430008070033