Contract 0x3B3f747aC68750Eb936e9116141b79358579DE84

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x2003214b03c28d50475980709434860de358b54cb29ddcc877b102de31b115af0x60806040188396602021-09-07 7:42:1942 days 10 hrs ago0x1fa44444291e2066b89969192b731eae6cd2cd25 IN  Contract Creation0 MATIC0.001386805
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HFunds

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 polygonscan.com on 2021-09-07
*/

// 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/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/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/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/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/handlers/HandlerBase.sol

pragma solidity ^0.6.0;





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

    address private constant MATIC_TOKEN =
        0x0000000000000000000000000000000000001010;

    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 {
        _notMaticToken(token);
        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);
        }
    }

    // Do not support matic token (0x0000...1010)
    function _notMaticToken(address token) internal pure {
        require(token != MATIC_TOKEN, "Not support matic token");
    }

    function _notMaticToken(address[] memory tokens) internal pure {
        for (uint256 i = 0; i < tokens.length; i++) {
            require(tokens[i] != MATIC_TOKEN, "Not support matic token");
        }
    }
}

// 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/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/token/ERC20/IERC20.sol



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/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/handlers/funds/HFunds.sol

pragma solidity ^0.6.0;



contract HFunds is HandlerBase {
    using SafeERC20 for IERC20;

    // prettier-ignore
    address public constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

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

    function updateTokens(address[] calldata tokens)
        external
        payable
        returns (uint256[] memory)
    {
        uint256[] memory balances = new uint256[](tokens.length);
        for (uint256 i = 0; i < tokens.length; i++) {
            address token = tokens[i];
            _notMaticToken(token);

            if (token != address(0) && token != ETH_ADDRESS) {
                // Update involved token
                _updateToken(token);
            }
            balances[i] = _getBalance(token, uint256(-1));
        }
        return balances;
    }

    function inject(address[] calldata tokens, uint256[] calldata amounts)
        external
        payable
        returns (uint256[] memory)
    {
        if (tokens.length != amounts.length)
            _revertMsg("inject", "token and amount does not match");
        address sender = _getSender();
        for (uint256 i = 0; i < tokens.length; i++) {
            _notMaticToken(tokens[i]);
            IERC20(tokens[i]).safeTransferFrom(
                sender,
                address(this),
                amounts[i]
            );

            // Update involved token
            _updateToken(tokens[i]);
        }
        return amounts;
    }

    function sendTokens(
        address[] calldata tokens,
        uint256[] calldata amounts,
        address payable receiver
    ) external payable {
        for (uint256 i = 0; i < tokens.length; i++) {
            // token can't be matic token
            _notMaticToken(tokens[i]);

            uint256 amount = _getBalance(tokens[i], amounts[i]);
            if (amount > 0) {
                // ETH case
                if (tokens[i] == address(0) || tokens[i] == ETH_ADDRESS) {
                    receiver.transfer(amount);
                } else {
                    IERC20(tokens[i]).safeTransfer(receiver, amount);
                }
            }
        }
    }

    function send(uint256 amount, address payable receiver) external payable {
        amount = _getBalance(address(0), amount);
        if (amount > 0) {
            receiver.transfer(amount);
        }
    }

    function sendToken(
        address token,
        uint256 amount,
        address receiver
    ) external payable {
        // token can't be matic token
        _notMaticToken(token);

        amount = _getBalance(token, amount);
        if (amount > 0) {
            IERC20(token).safeTransfer(receiver, amount);
        }
    }

    function checkSlippage(
        address[] calldata tokens,
        uint256[] calldata amounts
    ) external payable {
        if (tokens.length != amounts.length) {
            _revertMsg("checkSlippage", "token and amount do not match");
        }

        for (uint256 i = 0; i < tokens.length; i++) {
            // token can't be matic token
            _notMaticToken(tokens[i]);

            if (tokens[i] == address(0)) {
                if (address(this).balance < amounts[i]) {
                    string memory errMsg =
                        string(
                            abi.encodePacked(
                                "error: ",
                                _uint2String(i),
                                "_",
                                _uint2String(address(this).balance)
                            )
                        );
                    _revertMsg("checkSlippage", errMsg);
                }
            } else if (
                IERC20(tokens[i]).balanceOf(address(this)) < amounts[i]
            ) {
                string memory errMsg =
                    string(
                        abi.encodePacked(
                            "error: ",
                            _uint2String(i),
                            "_",
                            _uint2String(
                                IERC20(tokens[i]).balanceOf(address(this))
                            )
                        )
                    );

                _revertMsg("checkSlippage", errMsg);
            }
        }
    }

    function getBalance(address token) external payable returns (uint256) {
        return _getBalance(token, uint256(-1));
    }
}

Contract Security Audit

Contract ABI

[{"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":"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":"bytes32","name":"","type":"bytes32"}],"name":"cache","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"checkSlippage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getContractName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"inject","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"postProcess","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"receiver","type":"address"}],"name":"send","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"sendToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address payable","name":"receiver","type":"address"}],"name":"sendTokens","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":"tokens","type":"address[]"}],"name":"updateTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"payable","type":"function"}]

608060405234801561001057600080fd5b5061181f806100206000396000f3fe6080604052600436106100f35760003560e01c8063c27229161161008a578063de41691c11610059578063de41691c146104cd578063f5f5ba721461053b578063f8b2cb4f146105c5578063fa2901a5146105eb576100f3565b8063c2722916146102cf578063d0797f84146102d7578063db71410e146103e5578063dc9031c4146104a3576100f3565b806381baf3ab116100c657806381baf3ab1461019857806387c139431461025f57806399eb59b914610274578063a734f06e1461029e576100f3565b80630f532d18146100f85780631413dc7d1461011f57806318248f2a14610134578063785d04f51461016c575b600080fd5b34801561010457600080fd5b5061010d61061d565b60408051918252519081900360200190f35b34801561012b57600080fd5b5061010d610641565b61016a6004803603606081101561014a57600080fd5b506001600160a01b03813581169160208101359160409091013516610665565b005b61016a6004803603604081101561018257600080fd5b50803590602001356001600160a01b0316610699565b61016a600480360360608110156101ae57600080fd5b810190602081018135600160201b8111156101c857600080fd5b8201836020820111156101da57600080fd5b803590602001918460208302840111600160201b831117156101fb57600080fd5b919390929091602081019035600160201b81111561021857600080fd5b82018360208201111561022a57600080fd5b803590602001918460208302840111600160201b8311171561024b57600080fd5b9193509150356001600160a01b03166106e6565b34801561026b57600080fd5b5061010d61084b565b34801561028057600080fd5b5061010d6004803603602081101561029757600080fd5b5035610857565b3480156102aa57600080fd5b506102b3610869565b604080516001600160a01b039092168252519081900360200190f35b61016a610881565b610395600480360360408110156102ed57600080fd5b810190602081018135600160201b81111561030757600080fd5b82018360208201111561031957600080fd5b803590602001918460208302840111600160201b8311171561033a57600080fd5b919390929091602081019035600160201b81111561035757600080fd5b82018360208201111561036957600080fd5b803590602001918460208302840111600160201b8311171561038a57600080fd5b5090925090506108c5565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103d15781810151838201526020016103b9565b505050509050019250505060405180910390f35b61016a600480360360408110156103fb57600080fd5b810190602081018135600160201b81111561041557600080fd5b82018360208201111561042757600080fd5b803590602001918460208302840111600160201b8311171561044857600080fd5b919390929091602081019035600160201b81111561046557600080fd5b82018360208201111561047757600080fd5b803590602001918460208302840111600160201b8311171561049857600080fd5b509092509050610a09565b3480156104af57600080fd5b5061010d600480360360208110156104c657600080fd5b5035610e4b565b610395600480360360208110156104e357600080fd5b810190602081018135600160201b8111156104fd57600080fd5b82018360208201111561050f57600080fd5b803590602001918460208302840111600160201b8311171561053057600080fd5b509092509050610e69565b34801561054757600080fd5b50610550610f5d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561058a578181015183820152602001610572565b50505050905090810190601f1680156105b75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61010d600480360360208110156105db57600080fd5b50356001600160a01b0316610f7d565b3480156105f757600080fd5b50610600610f93565b604080516001600160e01b03199092168252519081900360200190f35b7fb2f2618cecbbb6e7468cc0f2aa43858ad8d153e0280b22285e28e853bb9d453a81565b7ff9543f11459ccccd21306c8881aaab675ff49d988c1162fd1dd9bbcdbe4446be81565b61066e83610f9e565b6106788383611001565b91508115610694576106946001600160a01b03841682846110ca565b505050565b6106a4600083611001565b915081156106e2576040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015610694573d6000803e3d6000fd5b5050565b60005b848110156108435761071586868381811061070057fe5b905060200201356001600160a01b0316610f9e565b600061074e87878481811061072657fe5b905060200201356001600160a01b031686868581811061074257fe5b90506020020135611001565b9050801561083a57600087878481811061076457fe5b905060200201356001600160a01b03166001600160a01b031614806107c0575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8787848181106107a557fe5b905060200201356001600160a01b03166001600160a01b0316145b15610801576040516001600160a01b0384169082156108fc029083906000818181858888f193505050501580156107fb573d6000803e3d6000fd5b5061083a565b61083a838289898681811061081257fe5b905060200201356001600160a01b03166001600160a01b03166110ca9092919063ffffffff16565b506001016106e9565b505050505050565b670de0b6b3a764000081565b60016020526000908152604090205481565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b6040805162461bcd60e51b8152602060048201526014602482015273496e76616c696420706f73742070726f6365737360601b604482015290519081900360640190fd5b606083821461092b5761092b604051806040016040528060068152602001651a5b9a9958dd60d21b8152506040518060400160405280601f81526020017f746f6b656e20616e6420616d6f756e7420646f6573206e6f74206d617463680081525061111c565b600061093561132b565b905060005b858110156109ca5761095187878381811061070057fe5b61099e823087878581811061096257fe5b905060200201358a8a8681811061097557fe5b905060200201356001600160a01b03166001600160a01b031661135d909392919063ffffffff16565b6109c28787838181106109ad57fe5b905060200201356001600160a01b03166113bd565b60010161093a565b50838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929998505050505050505050565b828114610a7457610a746040518060400160405280600d81526020016c636865636b536c69707061676560981b8152506040518060400160405280601d81526020017f746f6b656e20616e6420616d6f756e7420646f206e6f74206d6174636800000081525061111c565b60005b83811015610e4457610a8e85858381811061070057fe5b6000858583818110610a9c57fe5b905060200201356001600160a01b03166001600160a01b03161415610beb57828282818110610ac757fe5b90506020020135471015610be6576060610ae0826113d1565b610ae9476113d1565b604051602001808066032b93937b91d160cd1b81525060070183805190602001908083835b60208310610b2d5780518252601f199092019160209182019101610b0e565b6001836020036101000a03801982511681845116808217855250505050505090500180605f60f81b81525060010182805190602001908083835b60208310610b865780518252601f199092019160209182019101610b67565b51815160209384036101000a60001901801990921691161790526040805192909401828103601f19018352808501909452600d84526c636865636b536c69707061676560981b908401529550610be4945090925084915061111c9050565b505b610e3c565b828282818110610bf757fe5b90506020020135858583818110610c0a57fe5b905060200201356001600160a01b03166001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610c6657600080fd5b505afa158015610c7a573d6000803e3d6000fd5b505050506040513d6020811015610c9057600080fd5b50511015610e3c576060610ca3826113d1565b610d3f878785818110610cb257fe5b905060200201356001600160a01b03166001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610d0e57600080fd5b505afa158015610d22573d6000803e3d6000fd5b505050506040513d6020811015610d3857600080fd5b50516113d1565b604051602001808066032b93937b91d160cd1b81525060070183805190602001908083835b60208310610d835780518252601f199092019160209182019101610d64565b6001836020036101000a03801982511681845116808217855250505050505090500180605f60f81b81525060010182805190602001908083835b60208310610ddc5780518252601f199092019160209182019101610dbd565b51815160209384036101000a60001901801990921691161790526040805192909401828103601f19018352808501909452600d84526c636865636b536c69707061676560981b908401529550610e3a945090925084915061111c9050565b505b600101610a77565b5050505050565b60008181548110610e5857fe5b600091825260209091200154905081565b6060808267ffffffffffffffff81118015610e8357600080fd5b50604051908082528060200260200182016040528015610ead578160200160208202803683370190505b50905060005b83811015610f53576000858583818110610ec957fe5b905060200201356001600160a01b03169050610ee481610f9e565b6001600160a01b03811615801590610f1957506001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14155b15610f2757610f27816113bd565b610f3381600019611001565b838381518110610f3f57fe5b602090810291909101015250600101610eb3565b5090505b92915050565b6040805180820190915260068152654846756e647360d01b602082015290565b6000610f8b82600019611001565b90505b919050565b636139148b60e11b81565b6001600160a01b0381166110101415610ffe576040805162461bcd60e51b815260206004820152601760248201527f4e6f7420737570706f7274206d6174696320746f6b656e000000000000000000604482015290519081900360640190fd5b50565b60006000198214611013575080610f57565b6001600160a01b038316158061104557506001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee145b15611051575047610f57565b604080516370a0823160e01b815230600482015290516001600160a01b038516916370a08231916024808301926020929190829003018186803b15801561109757600080fd5b505afa1580156110ab573d6000803e3d6000fd5b505050506040513d60208110156110c157600080fd5b50519392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526106949084906114a9565b61112c61112761155a565b6113d1565b611134610f5d565b83836040516020018085805190602001908083835b602083106111685780518252601f199092019160209182019101611149565b6001836020036101000a03801982511681845116808217855250505050505090500180605f60f81b81525060010184805190602001908083835b602083106111c15780518252601f1990920191602091820191016111a2565b6001836020036101000a03801982511681845116808217855250505050505090500180605f60f81b81525060010183805190602001908083835b6020831061121a5780518252601f1990920191602091820191016111fb565b51815160209384036101000a60001901801990921691161790526101d160f51b919093019081528451600290910192850191508083835b602083106112705780518252601f199092019160209182019101611251565b6001836020036101000a03801982511681845116808217855250505050505090500194505050505060405160208183030381529060405260405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156112f05781810151838201526020016112d8565b50505050905090810190601f16801561131d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b600061135860017fb2f2618cecbbb6e7468cc0f2aa43858ad8d153e0280b22285e28e853bb9d453a611583565b905090565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526113b79085906114a9565b50505050565b6113c681610f9e565b610ffe600082611596565b6060816113f657506040805180820190915260018152600360fc1b6020820152610f8e565b6000825b80156114105760019190910190600a90046113fa565b5060608167ffffffffffffffff8111801561142a57600080fd5b506040519080825280601f01601f191660200182016040528015611455576020820181803683370190505b509050815b801561149f57600a850660300160f81b82600183038151811061147957fe5b60200101906001600160f81b031916908160001a905350600a850494506000190161145a565b509150610f8e9050565b60606114fe826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115b89092919063ffffffff16565b8051909150156106945780806020019051602081101561151d57600080fd5b50516106945760405162461bcd60e51b815260040180806020018281038252602a8152602001806117c0602a913960400191505060405180910390fd5b600061135860017ff9543f11459ccccd21306c8881aaab675ff49d988c1162fd1dd9bbcdbe4446be5b6000908152602091909152604090205490565b8154600181018355600092835260209092206001600160a01b03909116910155565b60606115c784846000856115d1565b90505b9392505050565b6060824710156116125760405162461bcd60e51b815260040180806020018281038252602681526020018061179a6026913960400191505060405180910390fd5b61161b8561172d565b61166c576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106116ab5780518252601f19909201916020918201910161168c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461170d576040519150601f19603f3d011682016040523d82523d6000602084013e611712565b606091505b5091509150611722828286611733565b979650505050505050565b3b151590565b606083156117425750816115ca565b8251156117525782518084602001fd5b60405162461bcd60e51b81526020600482018181528451602484015284518593919283926044019190850190808383600083156112f05781810151838201526020016112d856fe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122012833d3add5c98f1828a082a19e1d3ad425a40ae8ee1fbd8e28f4048dcc5a55264736f6c634300060c0033

Deployed ByteCode Sourcemap

28207:4580:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2847:107;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;3028:109;;;;;;;;;;;;;:::i;30700:343::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;30700:343:0;;;;;;;;;;;;;;;;;:::i;:::-;;30482:210;;;;;;;;;;;;;;;;-1:-1:-1;30482:210:0;;;;;;-1:-1:-1;;;;;30482:210:0;;:::i;29782:692::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;29782:692:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;29782:692:0;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;29782:692:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;29782:692:0;;;;;;;;;;;;-1:-1:-1;29782:692:0;-1:-1:-1;29782:692:0;-1:-1:-1;;;;;29782:692:0;;:::i;4560:49::-;;;;;;;;;;;;;:::i;2735:40::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2735:40:0;;:::i;28304:80::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;28304:80:0;;;;;;;;;;;;;;5726:479;;;:::i;29104:670::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;29104:670:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;29104:670:0;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;29104:670:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;29104:670:0;;;;;;;;;;-1:-1:-1;29104:670:0;;-1:-1:-1;29104:670:0;-1:-1:-1;29104:670:0;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31051:1598;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31051:1598:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31051:1598:0;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31051:1598:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31051:1598:0;;;;;;;;;;-1:-1:-1;31051:1598:0;;-1:-1:-1;31051:1598:0;-1:-1:-1;31051:1598:0;:::i;2706:22::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2706:22:0;;:::i;28507:589::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;28507:589:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;28507:589:0;;;;;;;;;;-1:-1:-1;28507:589:0;;-1:-1:-1;28507:589:0;-1:-1:-1;28507:589:0;:::i;28393:106::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32657:127;;;;;;;;;;;;;;;;-1:-1:-1;32657:127:0;-1:-1:-1;;;;;32657:127:0;;:::i;4453:51::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;4453:51:0;;;;;;;;;;;;;;2847:107;2888:66;2847:107;:::o;3028:109::-;3071:66;3028:109;:::o;30700:343::-;30869:21;30884:5;30869:14;:21::i;:::-;30912:26;30924:5;30931:6;30912:11;:26::i;:::-;30903:35;-1:-1:-1;30953:10:0;;30949:87;;30980:44;-1:-1:-1;;;;;30980:26:0;;31007:8;31017:6;30980:26;:44::i;:::-;30700:343;;;:::o;30482:210::-;30575:31;30595:1;30599:6;30575:11;:31::i;:::-;30566:40;-1:-1:-1;30621:10:0;;30617:68;;30648:25;;-1:-1:-1;;;;;30648:17:0;;;:25;;;;;30666:6;;30648:25;;;;30666:6;30648:17;:25;;;;;;;;;;;;;;;;;;;30617:68;30482:210;;:::o;29782:692::-;29950:9;29945:522;29965:17;;;29945:522;;;30047:25;30062:6;;30069:1;30062:9;;;;;;;;;;;;;-1:-1:-1;;;;;30062:9:0;30047:14;:25::i;:::-;30089:14;30106:34;30118:6;;30125:1;30118:9;;;;;;;;;;;;;-1:-1:-1;;;;;30118:9:0;30129:7;;30137:1;30129:10;;;;;;;;;;;;;30106:11;:34::i;:::-;30089:51;-1:-1:-1;30159:10:0;;30155:301;;30244:1;30223:6;;30230:1;30223:9;;;;;;;;;;;;;-1:-1:-1;;;;;30223:9:0;-1:-1:-1;;;;;30223:23:0;;:51;;;-1:-1:-1;28342:42:0;30250:6;;30257:1;30250:9;;;;;;;;;;;;;-1:-1:-1;;;;;30250:9:0;-1:-1:-1;;;;;30250:24:0;;30223:51;30219:222;;;30299:25;;-1:-1:-1;;;;;30299:17:0;;;:25;;;;;30317:6;;30299:25;;;;30317:6;30299:17;:25;;;;;;;;;;;;;;;;;;;;;30219:222;;;30373:48;30404:8;30414:6;30380;;30387:1;30380:9;;;;;;;;;;;;;-1:-1:-1;;;;;30380:9:0;-1:-1:-1;;;;;30373:30:0;;;:48;;;;;:::i;:::-;-1:-1:-1;29984:3:0;;29945:522;;;;29782:692;;;;;:::o;4560:49::-;4602:7;4560:49;:::o;2735:40::-;;;;;;;;;;;;;:::o;28304:80::-;28342:42;28304:80;:::o;5726:479::-;5785:30;;;-1:-1:-1;;;5785:30:0;;;;;;;;;;;;-1:-1:-1;;;5785:30:0;;;;;;;;;;;;;;29104:670;29228:16;29266:31;;;29262:105;;29312:55;;;;;;;;;;;;;;-1:-1:-1;;;29312:55:0;;;;;;;;;;;;;;;;;;;;:10;:55::i;:::-;29378:14;29395:12;:10;:12::i;:::-;29378:29;;29423:9;29418:324;29438:17;;;29418:324;;;29477:25;29492:6;;29499:1;29492:9;;;;;;29477:25;29517:135;29570:6;29603:4;29627:7;;29635:1;29627:10;;;;;;;;;;;;;29524:6;;29531:1;29524:9;;;;;;;;;;;;;-1:-1:-1;;;;;29524:9:0;-1:-1:-1;;;;;29517:34:0;;;:135;;;;;;:::i;:::-;29707:23;29720:6;;29727:1;29720:9;;;;;;;;;;;;;-1:-1:-1;;;;;29720:9:0;29707:12;:23::i;:::-;29457:3;;29418:324;;;;29759:7;;29752:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;29752:14:0;;29104:670;-1:-1:-1;;;;;;;;;29104:670:0:o;31051:1598::-;31186:31;;;31182:124;;31234:60;;;;;;;;;;;;;;-1:-1:-1;;;31234:60:0;;;;;;;;;;;;;;;;;;;;:10;:60::i;:::-;31323:9;31318:1324;31338:17;;;31318:1324;;;31420:25;31435:6;;31442:1;31435:9;;;;;;31420:25;31487:1;31466:6;;31473:1;31466:9;;;;;;;;;;;;;-1:-1:-1;;;;;31466:9:0;-1:-1:-1;;;;;31466:23:0;;31462:1169;;;31538:7;;31546:1;31538:10;;;;;;;;;;;;;31514:21;:34;31510:502;;;31573:20;31753:15;31766:1;31753:12;:15::i;:::-;31841:35;31854:21;31841:12;:35::i;:::-;31658:249;;;;;;-1:-1:-1;;;31658:249:0;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;31658:249:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31658:249:0;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;31658:249:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;31658:249:0;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;31658:249:0;;;31957:35;;;;;;;;;-1:-1:-1;;;31957:35:0;;;;31658:249;-1:-1:-1;31957:35:0;;-1:-1:-1;31658:249:0;;-1:-1:-1;31658:249:0;;-1:-1:-1;31957:10:0;;-1:-1:-1;31957:35:0:i;:::-;31510:502;;31462:1169;;;32100:7;;32108:1;32100:10;;;;;;;;;;;;;32062:6;;32069:1;32062:9;;;;;;;;;;;;;-1:-1:-1;;;;;32062:9:0;-1:-1:-1;;;;;32055:27:0;;32091:4;32055:42;;;;;;;;;;;;;-1:-1:-1;;;;;32055:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32055:42:0;:55;32033:598;;;32145:20;32309:15;32322:1;32309:12;:15::i;:::-;32389:120;32443:6;;32450:1;32443:9;;;;;;;;;;;;;-1:-1:-1;;;;;32443:9:0;-1:-1:-1;;;;;32436:27:0;;32472:4;32436:42;;;;;;;;;;;;;-1:-1:-1;;;;;32436:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32436:42:0;32389:12;:120::i;:::-;32222:314;;;;;;-1:-1:-1;;;32222:314:0;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;32222:314:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;32222:314:0;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;32222:314:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;32222:314:0;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;32222:314:0;;;32580:35;;;;;;;;;-1:-1:-1;;;32580:35:0;;;;32222:314;-1:-1:-1;32580:35:0;;-1:-1:-1;32222:314:0;;-1:-1:-1;32222:314:0;;-1:-1:-1;32580:10:0;;-1:-1:-1;32580:35:0:i;:::-;32033:598;;31357:3;;31318:1324;;;;31051:1598;;;;:::o;2706:22::-;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2706:22:0;:::o;28507:589::-;28609:16;;28685:6;28671:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28671:28:0;;28643:56;;28715:9;28710:353;28730:17;;;28710:353;;;28769:13;28785:6;;28792:1;28785:9;;;;;;;;;;;;;-1:-1:-1;;;;;28785:9:0;28769:25;;28809:21;28824:5;28809:14;:21::i;:::-;-1:-1:-1;;;;;28851:19:0;;;;;;:43;;-1:-1:-1;;;;;;28874:20:0;;28342:42;28874:20;;28851:43;28847:145;;;28957:19;28970:5;28957:12;:19::i;:::-;29020:31;29032:5;-1:-1:-1;;29020:11:0;:31::i;:::-;29006:8;29015:1;29006:11;;;;;;;;;;;;;;;;;:45;-1:-1:-1;28749:3:0;;28710:353;;;-1:-1:-1;29080:8:0;-1:-1:-1;28507:589:0;;;;;:::o;28393:106::-;28476:15;;;;;;;;;;;;-1:-1:-1;;;28476:15:0;;;;28393:106;:::o;32657:127::-;32718:7;32745:31;32757:5;-1:-1:-1;;32745:11:0;:31::i;:::-;32738:38;;32657:127;;;;:::o;4453:51::-;-1:-1:-1;;;4453:51:0;:::o;8801:128::-;-1:-1:-1;;;;;8873:20:0;;5675:42;8873:20;;8865:56;;;;;-1:-1:-1;;;8865:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;8801:128;:::o;7925:500::-;8027:7;-1:-1:-1;;8056:6:0;:21;8052:67;;-1:-1:-1;8101:6:0;8094:13;;8052:67;-1:-1:-1;;;;;8170:19:0;;;;:96;;-1:-1:-1;;;;;;8206:60:0;;8223:42;8206:60;8170:96;8152:181;;;-1:-1:-1;8300:21:0;8293:28;;8152:181;8379:38;;;-1:-1:-1;;;8379:38:0;;8411:4;8379:38;;;;;;-1:-1:-1;;;;;8379:23:0;;;;;:38;;;;;;;;;;;;;;:23;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8379:38:0;;7925:500;-1:-1:-1;;;7925:500:0:o;25055:177::-;25165:58;;;-1:-1:-1;;;;;25165:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;25165:58:0;-1:-1:-1;;;25165:58:0;;;25138:86;;25158:5;;25138:19;:86::i;6795:470::-;6998:31;7011:17;:15;:17::i;:::-;6998:12;:31::i;:::-;7078:17;:15;:17::i;:::-;7144:12;7206:6;6959:272;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6959:272:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6959:272:0;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6959:272:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6959:272:0;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6959:272:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6959:272:0;;;;;;;;;;;-1:-1:-1;;;6959:272:0;;;;;;;;;;;;;;;;;-1:-1:-1;6959:272:0;;;;;;;;;;;;;-1:-1:-1;;6959:272:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6913:344;;-1:-1:-1;;;6913:344:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3856:112;3901:7;3928:32;:5;2888:66;3928:16;:32::i;:::-;3921:39;;3856:112;:::o;25240:205::-;25368:68;;;-1:-1:-1;;;;;25368:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;25368:68:0;-1:-1:-1;;;25368:68:0;;;25341:96;;25361:5;;25341:19;:96::i;:::-;25240:205;;;;:::o;6213:232::-;6270:21;6285:5;6270:14;:21::i;:::-;6302:23;:5;6319;6302:16;:23::i;7401:516::-;7457:13;7487:6;7483:427;;-1:-1:-1;7510:10:0;;;;;;;;;;;;-1:-1:-1;;;7510:10:0;;;;;;7483:427;7553:11;7603:1;7583:85;7606:8;;7583:85;;7647:5;;;;;;7624:2;7616:10;;7583:85;;;;7682:16;7711:3;7701:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7701:14:0;-1:-1:-1;7682:33:0;-1:-1:-1;7747:3:0;7730:136;7752:5;;7730:136;;7819:2;7815:1;:6;7809:2;:13;7796:28;;7783:3;7791:1;7787;:5;7783:10;;;;;;;;;;;:41;-1:-1:-1;;;;;7783:41:0;;;;;;;;-1:-1:-1;7848:2:0;7843:7;;;-1:-1:-1;;;7759:3:0;7730:136;;;-1:-1:-1;7894:3:0;-1:-1:-1;7880:18:0;;-1:-1:-1;7880:18:0;27360:761;27784:23;27810:69;27838:4;27810:69;;;;;;;;;;;;;;;;;27818:5;-1:-1:-1;;;;;27810:27:0;;;:69;;;;;:::i;:::-;27894:17;;27784:95;;-1:-1:-1;27894:21:0;27890:224;;28036:10;28025:30;;;;;;;;;;;;;;;-1:-1:-1;28025:30:0;28017:85;;;;-1:-1:-1;;;28017:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4198:119;4248:7;4275:34;:5;3071:66;1881:203;2007:11;2061:12;;;;;;;;;;;;;1881:203::o;92:136::-;174:46;;;;;;;186:33;174:46;;;;;;;-1:-1:-1;;;;;194:24:0;;;174:46;;;92:136::o;12848:195::-;12951:12;12983:52;13005:6;13013:4;13019:1;13022:12;12983:21;:52::i;:::-;12976:59;;12848:195;;;;;;:::o;13900:530::-;14027:12;14085:5;14060:21;:30;;14052:81;;;;-1:-1:-1;;;14052:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14152:18;14163:6;14152:10;:18::i;:::-;14144:60;;;;;-1:-1:-1;;;14144:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;14278:12;14292:23;14319:6;-1:-1:-1;;;;;14319:11:0;14339:5;14347:4;14319:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;14319:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14277:75;;;;14370:52;14388:7;14397:10;14409:12;14370:17;:52::i;:::-;14363:59;13900:530;-1:-1:-1;;;;;;;13900:530:0:o;9930:422::-;10297:20;10336:8;;;9930:422::o;15436:742::-;15551:12;15580:7;15576:595;;;-1:-1:-1;15611:10:0;15604:17;;15576:595;15725:17;;:21;15721:439;;15988:10;15982:17;16049:15;16036:10;16032:2;16028:19;16021:44;15936:148;16124:20;;-1:-1:-1;;;16124:20:0;;;;;;;;;;;;;;;;;16131:12;;16124:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Swarm Source

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