ETH Price: $1,906.48 (+1.99%)
Gas: 34 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multi Chain

Multichain Addresses

0 address found via
Transaction Hash
Method
Block
From
To
Value
0x60806040124121562021-05-11 8:46:34752 days 13 hrs ago1620722794IN
 Create: HSCompound
0 ETH0.54799298251

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HSCompound

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-05-11
*/

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

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

// File: @openzeppelin/contracts/math/SafeMath.sol


pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts/utils/Address.sol


pragma solidity >=0.6.2 <0.8.0;

/**
 * @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");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        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: @openzeppelin/contracts/token/ERC20/SafeERC20.sol


pragma solidity >=0.6.0 <0.8.0;




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

// File: contracts/interface/IERC20Usdt.sol

pragma solidity ^0.6.0;

interface IERC20Usdt {
    function totalSupply() external view returns (uint256);

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

    function transfer(address recipient, uint256 amount) external;

    function allowance(address owner, address spender) external view returns (uint256);

    function approve(address spender, uint256 amount) external;

    function transferFrom(address sender, address recipient, uint256 amount) external;

    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: contracts/Config.sol

pragma solidity ^0.6.0;

contract Config {
    // function signature of "postProcess()"
    bytes4 public constant POSTPROCESS_SIG = 0xc2722916;

    // The base amount of percentage function
    uint256 public constant PERCENTAGE_BASE = 1 ether;

    // Handler post-process type. Others should not happen now.
    enum HandlerType {Token, Custom, Others}
}

// File: contracts/lib/LibCache.sol

pragma solidity ^0.6.0;

library LibCache {
    function set(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key,
        bytes32 _value
    ) internal {
        _cache[_key] = _value;
    }

    function setAddress(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key,
        address _value
    ) internal {
        _cache[_key] = bytes32(uint256(uint160(_value)));
    }

    function setUint256(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key,
        uint256 _value
    ) internal {
        _cache[_key] = bytes32(_value);
    }

    function getAddress(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key
    ) internal view returns (address ret) {
        ret = address(uint160(uint256(_cache[_key])));
    }

    function getUint256(
        mapping(bytes32 => bytes32) storage _cache,
        bytes32 _key
    ) internal view returns (uint256 ret) {
        ret = uint256(_cache[_key]);
    }

    function get(mapping(bytes32 => bytes32) storage _cache, bytes32 _key)
        internal
        view
        returns (bytes32 ret)
    {
        ret = _cache[_key];
    }
}

// File: contracts/lib/LibStack.sol

pragma solidity ^0.6.0;


library LibStack {
    function setAddress(bytes32[] storage _stack, address _input) internal {
        _stack.push(bytes32(uint256(uint160(_input))));
    }

    function set(bytes32[] storage _stack, bytes32 _input) internal {
        _stack.push(_input);
    }

    function setHandlerType(bytes32[] storage _stack, Config.HandlerType _input)
        internal
    {
        _stack.push(bytes12(uint96(_input)));
    }

    function getAddress(bytes32[] storage _stack)
        internal
        returns (address ret)
    {
        ret = address(uint160(uint256(peek(_stack))));
        _stack.pop();
    }

    function getSig(bytes32[] storage _stack) internal returns (bytes4 ret) {
        ret = bytes4(peek(_stack));
        _stack.pop();
    }

    function get(bytes32[] storage _stack) internal returns (bytes32 ret) {
        ret = peek(_stack);
        _stack.pop();
    }

    function peek(bytes32[] storage _stack)
        internal
        view
        returns (bytes32 ret)
    {
        require(_stack.length > 0, "stack empty");
        ret = _stack[_stack.length - 1];
    }
}

// File: contracts/Storage.sol

pragma solidity ^0.6.0;



/// @notice A cache structure composed by a bytes32 array
contract Storage {
    using LibCache for mapping(bytes32 => bytes32);
    using LibStack for bytes32[];

    bytes32[] public stack;
    mapping(bytes32 => bytes32) public cache;

    // keccak256 hash of "msg.sender"
    // prettier-ignore
    bytes32 public constant MSG_SENDER_KEY = 0xb2f2618cecbbb6e7468cc0f2aa43858ad8d153e0280b22285e28e853bb9d453a;

    // keccak256 hash of "cube.counter"
    // prettier-ignore
    bytes32 public constant CUBE_COUNTER_KEY = 0xf9543f11459ccccd21306c8881aaab675ff49d988c1162fd1dd9bbcdbe4446be;

    modifier isStackEmpty() {
        require(stack.length == 0, "Stack not empty");
        _;
    }

    modifier isCubeCounterZero() {
        require(_getCubeCounter() == 0, "Cube counter not zero");
        _;
    }

    modifier isInitialized() {
        require(_getSender() != address(0), "Sender is not initialized");
        _;
    }

    modifier isNotInitialized() {
        require(_getSender() == address(0), "Sender is initialized");
        _;
    }

    function _setSender() internal isNotInitialized {
        cache.setAddress(MSG_SENDER_KEY, msg.sender);
    }

    function _resetSender() internal {
        cache.setAddress(MSG_SENDER_KEY, address(0));
    }

    function _getSender() internal view returns (address) {
        return cache.getAddress(MSG_SENDER_KEY);
    }

    function _addCubeCounter() internal {
        cache.setUint256(CUBE_COUNTER_KEY, _getCubeCounter() + 1);
    }

    function _resetCubeCounter() internal {
        cache.setUint256(CUBE_COUNTER_KEY, 0);
    }

    function _getCubeCounter() internal view returns (uint256) {
        return cache.getUint256(CUBE_COUNTER_KEY);
    }
}

// File: contracts/handlers/HandlerBase.sol

pragma solidity ^0.6.0;





abstract contract HandlerBase is Storage, Config {
    using SafeERC20 for IERC20;

    function postProcess() external payable virtual {
        revert("Invalid post process");
        /* Implementation template
        bytes4 sig = stack.getSig();
        if (sig == bytes4(keccak256(bytes("handlerFunction_1()")))) {
            // Do something
        } else if (sig == bytes4(keccak256(bytes("handlerFunction_2()")))) {
            bytes32 temp = stack.get();
            // Do something
        } else revert("Invalid post process");
        */
    }

    function _updateToken(address token) internal {
        stack.setAddress(token);
        // Ignore token type to fit old handlers
        // stack.setHandlerType(uint256(HandlerType.Token));
    }

    function _updatePostProcess(bytes32[] memory params) internal {
        for (uint256 i = params.length; i > 0; i--) {
            stack.set(params[i - 1]);
        }
        stack.set(msg.sig);
        stack.setHandlerType(HandlerType.Custom);
    }

    function getContractName() public pure virtual returns (string memory);

    function _revertMsg(string memory functionName, string memory reason)
        internal
        view
    {
        revert(
            string(
                abi.encodePacked(
                    _uint2String(_getCubeCounter()),
                    "_",
                    getContractName(),
                    "_",
                    functionName,
                    ": ",
                    reason
                )
            )
        );
    }

    function _revertMsg(string memory functionName) internal view {
        _revertMsg(functionName, "Unspecified");
    }

    function _uint2String(uint256 n) internal pure returns (string memory) {
        if (n == 0) {
            return "0";
        } else {
            uint256 len = 0;
            for (uint256 temp = n; temp > 0; temp /= 10) {
                len++;
            }
            bytes memory str = new bytes(len);
            for (uint256 i = len; i > 0; i--) {
                str[i - 1] = bytes1(uint8(48 + (n % 10)));
                n /= 10;
            }
            return string(str);
        }
    }

    function _getBalance(address token, uint256 amount)
        internal
        view
        returns (uint256)
    {
        if (amount != uint256(-1)) {
            return amount;
        }

        // ETH case
        if (
            token == address(0) ||
            token == address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
        ) {
            return address(this).balance;
        }
        // ERC20 token case
        return IERC20(token).balanceOf(address(this));
    }

    function _tokenApprove(
        address token,
        address spender,
        uint256 amount
    ) internal {
        try IERC20Usdt(token).approve(spender, amount) {} catch {
            IERC20(token).safeApprove(spender, 0);
            IERC20(token).safeApprove(spender, amount);
        }
    }
}

// File: contracts/handlers/maker/IDSProxy.sol

pragma solidity ^0.6.0;

interface IDSProxy {
    function execute(address _target, bytes calldata _data) external payable returns (bytes32 response);
    function owner() external view returns (address);
    function setAuthority(address authority_) external;
}

interface IDSProxyFactory {
    function isProxy(address proxy) external view returns (bool);
    function build() external returns (address);
    function build(address owner) external returns (address);
}

interface IDSProxyRegistry {
    function proxies(address input) external view returns (address);
    function build() external returns (address);
    function build(address owner) external returns (address);
}

// File: contracts/handlers/compound/ICToken.sol

pragma solidity ^0.6.0;

interface ICToken {
    function mint(uint mintAmount) external returns (uint);
    function redeem(uint redeemTokens) external returns (uint);
    function redeemUnderlying(uint redeemAmount) external returns (uint);
    function borrow(uint borrowAmount) external returns (uint);
    function repayBorrow(uint repayAmount) external returns (uint);
    function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);
    function transfer(address dst, uint amount) external returns (bool);
    function transferFrom(address src, address dst, uint amount) external returns (bool);
    function approve(address spender, uint amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function balanceOfUnderlying(address owner) external returns (uint);
    function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);
    function borrowRatePerBlock() external view returns (uint);
    function supplyRatePerBlock() external view returns (uint);
    function totalBorrowsCurrent() external returns (uint);
    function borrowBalanceCurrent(address account) external returns (uint);
    function borrowBalanceStored(address account) external view returns (uint);
    function exchangeRateCurrent() external returns (uint);
    function exchangeRateStored() external view returns (uint);
    function getCash() external view returns (uint);
    function accrueInterest() external returns (uint);
    function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);

    function underlying() external view returns (address);

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function admin() external view returns (address);
    function pendingAdmin() external view returns (address);
    function reserveFactorMantissa() external view returns (uint256);
    function accrualBlockNumber() external view returns (uint256);
    function borrowIndex() external view returns (uint256);
    function totalBorrows() external view returns (uint256);
    function totalReserves() external view returns (uint256);
    function totalSupply() external view returns (uint256);
}

// File: contracts/handlers/compound/IComptroller.sol

pragma solidity ^0.6.0;

interface IComptroller {
    function enterMarkets  (address[] calldata cTokens) external returns (uint[] memory);
    function exitMarket(address cToken) external returns (uint);
    function checkMembership(address account, address cToken) external view returns (bool);
    function claimComp(address holder) external;
    function getCompAddress() external view returns(address);
}

// File: contracts/handlers/compound/HSCompound.sol

pragma solidity ^0.6.0;






contract HSCompound is HandlerBase {
    using SafeERC20 for IERC20;

    // prettier-ignore
    address public constant FCOMPOUND_ACTIONS = 0x05EF8eb657027927fAB9b279138f0189CB144976;
    // prettier-ignore
    address public constant COMPTROLLER = 0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B;
    // prettier-ignore
    address public constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
    // prettier-ignore
    address public constant CETH_ADDRESS = 0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5;
    // prettier-ignore
    address public constant COMP_ADDRESS = 0xc00e94Cb662C3520282E6f5717214004A7f26888;

    function getContractName() public pure override returns (string memory) {
        return "HSCompound";
    }

    modifier isDSProxyOwner(address dsProxy) {
        address sender = _getSender();
        if (IDSProxy(dsProxy).owner() != sender)
            _revertMsg("General", "Not owner of the DSProxy");
        _;
    }

    function deposit(
        address dsProxy,
        address token,
        uint256 amount
    ) external payable isDSProxyOwner(dsProxy) {
        _deposit(dsProxy, token, amount);
    }

    function withdraw(
        address dsProxy,
        address token,
        uint256 amount
    ) external payable isDSProxyOwner(dsProxy) {
        _withdraw(dsProxy, token, amount);
        if (token != ETH_ADDRESS) _updateToken(token);
    }

    function borrow(
        address dsProxy,
        address cTokenIn,
        address cTokenBorrow,
        uint256 cAmountIn,
        uint256 uBorrowAmount,
        bool enterMarket
    ) external payable isDSProxyOwner(dsProxy) {
        if (cAmountIn > 0) {
            _deposit(dsProxy, cTokenIn, cAmountIn);
        }

        if (enterMarket) {
            _enterMarket(dsProxy, cTokenIn);
        }

        if (uBorrowAmount > 0) {
            address underlying;
            if (cTokenBorrow == CETH_ADDRESS) {
                underlying = ETH_ADDRESS;
            } else {
                underlying = _getToken(cTokenBorrow);
            }
            // Execute borrow, borrowed token will stay in the DSProxy
            try
                IDSProxy(dsProxy).execute(
                    FCOMPOUND_ACTIONS,
                    abi.encodeWithSelector(
                        // selector of "borrow(address,uint256)"
                        0x4b8a3529,
                        cTokenBorrow,
                        uBorrowAmount
                    )
                )
            {} catch Error(string memory reason) {
                _revertMsg("borrow", reason);
            } catch {
                _revertMsg("borrow");
            }
            // Withdraw borrowed token from the DSProxy
            _withdraw(dsProxy, underlying, uBorrowAmount);

            // Update borrowed token
            if (underlying != ETH_ADDRESS) _updateToken(underlying);
        }
    }

    function repayBorrow(
        address dsProxy,
        address cTokenRepay,
        address cTokenWithdraw,
        uint256 uRepayAmount,
        uint256 cWithdrawAmount
    ) external payable isDSProxyOwner(dsProxy) {
        // Execute repay only when `uRepayAmount` is greater than 0
        if (uRepayAmount > 0) {
            if (cTokenRepay == CETH_ADDRESS) {
                // Execute ether repay
                try
                    IDSProxy(dsProxy).execute{value: uRepayAmount}(
                        FCOMPOUND_ACTIONS,
                        abi.encodeWithSelector(
                            // selector of "repayBorrow(address,uint256)"
                            0xabdb5ea8,
                            cTokenRepay,
                            uRepayAmount
                        )
                    )
                {} catch Error(string memory reason) {
                    _revertMsg("repayBorrow", reason);
                } catch {
                    _revertMsg("repayBorrow");
                }
            } else {
                // Approve repay token to DSProxy
                address underlying = _getToken(cTokenRepay);
                IERC20(underlying).safeApprove(dsProxy, uRepayAmount);
                // Execute token repay
                try
                    IDSProxy(dsProxy).execute(
                        FCOMPOUND_ACTIONS,
                        abi.encodeWithSelector(
                            // selector of "repayBorrow(address,uint256)"
                            0xabdb5ea8,
                            cTokenRepay,
                            uRepayAmount
                        )
                    )
                {} catch Error(string memory reason) {
                    _revertMsg("repayBorrow", reason);
                } catch {
                    _revertMsg("repayBorrow");
                }
                IERC20(underlying).safeApprove(dsProxy, 0);
            }
        }

        if (cWithdrawAmount > 0) {
            // Withdraw collateral from DSProxy
            _withdraw(dsProxy, cTokenWithdraw, cWithdrawAmount);
            // Update collateral token
            _updateToken(cTokenWithdraw);
        }
    }

    function enterMarket(address dsProxy, address cToken)
        external
        payable
        isDSProxyOwner(dsProxy)
    {
        _enterMarket(dsProxy, cToken);
    }

    function enterMarkets(address dsProxy, address[] calldata cTokens)
        external
        payable
        isDSProxyOwner(dsProxy)
    {
        try
            IDSProxy(dsProxy).execute(
                FCOMPOUND_ACTIONS,
                abi.encodeWithSelector(
                    // selector of "enterMarkets(address[])"
                    0xc2998238,
                    cTokens
                )
            )
        {} catch Error(string memory reason) {
            _revertMsg("enterMarkets", reason);
        } catch {
            _revertMsg("enterMarkets");
        }
    }

    function exitMarket(address dsProxy, address cToken)
        external
        payable
        isDSProxyOwner(dsProxy)
    {
        try
            IDSProxy(dsProxy).execute(
                FCOMPOUND_ACTIONS,
                abi.encodeWithSelector(
                    // selector of "exitMarket(address)"
                    0xede4edd0,
                    cToken
                )
            )
        {} catch Error(string memory reason) {
            _revertMsg("exitMarket", reason);
        } catch {
            _revertMsg("exitMarket");
        }
    }

    function claimComp(address dsProxy)
        external
        payable
        isDSProxyOwner(dsProxy)
        returns (uint256)
    {
        try IComptroller(COMPTROLLER).claimComp(dsProxy) {} catch Error(
            string memory reason
        ) {
            _revertMsg("claimComp", reason);
        } catch {
            _revertMsg("claimComp");
        }
        uint256 balance = IERC20(COMP_ADDRESS).balanceOf(dsProxy);
        // Withdraw whole COMP balance of DSProxy
        _withdraw(dsProxy, COMP_ADDRESS, balance);
        _updateToken(COMP_ADDRESS);

        return balance;
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    function _deposit(
        address dsProxy,
        address token,
        uint256 amount
    ) internal {
        if (token == ETH_ADDRESS) {
            address payable dsProxyPayable = address(uint160(dsProxy));
            dsProxyPayable.transfer(amount);
        } else {
            IERC20(token).safeTransfer(dsProxy, amount);
        }
    }

    function _withdraw(
        address dsProxy,
        address token,
        uint256 amount
    ) internal {
        try
            IDSProxy(dsProxy).execute(
                FCOMPOUND_ACTIONS,
                abi.encodeWithSelector(
                    // selector of "withdraw(address,uint256)"
                    0xf3fef3a3,
                    token,
                    amount
                )
            )
        {} catch Error(string memory reason) {
            _revertMsg("_withdraw", reason);
        } catch {
            _revertMsg("_withdraw");
        }
    }

    function _enterMarket(address dsProxy, address cToken) internal {
        try
            IDSProxy(dsProxy).execute(
                FCOMPOUND_ACTIONS,
                abi.encodeWithSelector(
                    // selector of "enterMarket(address)"
                    0x3fe5d425,
                    cToken
                )
            )
        {} catch Error(string memory reason) {
            _revertMsg("_enterMarket", reason);
        } catch {
            _revertMsg("_enterMarket");
        }
    }

    function _getToken(address token) internal view returns (address) {
        return ICToken(token).underlying();
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"CETH_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COMPTROLLER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COMP_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CUBE_COUNTER_KEY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ETH_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FCOMPOUND_ACTIONS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MSG_SENDER_KEY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERCENTAGE_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POSTPROCESS_SIG","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dsProxy","type":"address"},{"internalType":"address","name":"cTokenIn","type":"address"},{"internalType":"address","name":"cTokenBorrow","type":"address"},{"internalType":"uint256","name":"cAmountIn","type":"uint256"},{"internalType":"uint256","name":"uBorrowAmount","type":"uint256"},{"internalType":"bool","name":"enterMarket","type":"bool"}],"name":"borrow","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"cache","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dsProxy","type":"address"}],"name":"claimComp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"dsProxy","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"dsProxy","type":"address"},{"internalType":"address","name":"cToken","type":"address"}],"name":"enterMarket","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"dsProxy","type":"address"},{"internalType":"address[]","name":"cTokens","type":"address[]"}],"name":"enterMarkets","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"dsProxy","type":"address"},{"internalType":"address","name":"cToken","type":"address"}],"name":"exitMarket","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getContractName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"postProcess","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"dsProxy","type":"address"},{"internalType":"address","name":"cTokenRepay","type":"address"},{"internalType":"address","name":"cTokenWithdraw","type":"address"},{"internalType":"uint256","name":"uRepayAmount","type":"uint256"},{"internalType":"uint256","name":"cWithdrawAmount","type":"uint256"}],"name":"repayBorrow","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stack","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dsProxy","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]

608060405234801561001057600080fd5b50612685806100206000396000f3fe60806040526004361061012a5760003560e01c8063a734f06e116100ab578063dc9031c41161006f578063dc9031c41461039d578063e9af0292146103c7578063f53cc4b3146103ed578063f5f5ba721461041b578063fa2901a5146104a5578063fffdb6a0146104d75761012a565b8063a734f06e14610320578063b2b8b7dc14610335578063c27229161461034a578063d6a898c714610352578063d9caed12146103675761012a565b80634ab45d33116100f25780634ab45d33146102655780635f82c67e146102965780638340f549146102ab57806387c13943146102e157806399eb59b9146102f65761012a565b80630f532d181461012f5780631413dc7d1461015657806324991d661461016b5780632e528a371461019b5780634883400d146101e5575b600080fd5b34801561013b57600080fd5b50610144610519565b60408051918252519081900360200190f35b34801561016257600080fd5b5061014461053d565b6101996004803603604081101561018157600080fd5b506001600160a01b0381358116916020013516610561565b005b610199600480360360c08110156101b157600080fd5b506001600160a01b03813581169160208101358216916040820135169060608101359060808101359060a001351515610647565b610199600480360360408110156101fb57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561022657600080fd5b82018360208201111561023857600080fd5b8035906020019184602083028401116401000000008311171561025a57600080fd5b50909250905061098d565b34801561027157600080fd5b5061027a610c4b565b604080516001600160a01b039092168252519081900360200190f35b3480156102a257600080fd5b5061027a610c63565b610199600480360360608110156102c157600080fd5b506001600160a01b03813581169160208101359091169060400135610c7b565b3480156102ed57600080fd5b50610144610d5c565b34801561030257600080fd5b506101446004803603602081101561031957600080fd5b5035610d68565b34801561032c57600080fd5b5061027a610d7a565b34801561034157600080fd5b5061027a610d92565b610199610daa565b34801561035e57600080fd5b5061027a610dee565b6101996004803603606081101561037d57600080fd5b506001600160a01b03813581169160208101359091169060400135610e06565b3480156103a957600080fd5b50610144600480360360208110156103c057600080fd5b5035610f14565b610144600480360360208110156103dd57600080fd5b50356001600160a01b0316610f32565b6101996004803603604081101561040357600080fd5b506001600160a01b03813581169160200135166111bd565b34801561042757600080fd5b5061043061142e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561046a578181015183820152602001610452565b50505050905090810190601f1680156104975780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104b157600080fd5b506104ba611453565b604080516001600160e01b03199092168252519081900360200190f35b610199600480360360a08110156104ed57600080fd5b506001600160a01b0381358116916020810135821691604082013516906060810135906080013561145e565b7fb2f2618cecbbb6e7468cc0f2aa43858ad8d153e0280b22285e28e853bb9d453a81565b7ff9543f11459ccccd21306c8881aaab675ff49d988c1162fd1dd9bbcdbe4446be81565b81600061056c611926565b9050806001600160a01b0316826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105b157600080fd5b505afa1580156105c5573d6000803e3d6000fd5b505050506040513d60208110156105db57600080fd5b50516001600160a01b031614610637576106376040518060400160405280600781526020016611d95b995c985b60ca1b8152506040518060400160405280601881526020016000805160206125d0833981519152815250611958565b6106418484611b67565b50505050565b856000610652611926565b9050806001600160a01b0316826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561069757600080fd5b505afa1580156106ab573d6000803e3d6000fd5b505050506040513d60208110156106c157600080fd5b50516001600160a01b03161461071d5761071d6040518060400160405280600781526020016611d95b995c985b60ca1b8152506040518060400160405280601881526020016000805160206125d0833981519152815250611958565b841561072e5761072e888887611d0c565b821561073e5761073e8888611b67565b83156109835760006001600160a01b038716734ddc2d193948926d02f9b1fe9e1daa0718270ed51415610786575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee610792565b61078f87611d84565b90505b886001600160a01b0316631cff79cd7305ef8eb657027927fab9b279138f0189cb144976634b8a35298a8960405160240180836001600160a01b03168152602001828152602001925050506040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040518363ffffffff1660e01b815260040180836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561086457818101518382015260200161084c565b50505050905090810190601f1680156108915780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1580156108b157600080fd5b505af19250505080156108d657506040513d60208110156108d157600080fd5b505160015b610947576108e2612504565b806108ed575061091b565b61091560405180604001604052806006815260200165626f72726f7760d01b81525082611958565b50610942565b61094260405180604001604052806006815260200165626f72726f7760d01b815250611df3565b610949565b505b610954898287611e23565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146109815761098181611fc2565b505b5050505050505050565b826000610998611926565b9050806001600160a01b0316826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109dd57600080fd5b505afa1580156109f1573d6000803e3d6000fd5b505050506040513d6020811015610a0757600080fd5b50516001600160a01b031614610a6357610a636040518060400160405280600781526020016611d95b995c985b60ca1b8152506040518060400160405280601881526020016000805160206125d0833981519152815250611958565b846001600160a01b0316631cff79cd7305ef8eb657027927fab9b279138f0189cb14497663c2998238878760405160240180806020018281038252848482818152602001925060200280828437600081840152601f19601f82011690508083019250505093505050506040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040518363ffffffff1660e01b815260040180836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610b53578181015183820152602001610b3b565b50505050905090810190601f168015610b805780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015610ba057600080fd5b505af1925050508015610bc557506040513d6020811015610bc057600080fd5b505160015b610c4257610bd1612504565b80610bdc5750610c10565b610c0a6040518060400160405280600c81526020016b656e7465724d61726b65747360a01b81525082611958565b50610c3d565b610c3d6040518060400160405280600c81526020016b656e7465724d61726b65747360a01b815250611df3565b610c44565b505b5050505050565b734ddc2d193948926d02f9b1fe9e1daa0718270ed581565b733d9819210a31b4961b30ef54be2aed79b9c9cd3b81565b826000610c86611926565b9050806001600160a01b0316826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ccb57600080fd5b505afa158015610cdf573d6000803e3d6000fd5b505050506040513d6020811015610cf557600080fd5b50516001600160a01b031614610d5157610d516040518060400160405280600781526020016611d95b995c985b60ca1b8152506040518060400160405280601881526020016000805160206125d0833981519152815250611958565b610c44858585611d0c565b670de0b6b3a764000081565b60016020526000908152604090205481565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b73c00e94cb662c3520282e6f5717214004a7f2688881565b6040805162461bcd60e51b8152602060048201526014602482015273496e76616c696420706f73742070726f6365737360601b604482015290519081900360640190fd5b7305ef8eb657027927fab9b279138f0189cb14497681565b826000610e11611926565b9050806001600160a01b0316826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e5657600080fd5b505afa158015610e6a573d6000803e3d6000fd5b505050506040513d6020811015610e8057600080fd5b50516001600160a01b031614610edc57610edc6040518060400160405280600781526020016611d95b995c985b60ca1b8152506040518060400160405280601881526020016000805160206125d0833981519152815250611958565b610ee7858585611e23565b6001600160a01b03841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610c4457610c4484611fc2565b60008181548110610f2157fe5b600091825260209091200154905081565b6000816000610f3f611926565b9050806001600160a01b0316826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f8457600080fd5b505afa158015610f98573d6000803e3d6000fd5b505050506040513d6020811015610fae57600080fd5b50516001600160a01b03161461100a5761100a6040518060400160405280600781526020016611d95b995c985b60ca1b8152506040518060400160405280601881526020016000805160206125d0833981519152815250611958565b604080516374d7814960e11b81526001600160a01b03861660048201529051733d9819210a31b4961b30ef54be2aed79b9c9cd3b9163e9af029291602480830192600092919082900301818387803b15801561106557600080fd5b505af1925050508015611076575060015b6110e857611082612504565b8061108d57506110be565b6110b8604051806040016040528060098152602001680636c61696d436f6d760bc1b81525082611958565b506110e8565b6110e8604051806040016040528060098152602001680636c61696d436f6d760bc1b815250611df3565b600073c00e94cb662c3520282e6f5717214004a7f268886001600160a01b03166370a08231866040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561114b57600080fd5b505afa15801561115f573d6000803e3d6000fd5b505050506040513d602081101561117557600080fd5b505190506111988573c00e94cb662c3520282e6f5717214004a7f2688883611e23565b6111b573c00e94cb662c3520282e6f5717214004a7f26888611fc2565b949350505050565b8160006111c8611926565b9050806001600160a01b0316826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561120d57600080fd5b505afa158015611221573d6000803e3d6000fd5b505050506040513d602081101561123757600080fd5b50516001600160a01b031614611293576112936040518060400160405280600781526020016611d95b995c985b60ca1b8152506040518060400160405280601881526020016000805160206125d0833981519152815250611958565b604080516001600160a01b03858116602480840191909152835180840382018152604493840185526020810180516001600160e01b0316630ede4edd60e41b1781528551631cff79cd60e01b81527305ef8eb657027927fab9b279138f0189cb144976600482018181529482019788528351968201969096528251948b1696631cff79cd969593949390926064909201919080838360005b8381101561134357818101518382015260200161132b565b50505050905090810190601f1680156113705780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561139057600080fd5b505af19250505080156113b557506040513d60208110156113b057600080fd5b505160015b610c44576113c1612504565b806113cc57506113fe565b6113f86040518060400160405280600a815260200169195e1a5d13585c9ad95d60b21b81525082611958565b50611429565b6114296040518060400160405280600a815260200169195e1a5d13585c9ad95d60b21b815250611df3565b610641565b60408051808201909152600a8152691214d0dbdb5c1bdd5b9960b21b60208201525b90565b636139148b60e11b81565b846000611469611926565b9050806001600160a01b0316826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114ae57600080fd5b505afa1580156114c2573d6000803e3d6000fd5b505050506040513d60208110156114d857600080fd5b50516001600160a01b031614611534576115346040518060400160405280600781526020016611d95b995c985b60ca1b8152506040518060400160405280601881526020016000805160206125d0833981519152815250611958565b8315611903576001600160a01b038616734ddc2d193948926d02f9b1fe9e1daa0718270ed5141561170a57604080516001600160a01b038881166024808401919091526044808401899052845180850382018152606494850186526020810180516001600160e01b031663157b6bd560e31b1781528651631cff79cd60e01b81527305ef8eb657027927fab9b279138f0189cb144976600482018181529582019889528351948201949094528251958f1697631cff79cd978d979596949591939201919080838360005b838110156116165781810151838201526020016115fe565b50505050905090810190601f1680156116435780820380516001836020036101000a031916815260200191505b5093505050506020604051808303818588803b15801561166257600080fd5b505af19350505050801561168857506040513d602081101561168357600080fd5b505160015b61170357611694612504565b8061169f57506116d2565b6116cc6040518060400160405280600b81526020016a7265706179426f72726f7760a81b81525082611958565b506116fe565b6116fe6040518060400160405280600b81526020016a7265706179426f72726f7760a81b815250611df3565b611705565b505b611903565b600061171587611d84565b905061172b6001600160a01b0382168987611fcd565b876001600160a01b0316631cff79cd7305ef8eb657027927fab9b279138f0189cb14497663abdb5ea88a8960405160240180836001600160a01b03168152602001828152602001925050506040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040518363ffffffff1660e01b815260040180836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b838110156117fd5781810151838201526020016117e5565b50505050905090810190601f16801561182a5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561184a57600080fd5b505af192505050801561186f57506040513d602081101561186a57600080fd5b505160015b6118ea5761187b612504565b8061188657506118b9565b6118b36040518060400160405280600b81526020016a7265706179426f72726f7760a81b81525082611958565b506118e5565b6118e56040518060400160405280600b81526020016a7265706179426f72726f7760a81b815250611df3565b6118ec565b505b6119016001600160a01b038216896000611fcd565b505b821561191d57611914878685611e23565b61191d85611fc2565b50505050505050565b600061195360017fb2f2618cecbbb6e7468cc0f2aa43858ad8d153e0280b22285e28e853bb9d453a6120e0565b905090565b6119686119636120f3565b612120565b61197061142e565b83836040516020018085805190602001908083835b602083106119a45780518252601f199092019160209182019101611985565b6001836020036101000a03801982511681845116808217855250505050505090500180605f60f81b81525060010184805190602001908083835b602083106119fd5780518252601f1990920191602091820191016119de565b6001836020036101000a03801982511681845116808217855250505050505090500180605f60f81b81525060010183805190602001908083835b60208310611a565780518252601f199092019160209182019101611a37565b51815160209384036101000a60001901801990921691161790526101d160f51b919093019081528451600290910192850191508083835b60208310611aac5780518252601f199092019160209182019101611a8d565b6001836020036101000a03801982511681845116808217855250505050505090500194505050505060405160208183030381529060405260405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611b2c578181015183820152602001611b14565b50505050905090810190601f168015611b595780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b604080516001600160a01b03838116602480840191909152835180840382018152604493840185526020810180516001600160e01b0316633fe5d42560e01b1781528551631cff79cd60e01b81527305ef8eb657027927fab9b279138f0189cb14497660048201818152948201978852835196820196909652825194891696631cff79cd969593949390926064909201919080838360005b83811015611c17578181015183820152602001611bff565b50505050905090810190601f168015611c445780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015611c6457600080fd5b505af1925050508015611c8957506040513d6020811015611c8457600080fd5b505160015b611d0657611c95612504565b80611ca05750611cd4565b611cce6040518060400160405280600c81526020016b17d95b9d195c93585c9ad95d60a21b81525082611958565b50611d01565b611d016040518060400160405280600c81526020016b17d95b9d195c93585c9ad95d60a21b815250611df3565b611d08565b505b5050565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611d705760405183906001600160a01b0382169083156108fc029084906000818181858888f19350505050158015611d69573d6000803e3d6000fd5b5050611d06565b611d066001600160a01b03831684836121f8565b6000816001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015611dbf57600080fd5b505afa158015611dd3573d6000803e3d6000fd5b505050506040513d6020811015611de957600080fd5b505190505b919050565b611e20816040518060400160405280600b81526020016a155b9cdc1958da599a595960aa1b815250611958565b50565b604080516001600160a01b038481166024808401919091526044808401869052845180850382018152606494850186526020810180516001600160e01b031663f3fef3a360e01b1781528651631cff79cd60e01b81527305ef8eb657027927fab9b279138f0189cb144976600482018181529582019889528351948201949094528251958b1697631cff79cd97949693959490939101919080838360005b83811015611ed9578181015183820152602001611ec1565b50505050905090810190601f168015611f065780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015611f2657600080fd5b505af1925050508015611f4b57506040513d6020811015611f4657600080fd5b505160015b61064157611f57612504565b80611f625750611f93565b611f8d604051806040016040528060098152602001685f776974686472617760b81b81525082611958565b50611fbd565b611fbd604051806040016040528060098152602001685f776974686472617760b81b815250611df3565b611d06565b611e2060008261224a565b801580612053575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561202557600080fd5b505afa158015612039573d6000803e3d6000fd5b505050506040513d602081101561204f57600080fd5b5051155b61208e5760405162461bcd60e51b815260040180806020018281038252603681526020018061261a6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052611d0690849061226c565b6000908152602091909152604090205490565b600061195360017ff9543f11459ccccd21306c8881aaab675ff49d988c1162fd1dd9bbcdbe4446be6120e0565b60608161214557506040805180820190915260018152600360fc1b6020820152611dee565b6000825b801561215f5760019190910190600a9004612149565b5060608167ffffffffffffffff8111801561217957600080fd5b506040519080825280601f01601f1916602001820160405280156121a4576020820181803683370190505b509050815b80156121ee57600a850660300160f81b8260018303815181106121c857fe5b60200101906001600160f81b031916908160001a905350600a85049450600019016121a9565b509150611dee9050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611d0690849061226c565b8154600181018355600092835260209092206001600160a01b03909116910155565b60606122c1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661231d9092919063ffffffff16565b805190915015611d06578080602001905160208110156122e057600080fd5b5051611d065760405162461bcd60e51b815260040180806020018281038252602a8152602001806125f0602a913960400191505060405180910390fd5b606061232c8484600085612336565b90505b9392505050565b6060824710156123775760405162461bcd60e51b81526004018080602001828103825260268152602001806125aa6026913960400191505060405180910390fd5b61238085612492565b6123d1576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106124105780518252601f1990920191602091820191016123f1565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612472576040519150601f19603f3d011682016040523d82523d6000602084013e612477565b606091505b5091509150612487828286612498565b979650505050505050565b3b151590565b606083156124a757508161232f565b8251156124b75782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315611b2c578181015183820152602001611b14565b60e01c90565b600060443d101561251457611450565b600481823e6308c379a061252882516124fe565b1461253257611450565b6040513d600319016004823e80513d67ffffffffffffffff81602484011181841117156125625750505050611450565b8284019250825191508082111561257c5750505050611450565b503d8301602082840101111561259457505050611450565b601f01601f191681016020016040529150509056fe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4e6f74206f776e6572206f662074686520445350726f787900000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212203a5e560478788646cf713391dc242d0456c777acf6400f705ad561d29d9fc88c64736f6c634300060c0033

Deployed ByteCode Sourcemap

31472:8933:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22974:107;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;23155:109;;;;;;;;;;;;;:::i;36718:175::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;36718:175:0;;;;;;;;;;:::i;:::-;;32911:1532;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;32911:1532:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;36901:604::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;36901:604:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36901:604:0;;-1:-1:-1;36901:604:0;-1:-1:-1;36901:604:0;:::i;31912:81::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;31912:81:0;;;;;;;;;;;;;;31690:80;;;;;;;;;;;;;:::i;32455:191::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;32455:191:0;;;;;;;;;;;;;;;;;:::i;19957:49::-;;;;;;;;;;;;;:::i;22862:40::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22862:40:0;;:::i;31801:80::-;;;;;;;;;;;;;:::i;32024:81::-;;;;;;;;;;;;;:::i;24624:479::-;;;:::i;31573:86::-;;;;;;;;;;;;;:::i;32654:249::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;32654:249:0;;;;;;;;;;;;;;;;;:::i;22833:22::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22833:22:0;;:::i;38102:614::-;;;;;;;;;;;;;;;;-1:-1:-1;38102:614:0;-1:-1:-1;;;;;38102:614:0;;:::i;37513:581::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;37513:581:0;;;;;;;;;;:::i;32114:110::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19850:51;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;19850:51:0;;;;;;;;;;;;;;34451:2259;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;34451:2259:0;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;22974:107::-;23015:66;22974:107;:::o;23155:109::-;23198:66;23155:109;:::o;36718:175::-;36831:7;32284:14;32301:12;:10;:12::i;:::-;32284:29;;32357:6;-1:-1:-1;;;;;32328:35:0;32337:7;-1:-1:-1;;;;;32328:23:0;;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32328:25:0;-1:-1:-1;;;;;32328:35:0;;32324:103;;32378:49;;;;;;;;;;;;;;-1:-1:-1;;;32378:49:0;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;32378:49:0;;;:10;:49::i;:::-;36856:29:::1;36869:7;36878:6;36856:12;:29::i;:::-;36718:175:::0;;;;:::o;32911:1532::-;33137:7;32284:14;32301:12;:10;:12::i;:::-;32284:29;;32357:6;-1:-1:-1;;;;;32328:35:0;32337:7;-1:-1:-1;;;;;32328:23:0;;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32328:25:0;-1:-1:-1;;;;;32328:35:0;;32324:103;;32378:49;;;;;;;;;;;;;;-1:-1:-1;;;32378:49:0;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;32378:49:0;;;:10;:49::i;:::-;33161:13;;33157:84:::1;;33191:38;33200:7;33209:8;33219:9;33191:8;:38::i;:::-;33257:11;33253:75;;;33285:31;33298:7;33307:8;33285:12;:31::i;:::-;33344:17:::0;;33340:1096:::1;;33378:18;-1:-1:-1::0;;;;;33415:28:0;::::1;31951:42;33415:28;33411:170;;;-1:-1:-1::0;31839:42:0::1;33411:170;;;33542:23;33552:12;33542:9;:23::i;:::-;33529:36;;33411:170;33697:7;-1:-1:-1::0;;;;;33688:25:0::1;;31617:42;33891:10;33928:12;33967:13;33776:227;;;;;;-1:-1:-1::0;;;;;33776:227:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;33776:227:0::1;;;;;;;;;;;33688:334;;;;;;;;;;;;;-1:-1:-1::0;;;;;33688:334:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;33688:334:0;::::1;;33667:531;;;;:::i;:::-;;;;;;;;34092:28;;;;;;;;;;;;;;-1:-1:-1::0;;;34092:28:0::1;;::::0;34113:6:::1;34092:10;:28::i;:::-;34039:97;33667:531;;;34162:20;;;;;;;;;;;;;;-1:-1:-1::0;;;34162:20:0::1;;::::0;:10:::1;:20::i;:::-;33667:531;;;;;34269:45;34279:7;34288:10;34300:13;34269:9;:45::i;:::-;-1:-1:-1::0;;;;;34373:25:0;::::1;31839:42;34373:25;34369:55;;34400:24;34413:10;34400:12;:24::i;:::-;33340:1096;;32911:1532:::0;;;;;;;;:::o;36901:604::-;37027:7;32284:14;32301:12;:10;:12::i;:::-;32284:29;;32357:6;-1:-1:-1;;;;;32328:35:0;32337:7;-1:-1:-1;;;;;32328:23:0;;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32328:25:0;-1:-1:-1;;;;;32328:35:0;;32324:103;;32378:49;;;;;;;;;;;;;;-1:-1:-1;;;32378:49:0;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;32378:49:0;;;:10;:49::i;:::-;37078:7:::1;-1:-1:-1::0;;;;;37069:25:0::1;;31617:42;37256:10;37289:7;;37149:166;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;37149:166:0::1;;;;;;;;;;;37069:261;;;;;;;;;;;;;-1:-1:-1::0;;;;;37069:261:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;37069:261:0;::::1;;37052:446;;;;:::i;:::-;;;;;;;;37392:34;;;;;;;;;;;;;;-1:-1:-1::0;;;37392:34:0::1;;::::0;37419:6:::1;37392:10;:34::i;:::-;37343:95;37052:446;;;37460:26;;;;;;;;;;;;;;-1:-1:-1::0;;;37460:26:0::1;;::::0;:10:::1;:26::i;:::-;37052:446;;;;;36901:604:::0;;;;;:::o;31912:81::-;31951:42;31912:81;:::o;31690:80::-;31728:42;31690:80;:::o;32455:191::-;32586:7;32284:14;32301:12;:10;:12::i;:::-;32284:29;;32357:6;-1:-1:-1;;;;;32328:35:0;32337:7;-1:-1:-1;;;;;32328:23:0;;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32328:25:0;-1:-1:-1;;;;;32328:35:0;;32324:103;;32378:49;;;;;;;;;;;;;;-1:-1:-1;;;32378:49:0;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;32378:49:0;;;:10;:49::i;:::-;32606:32:::1;32615:7;32624:5;32631:6;32606:8;:32::i;19957:49::-:0;19999:7;19957:49;:::o;22862:40::-;;;;;;;;;;;;;:::o;31801:80::-;31839:42;31801:80;:::o;32024:81::-;32063:42;32024:81;:::o;24624:479::-;24683:30;;;-1:-1:-1;;;24683:30:0;;;;;;;;;;;;-1:-1:-1;;;24683:30:0;;;;;;;;;;;;;;31573:86;31617:42;31573:86;:::o;32654:249::-;32786:7;32284:14;32301:12;:10;:12::i;:::-;32284:29;;32357:6;-1:-1:-1;;;;;32328:35:0;32337:7;-1:-1:-1;;;;;32328:23:0;;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32328:25:0;-1:-1:-1;;;;;32328:35:0;;32324:103;;32378:49;;;;;;;;;;;;;;-1:-1:-1;;;32378:49:0;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;32378:49:0;;;:10;:49::i;:::-;32806:33:::1;32816:7;32825:5;32832:6;32806:9;:33::i;:::-;-1:-1:-1::0;;;;;32854:20:0;::::1;31839:42;32854:20;32850:45;;32876:19;32889:5;32876:12;:19::i;22833:22::-:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22833:22:0;:::o;38102:614::-;38224:7;38197;32284:14;32301:12;:10;:12::i;:::-;32284:29;;32357:6;-1:-1:-1;;;;;32328:35:0;32337:7;-1:-1:-1;;;;;32328:23:0;;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32328:25:0;-1:-1:-1;;;;;32328:35:0;;32324:103;;32378:49;;;;;;;;;;;;;;-1:-1:-1;;;32378:49:0;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;32378:49:0;;;:10;:49::i;:::-;38253:44:::1;::::0;;-1:-1:-1;;;38253:44:0;;-1:-1:-1;;;;;38253:44:0;::::1;;::::0;::::1;::::0;;;31728:42:::1;::::0;38253:35:::1;::::0;:44;;;;;-1:-1:-1;;38253:44:0;;;;;;;-1:-1:-1;31728:42:0;38253:44;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;;;;;38249:225;;;;:::i;:::-;;;;;;;;38374:31;;;;;;;;;;;;;;-1:-1:-1::0;;;38374:31:0::1;;::::0;38398:6:::1;38374:10;:31::i;:::-;38301:116;38249:225;;;38439:23;;;;;;;;;;;;;;-1:-1:-1::0;;;38439:23:0::1;;::::0;:10:::1;:23::i;:::-;38484:15;32063:42;-1:-1:-1::0;;;;;38502:30:0::1;;38533:7;38502:39;;;;;;;;;;;;;-1:-1:-1::0;;;;;38502:39:0::1;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;38502:39:0;;-1:-1:-1;38603:41:0::1;38613:7:::0;32063:42:::1;38502:39:::0;38603:9:::1;:41::i;:::-;38655:26;32063:42;38655:12;:26::i;:::-;38701:7:::0;38102:614;-1:-1:-1;;;;38102:614:0:o;37513:581::-;37625:7;32284:14;32301:12;:10;:12::i;:::-;32284:29;;32357:6;-1:-1:-1;;;;;32328:35:0;32337:7;-1:-1:-1;;;;;32328:23:0;;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32328:25:0;-1:-1:-1;;;;;32328:35:0;;32324:103;;32378:49;;;;;;;;;;;;;;-1:-1:-1;;;32378:49:0;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;32378:49:0;;;:10;:49::i;:::-;37747:161:::1;::::0;;-1:-1:-1;;;;;37747:161:0;;::::1;;::::0;;::::1;::::0;;;;;;;;;;;;;;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;37747:161:0::1;-1:-1:-1::0;;;37747:161:0::1;::::0;;37667:256;;-1:-1:-1;;;37667:256:0;;31617:42:::1;37667:256;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;;;:25;;::::1;::::0;::::1;::::0;31617:42;37747:161;;37667:256;;;;;;;;37747:161;37667:256;;37747:161;-1:-1:-1;37667:256:0::1;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;37667:256:0;::::1;;37650:437;;;;:::i;:::-;;;;;;;;37985:32;;;;;;;;;;;;;;-1:-1:-1::0;;;37985:32:0::1;;::::0;38010:6:::1;37985:10;:32::i;:::-;37936:93;37650:437;;;38051:24;;;;;;;;;;;;;;-1:-1:-1::0;;;38051:24:0::1;;::::0;:10:::1;:24::i;:::-;37650:437;;32114:110:::0;32197:19;;;;;;;;;;;;-1:-1:-1;;;32197:19:0;;;;32114:110;;:::o;19850:51::-;-1:-1:-1;;;19850:51:0;:::o;34451:2259::-;34665:7;32284:14;32301:12;:10;:12::i;:::-;32284:29;;32357:6;-1:-1:-1;;;;;32328:35:0;32337:7;-1:-1:-1;;;;;32328:23:0;;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32328:25:0;-1:-1:-1;;;;;32328:35:0;;32324:103;;32378:49;;;;;;;;;;;;;;-1:-1:-1;;;32378:49:0;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;32378:49:0;;;:10;:49::i;:::-;34758:16;;34754:1702:::1;;-1:-1:-1::0;;;;;34795:27:0;::::1;31951:42;34795:27;34791:1654;;;35025:250;::::0;;-1:-1:-1;;;;;35025:250:0;;::::1;;::::0;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;35025:250:0::1;-1:-1:-1::0;;;35025:250:0::1;::::0;;34908:390;;-1:-1:-1;;;34908:390:0;;31617:42:::1;34908:390;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;;;:25;;::::1;::::0;::::1;::::0;34941:12;;31617:42;;35025:250;;34908:390;;;;;35025:250;34908:390;;35025:250;-1:-1:-1;34908:390:0::1;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;34908:390:0;::::1;;34883:621;;;;:::i;:::-;;;;;;;;35376:33;;;;;;;;;;;;;;-1:-1:-1::0;;;35376:33:0::1;;::::0;35402:6:::1;35376:10;:33::i;:::-;35319:110;34883:621;;;35459:25;;;;;;;;;;;;;;-1:-1:-1::0;;;35459:25:0::1;;::::0;:10:::1;:25::i;:::-;34883:621;;;;;34791:1654;;;35595:18;35616:22;35626:11;35616:9;:22::i;:::-;35595:43:::0;-1:-1:-1;35657:53:0::1;-1:-1:-1::0;;;;;35657:30:0;::::1;35688:7:::0;35697:12;35657:30:::1;:53::i;:::-;35803:7;-1:-1:-1::0;;;;;35794:25:0::1;;31617:42;36018:10;36059:11;36101:12;35890:250;;;;;;-1:-1:-1::0;;;;;35890:250:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;35890:250:0::1;;;;;;;;;;;35794:369;;;;;;;;;;;;;-1:-1:-1::0;;;;;35794:369:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;35794:369:0;::::1;;35769:600;;;;:::i;:::-;;;;;;;;36241:33;;;;;;;;;;;;;;-1:-1:-1::0;;;36241:33:0::1;;::::0;36267:6:::1;36241:10;:33::i;:::-;36184:110;35769:600;;;36324:25;;;;;;;;;;;;;;-1:-1:-1::0;;;36324:25:0::1;;::::0;:10:::1;:25::i;:::-;35769:600;;;;;36387:42;-1:-1:-1::0;;;;;36387:30:0;::::1;36418:7:::0;36427:1:::1;36387:30;:42::i;:::-;34791:1654;;36472:19:::0;;36468:235:::1;;36557:51;36567:7;36576:14;36592:15;36557:9;:51::i;:::-;36663:28;36676:14;36663:12;:28::i;:::-;34451:2259:::0;;;;;;;:::o;23983:112::-;24028:7;24055:32;:5;23015:66;24055:16;:32::i;:::-;24048:39;;23983:112;:::o;25661:470::-;25864:31;25877:17;:15;:17::i;:::-;25864:12;:31::i;:::-;25944:17;:15;:17::i;:::-;26010:12;26072:6;25825:272;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;25825:272:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;25825:272:0;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;25825:272:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;25825:272:0;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;25825:272:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;25825:272:0;;;;;;;;;;;-1:-1:-1;;;25825:272:0;;;;;;;;;;;;;;;;;-1:-1:-1;25825:272:0;;;;;;;;;;;;;-1:-1:-1;;25825:272:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25779:344;;-1:-1:-1;;;25779:344:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39751:524;39923:162;;;-1:-1:-1;;;;;39923:162:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;39923:162:0;-1:-1:-1;;;39923:162:0;;;39843:257;;-1:-1:-1;;;39843:257:0;;31617:42;39843:257;;;;;;;;;;;;;;;;;;;;;;;:25;;;;;;31617:42;39923:162;;39843:257;;;;;;;;39923:162;39843:257;;39923:162;-1:-1:-1;39843:257:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39843:257:0;;;39826:442;;;;:::i;:::-;;;;;;;;40162:34;;;;;;;;;;;;;;-1:-1:-1;;;40162:34:0;;;40189:6;40162:10;:34::i;:::-;40113:95;39826:442;;;40230:26;;;;;;;;;;;;;;-1:-1:-1;;;40230:26:0;;;:10;:26::i;:::-;39826:442;;;;;39751:524;;:::o;38778:360::-;-1:-1:-1;;;;;38902:20:0;;31839:42;38902:20;38898:233;;;39012:31;;38988:7;;-1:-1:-1;;;;;39012:23:0;;;:31;;;;;39036:6;;38939:30;39012:31;38939:30;39012:31;39036:6;39012:23;:31;;;;;;;;;;;;;;;;;;;;;38898:233;;;;39076:43;-1:-1:-1;;;;;39076:26:0;;39103:7;39112:6;39076:26;:43::i;40283:119::-;40340:7;40375:5;-1:-1:-1;;;;;40367:25:0;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;40367:27:0;;-1:-1:-1;40283:119:0;;;;:::o;26139:120::-;26212:39;26223:12;26212:39;;;;;;;;;;;;;-1:-1:-1;;;26212:39:0;;;:10;:39::i;:::-;26139:120;:::o;39146:597::-;39364:195;;;-1:-1:-1;;;;;39364:195:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;39364:195:0;-1:-1:-1;;;39364:195:0;;;39284:290;;-1:-1:-1;;;39284:290:0;;31617:42;39284:290;;;;;;;;;;;;;;;;;;;;;;;:25;;;;;;31617:42;;39364:195;;39284:290;;;;;;39364:195;39284:290;;39364:195;-1:-1:-1;39284:290:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39284:290:0;;;39267:469;;;;:::i;:::-;;;;;;;;39636:31;;;;;;;;;;;;;;-1:-1:-1;;;39636:31:0;;;39660:6;39636:10;:31::i;:::-;39587:92;39267:469;;;39701:23;;;;;;;;;;;;;;-1:-1:-1;;;39701:23:0;;;:10;:23::i;:::-;39267:469;;25111:200;25168:23;:5;25185;25168:16;:23::i;16583:622::-;16953:10;;;16952:62;;-1:-1:-1;16969:39:0;;;-1:-1:-1;;;16969:39:0;;16993:4;16969:39;;;;-1:-1:-1;;;;;16969:39:0;;;;;;;;;:15;;;;;;:39;;;;;;;;;;;;;;;:15;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16969:39:0;:44;16952:62;16944:152;;;;-1:-1:-1;;;16944:152:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17134:62;;;-1:-1:-1;;;;;17134:62:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;17134:62:0;-1:-1:-1;;;17134:62:0;;;17107:90;;17127:5;;17107:19;:90::i;20801:203::-;20927:11;20981:12;;;;;;;;;;;;;20801:203::o;24325:119::-;24375:7;24402:34;:5;23198:66;24402:16;:34::i;26267:516::-;26323:13;26353:6;26349:427;;-1:-1:-1;26376:10:0;;;;;;;;;;;;-1:-1:-1;;;26376:10:0;;;;;;26349:427;26419:11;26469:1;26449:85;26472:8;;26449:85;;26513:5;;;;;;26490:2;26482:10;;26449:85;;;;26548:16;26577:3;26567:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26567:14:0;-1:-1:-1;26548:33:0;-1:-1:-1;26613:3:0;26596:136;26618:5;;26596:136;;26685:2;26681:1;:6;26675:2;:13;26662:28;;26649:3;26657:1;26653;:5;26649:10;;;;;;;;;;;:41;-1:-1:-1;;;;;26649:41:0;;;;;;;;-1:-1:-1;26714:2:0;26709:7;;;-1:-1:-1;;;26625:3:0;26596:136;;;-1:-1:-1;26760:3:0;-1:-1:-1;26746:18:0;;-1:-1:-1;26746:18:0;15924:177;16034:58;;;-1:-1:-1;;;;;16034:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16034:58:0;-1:-1:-1;;;16034:58:0;;;16007:86;;16027:5;;16007:19;:86::i;21480:136::-;21562:46;;;;;;;21574:33;21562:46;;;;;;;-1:-1:-1;;;;;21582:24:0;;;21562:46;;;21480:136::o;18229:761::-;18653:23;18679:69;18707:4;18679:69;;;;;;;;;;;;;;;;;18687:5;-1:-1:-1;;;;;18679:27:0;;;:69;;;;;:::i;:::-;18763:17;;18653:95;;-1:-1:-1;18763:21:0;18759:224;;18905:10;18894:30;;;;;;;;;;;;;;;-1:-1:-1;18894:30:0;18886:85;;;;-1:-1:-1;;;18886:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11923:195;12026:12;12058:52;12080:6;12088:4;12094:1;12097:12;12058:21;:52::i;:::-;12051:59;;11923:195;;;;;;:::o;12975:530::-;13102:12;13160:5;13135:21;:30;;13127:81;;;;-1:-1:-1;;;13127:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13227:18;13238:6;13227:10;:18::i;:::-;13219:60;;;;;-1:-1:-1;;;13219:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;13353:12;13367:23;13394:6;-1:-1:-1;;;;;13394:11:0;13414:5;13422:4;13394:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;13394:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13352:75;;;;13445:52;13463:7;13472:10;13484:12;13445:17;:52::i;:::-;13438:59;12975:530;-1:-1:-1;;;;;;;12975:530:0:o;9005:422::-;9372:20;9411:8;;;9005:422::o;14511:742::-;14626:12;14655:7;14651:595;;;-1:-1:-1;14686:10:0;14679:17;;14651:595;14800:17;;:21;14796:439;;15063:10;15057:17;15124:15;15111:10;15107:2;15103:19;15096:44;15011:148;15199:20;;-1:-1:-1;;;15199:20:0;;;;;;;;;;;;;;;;;15206:12;;15199:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;110:106:-1;195:3;191:15;;163:53::o;224:739::-;;297:4;279:16;276:26;273:2;;;305:5;;273:2;339:1;-1:-1;;318:23;414:10;357:34;-1:-1;382:8;357:34;:::i;:::-;406:19;396:2;;429:5;;396:2;460;454:9;496:16;-1:-1;;492:24;339:1;454:9;468:49;543:4;537:11;624:16;576:18;624:16;617:4;609:6;605:17;602:39;576:18;568:6;565:30;556:91;553:2;;;655:5;;;;;;553:2;693:6;687:4;683:17;672:28;;725:3;719:10;705:24;;576:18;740:6;737:30;734:2;;;770:5;;;;;;734:2;;847:16;841:4;837:27;807:4;814:6;802:3;794:27;;829:36;826:2;;;868:5;;;;;826:2;89:7;73:14;-1:-1;;69:28;892:50;;807:4;892:50;460:2;881:62;900:3;-1:-1;;267:696;:::o

Swarm Source

ipfs://3a5e560478788646cf713391dc242d0456c777acf6400f705ad561d29d9fc88c

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.