Contract 0xc344191DC17b0e1a5D50448662105eD590681503

 
Txn Hash
Block
From
To
Value [Txn Fee]
0x8b0970201fe475140cbdef81c4baba6645b810d9d8b573ddc931fce7466da7bb500492021-07-01 12:32:1378 days 6 hrs ago0x904b5993fc92979eeedc19ccc58bed6b7216667c IN  Contract Creation0 ETH0.005461343218 ETH
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vault

Compiler Version
v0.7.4+commit.3f05b770

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv2 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at arbiscan.io on 2021-08-31
*/

pragma solidity 0.7.4;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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);
            }
        }
    }
}

// solhint-disable-next-line compiler-version
/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(
            _initializing || _isConstructor() || !_initialized,
            "Initializable: contract is already initialized"
        );

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /// @dev Returns true if and only if the function is running in the constructor
    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

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

    function __Context_init_unchained() internal initializer {}

    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

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

    uint256[50] private __gap;
}

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal initializer {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal initializer {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

    uint256[49] private __gap;
}

/**
 * @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 SafeMathUpgradeable {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @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) {
        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, reverting 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) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * 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);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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;
    }
}

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

/**
 * @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 SafeERC20Upgradeable {
    using SafeMathUpgradeable for uint256;
    using AddressUpgradeable for address;

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

    function safeTransferFrom(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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(IERC20Upgradeable 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");
        }
    }
}

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721ReceiverUpgradeable {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @dev Implementation of the {IERC721Receiver} interface.
 *
 * Accepts all token transfers.
 * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
 */
contract ERC721HolderUpgradeable is Initializable, IERC721ReceiverUpgradeable {
    function __ERC721Holder_init() internal initializer {
        __ERC721Holder_init_unchained();
    }

    function __ERC721Holder_init_unchained() internal initializer {}

    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address,
        address,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }

    uint256[50] private __gap;
}

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165Upgradeable {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuardUpgradeable is Initializable {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    function __ReentrancyGuard_init() internal initializer {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal initializer {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
    uint256[49] private __gap;
}

interface IAuthenticator {
    /**
     * @notice  Check if an account has the given role.
     * @param   role    A bytes32 value generated from keccak256("ROLE_NAME").
     * @param   account The account to be checked.
     * @return  True if the account has already granted permissions for the given role.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @notice  This should be called from external contract, to test if a account has specified role.

     * @param   role    A bytes32 value generated from keccak256("ROLE_NAME").
     * @param   account The account to be checked.
     * @return  True if the account has already granted permissions for the given role.
     */
    function hasRoleOrAdmin(bytes32 role, address account) external view returns (bool);
}

// SPDX-License-Identifier: GPL
/**
 * @notice  Vault is a contract to hold various assets from different source.
 */
contract Vault is Initializable, ERC721HolderUpgradeable, ReentrancyGuardUpgradeable {
    // using SafeMathUpgradeable for uint256;
    using AddressUpgradeable for address;
    using SafeMathUpgradeable for uint256;
    using SafeERC20Upgradeable for IERC20Upgradeable;

    IAuthenticator public authenticator;

    event TransferETH(address indexed to, uint256 amount);
    event TransferERC20Token(address indexed token, address indexed to, uint256 amount);
    event TransferERC721Token(address indexed token, uint256 tokenID, address indexed to);
    event ExecuteTransaction(address indexed to, bytes data, uint256 value);

    receive() external payable {}

    modifier onlyAuthorized() {
        require(authenticator.hasRoleOrAdmin(0, msg.sender), "caller is not authorized");
        _;
    }

    /**
     * @notice  Initialize vault contract.
     *
     * @param   authenticator_  The address of authentication controller that can determine who is able to call
     *                          admin interfaces.
     */
    function initialize(address authenticator_) external initializer {
        require(authenticator_ != address(0), "authenticator is the zero address");

        __ReentrancyGuard_init();

        authenticator = IAuthenticator(authenticator_);
    }

    /**
     * @notice  A helper method to transfer Ether to somewhere.
     *
     * @param   recipient   The receiver of the sent asset.
     * @param   value       The amount of asset to send.
     */
    function transferETH(address recipient, uint256 value) external onlyAuthorized nonReentrant {
        require(recipient != address(0), "recipient is zero address");
        require(value != 0, "transfer value is zero");
        AddressUpgradeable.sendValue(payable(recipient), value);
        emit TransferETH(recipient, value);
    }

    /**
     * @notice  A helper method to transfer ERC20 to somewhere.
     *
     * @param   token       The address of to be sent ERC20 token.
     * @param   recipient   The receiver of the sent asset.
     * @param   amount      The amount of asset to send.
     */
    function transferERC20(
        address token,
        address recipient,
        uint256 amount
    ) external onlyAuthorized nonReentrant {
        require(recipient != address(0), "recipient is zero address");
        require(amount != 0, "transfer amount is zero");
        IERC20Upgradeable(token).safeTransfer(recipient, amount);
        emit TransferERC20Token(token, recipient, amount);
    }

    /**
     * @notice  A helper method to transfer ERC721 to somewhere.
     *
     * @param   token       The address of to be sent ERC721 token.
     * @param   tokenID     The ID of token.
     * @param   recipient   The receiver of the sent asset.
     */
    function transferERC721(
        address token,
        uint256 tokenID,
        address recipient
    ) external onlyAuthorized nonReentrant {
        require(recipient != address(0), "recipient is zero address");
        IERC721Upgradeable(token).safeTransferFrom(address(this), recipient, tokenID);
        emit TransferERC721Token(token, tokenID, recipient);
    }

    /**
     * @notice  Execute a transaction from vault.
     *          Usually, calling this method is to handle some special asset which cannot be achieved by transferXXX methods.
     *
     * @param   to      The target address which the transaction is to send to.
     * @param   data    A bytes array contains calldata.
     * @param   value   The value of ethers to be sent with the transaction.
     */
    function execute(
        address to,
        bytes calldata data,
        uint256 value
    ) external onlyAuthorized nonReentrant {
        AddressUpgradeable.functionCallWithValue(to, data, value);
        emit ExecuteTransaction(to, data, value);
    }

    bytes32[50] private __gap;
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"ExecuteTransaction","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferERC20Token","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenID","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"TransferERC721Token","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferETH","type":"event"},{"inputs":[],"name":"authenticator","outputs":[{"internalType":"contract IAuthenticator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"execute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"authenticator_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenID","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"transferERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50611367806100206000396000f3fe6080604052600436106100745760003560e01c80639db5dbe41161004e5780639db5dbe4146101dc578063a04a09081461021f578063c4d66de8146102ac578063c9d5bde4146102df5761007b565b8063150b7a02146100805780632335c76b146101705780637b1a4909146101a15761007b565b3661007b57005b600080fd5b34801561008c57600080fd5b50610153600480360360808110156100a357600080fd5b6001600160a01b038235811692602081013590911691604082013591908101906080810160608201356401000000008111156100de57600080fd5b8201836020820111156100f057600080fd5b8035906020019184600183028401116401000000008311171561011257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610322945050505050565b604080516001600160e01b03199092168252519081900360200190f35b34801561017c57600080fd5b50610185610332565b604080516001600160a01b039092168252519081900360200190f35b3480156101ad57600080fd5b506101da600480360360408110156101c457600080fd5b506001600160a01b038135169060200135610341565b005b3480156101e857600080fd5b506101da600480360360608110156101ff57600080fd5b506001600160a01b0381358116916020810135909116906040013561054a565b34801561022b57600080fd5b506101da6004803603606081101561024257600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561026d57600080fd5b82018360208201111561027f57600080fd5b803590602001918460018302840111640100000000831117156102a157600080fd5b919350915035610771565b3480156102b857600080fd5b506101da600480360360208110156102cf57600080fd5b50356001600160a01b0316610949565b3480156102eb57600080fd5b506101da6004803603606081101561030257600080fd5b506001600160a01b03813581169160208101359160409091013516610a54565b630a85bd0160e11b949350505050565b6065546001600160a01b031681565b60655460408051635db8200960e01b81526000600482015233602482015290516001600160a01b0390921691635db8200991604480820192602092909190829003018186803b15801561039357600080fd5b505afa1580156103a7573d6000803e3d6000fd5b505050506040513d60208110156103bd57600080fd5b505161040b576040805162461bcd60e51b815260206004820152601860248201527718d85b1b195c881a5cc81b9bdd08185d5d1a1bdc9a5e995960421b604482015290519081900360640190fd5b60026033541415610451576040805162461bcd60e51b815260206004820152601f6024820152600080516020611210833981519152604482015290519081900360640190fd5b60026033556001600160a01b0382166104ad576040805162461bcd60e51b8152602060048201526019602482015278726563697069656e74206973207a65726f206164647265737360381b604482015290519081900360640190fd5b806104f8576040805162461bcd60e51b81526020600482015260166024820152757472616e736665722076616c7565206973207a65726f60501b604482015290519081900360640190fd5b6105028282610c7c565b6040805182815290516001600160a01b038416917ffd69c215b8b91dab5e96ff0bcbaf5dc372919948eea2003ae16481c036f816f8919081900360200190a250506001603355565b60655460408051635db8200960e01b81526000600482015233602482015290516001600160a01b0390921691635db8200991604480820192602092909190829003018186803b15801561059c57600080fd5b505afa1580156105b0573d6000803e3d6000fd5b505050506040513d60208110156105c657600080fd5b5051610614576040805162461bcd60e51b815260206004820152601860248201527718d85b1b195c881a5cc81b9bdd08185d5d1a1bdc9a5e995960421b604482015290519081900360640190fd5b6002603354141561065a576040805162461bcd60e51b815260206004820152601f6024820152600080516020611210833981519152604482015290519081900360640190fd5b60026033556001600160a01b0382166106b6576040805162461bcd60e51b8152602060048201526019602482015278726563697069656e74206973207a65726f206164647265737360381b604482015290519081900360640190fd5b80610708576040805162461bcd60e51b815260206004820152601760248201527f7472616e7366657220616d6f756e74206973207a65726f000000000000000000604482015290519081900360640190fd5b61071c6001600160a01b0384168383610d66565b816001600160a01b0316836001600160a01b03167fef5fa1fa3cd0dfe0d2facbe06d2ad27a41064097c8f3a53629aeba6d65f2ddc2836040518082815260200191505060405180910390a35050600160335550565b60655460408051635db8200960e01b81526000600482015233602482015290516001600160a01b0390921691635db8200991604480820192602092909190829003018186803b1580156107c357600080fd5b505afa1580156107d7573d6000803e3d6000fd5b505050506040513d60208110156107ed57600080fd5b505161083b576040805162461bcd60e51b815260206004820152601860248201527718d85b1b195c881a5cc81b9bdd08185d5d1a1bdc9a5e995960421b604482015290519081900360640190fd5b60026033541415610881576040805162461bcd60e51b815260206004820152601f6024820152600080516020611210833981519152604482015290519081900360640190fd5b60026033819055506108cb8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250869250610db8915050565b50836001600160a01b03167fc9316de3f9b299147127eaa7207c7ad1406cbd9a516cd42b661a5d2ffb79a8f684848460405180806020018381526020018281038252858582818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a2505060016033555050565b600054610100900460ff16806109625750610962610de8565b80610970575060005460ff16155b6109ab5760405162461bcd60e51b815260040180806020018281038252602e815260200180611290602e913960400191505060405180910390fd5b600054610100900460ff161580156109d6576000805460ff1961ff0019909116610100171660011790555b6001600160a01b038216610a1b5760405162461bcd60e51b81526004018080602001828103825260218152602001806112e76021913960400191505060405180910390fd5b610a23610df9565b606580546001600160a01b0319166001600160a01b0384161790558015610a50576000805461ff00191690555b5050565b60655460408051635db8200960e01b81526000600482015233602482015290516001600160a01b0390921691635db8200991604480820192602092909190829003018186803b158015610aa657600080fd5b505afa158015610aba573d6000803e3d6000fd5b505050506040513d6020811015610ad057600080fd5b5051610b1e576040805162461bcd60e51b815260206004820152601860248201527718d85b1b195c881a5cc81b9bdd08185d5d1a1bdc9a5e995960421b604482015290519081900360640190fd5b60026033541415610b64576040805162461bcd60e51b815260206004820152601f6024820152600080516020611210833981519152604482015290519081900360640190fd5b60026033556001600160a01b038116610bc0576040805162461bcd60e51b8152602060048201526019602482015278726563697069656e74206973207a65726f206164647265737360381b604482015290519081900360640190fd5b60408051632142170760e11b81523060048201526001600160a01b038381166024830152604482018590529151918516916342842e0e9160648082019260009290919082900301818387803b158015610c1857600080fd5b505af1158015610c2c573d6000803e3d6000fd5b50506040805185815290516001600160a01b038086169450871692507fe58a594018f109772f235192bdeb9c57383c410e02c9a33c6284e320174967ef9181900360200190a35050600160335550565b80471015610cd1576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114610d1c576040519150601f19603f3d011682016040523d82523d6000602084013e610d21565b606091505b5050905080610d615760405162461bcd60e51b815260040180806020018281038252603a815260200180611230603a913960400191505060405180910390fd5b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d61908490610ea3565b6060610dde8484846040518060600160405280602981526020016112be60299139610f54565b90505b9392505050565b6000610df3306110b0565b15905090565b600054610100900460ff1680610e125750610e12610de8565b80610e20575060005460ff16155b610e5b5760405162461bcd60e51b815260040180806020018281038252602e815260200180611290602e913960400191505060405180910390fd5b600054610100900460ff16158015610e86576000805460ff1961ff0019909116610100171660011790555b610e8e6110b6565b8015610ea0576000805461ff00191690555b50565b6060610ef8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661115c9092919063ffffffff16565b805190915015610d6157808060200190516020811015610f1757600080fd5b5051610d615760405162461bcd60e51b815260040180806020018281038252602a815260200180611308602a913960400191505060405180910390fd5b606082471015610f955760405162461bcd60e51b815260040180806020018281038252602681526020018061126a6026913960400191505060405180910390fd5b610f9e856110b0565b610fef576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061102e5780518252601f19909201916020918201910161100f565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611090576040519150601f19603f3d011682016040523d82523d6000602084013e611095565b606091505b50915091506110a582828661116b565b979650505050505050565b3b151590565b600054610100900460ff16806110cf57506110cf610de8565b806110dd575060005460ff16155b6111185760405162461bcd60e51b815260040180806020018281038252602e815260200180611290602e913960400191505060405180910390fd5b600054610100900460ff16158015611143576000805460ff1961ff0019909116610100171660011790555b60016033558015610ea0576000805461ff001916905550565b6060610dde8484600085610f54565b6060831561117a575081610de1565b82511561118a5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111d45781810151838201526020016111bc565b50505050905090810190601f1680156112015780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5265656e7472616e637947756172643a207265656e7472616e742063616c6c00416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c656461757468656e74696361746f7220697320746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212203174b788735f470d70c9efb37a1ec688dc1b7f9bf25cfd46882cbc6a2bfd87ed64736f6c63430007040033

Deployed ByteCode Sourcemap

38290:3952:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28758:207;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;28758:207:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28758:207:0;;-1:-1:-1;28758:207:0;;-1:-1:-1;;;;;28758:207:0:i;:::-;;;;-1:-1:-1;;;;;;28758:207:0;;;;;;;;;;;;;;38573:35;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;38573:35:0;;;;;;;;;;;;;;39827:339;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;39827:339:0;;;;;;;;:::i;:::-;;40452:409;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;40452:409:0;;;;;;;;;;;;;;;;;:::i;41942:263::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;41942:263:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;41942:263:0;-1:-1:-1;41942:263:0;;:::i;39355:254::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39355:254:0;-1:-1:-1;;;;;39355:254:0;;:::i;41137:376::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;41137:376:0;;;;;;;;;;;;;;;;;:::i;28758:207::-;-1:-1:-1;;;28758:207:0;;;;;;:::o;38573:35::-;;;-1:-1:-1;;;;;38573:35:0;;:::o;39827:339::-;39021:13;;:43;;;-1:-1:-1;;;39021:43:0;;:13;:43;;;;39053:10;39021:43;;;;;;-1:-1:-1;;;;;39021:13:0;;;;:28;;:43;;;;;;;;;;;;;;;:13;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39021:43:0;39013:80;;;;;-1:-1:-1;;;39013:80:0;;;;;;;;;;;;-1:-1:-1;;;39013:80:0;;;;;;;;;;;;;;;36175:1:::1;36938:7;;:19;;36930:63;;;::::0;;-1:-1:-1;;;36930:63:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;36930:63:0;;;;;;;;;;;;;::::1;;36175:1;37071:7;:18:::0;-1:-1:-1;;;;;39938:23:0;::::2;39930:61;;;::::0;;-1:-1:-1;;;39930:61:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;39930:61:0;;;;;;;;;;;;;::::2;;40010:10:::0;40002:45:::2;;;::::0;;-1:-1:-1;;;40002:45:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;40002:45:0;;;;;;;;;;;;;::::2;;40058:55;40095:9;40107:5;40058:28;:55::i;:::-;40129:29;::::0;;;;;;;-1:-1:-1;;;;;40129:29:0;::::2;::::0;::::2;::::0;;;;;::::2;::::0;;::::2;-1:-1:-1::0;;36131:1:0::1;37250:7;:22:::0;39827:339::o;40452:409::-;39021:13;;:43;;;-1:-1:-1;;;39021:43:0;;:13;:43;;;;39053:10;39021:43;;;;;;-1:-1:-1;;;;;39021:13:0;;;;:28;;:43;;;;;;;;;;;;;;;:13;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39021:43:0;39013:80;;;;;-1:-1:-1;;;39013:80:0;;;;;;;;;;;;-1:-1:-1;;;39013:80:0;;;;;;;;;;;;;;;36175:1:::1;36938:7;;:19;;36930:63;;;::::0;;-1:-1:-1;;;36930:63:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;36930:63:0;;;;;;;;;;;;;::::1;;36175:1;37071:7;:18:::0;-1:-1:-1;;;;;40615:23:0;::::2;40607:61;;;::::0;;-1:-1:-1;;;40607:61:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;40607:61:0;;;;;;;;;;;;;::::2;;40687:11:::0;40679:47:::2;;;::::0;;-1:-1:-1;;;40679:47:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;::::2;::::0;;;;;;;;;;;;;::::2;;40737:56;-1:-1:-1::0;;;;;40737:37:0;::::2;40775:9:::0;40786:6;40737:37:::2;:56::i;:::-;40835:9;-1:-1:-1::0;;;;;40809:44:0::2;40828:5;-1:-1:-1::0;;;;;40809:44:0::2;;40846:6;40809:44;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;36131:1:0::1;37250:7;:22:::0;-1:-1:-1;40452:409:0:o;41942:263::-;39021:13;;:43;;;-1:-1:-1;;;39021:43:0;;:13;:43;;;;39053:10;39021:43;;;;;;-1:-1:-1;;;;;39021:13:0;;;;:28;;:43;;;;;;;;;;;;;;;:13;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39021:43:0;39013:80;;;;;-1:-1:-1;;;39013:80:0;;;;;;;;;;;;-1:-1:-1;;;39013:80:0;;;;;;;;;;;;;;;36175:1:::1;36938:7;;:19;;36930:63;;;::::0;;-1:-1:-1;;;36930:63:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;36930:63:0;;;;;;;;;;;;;::::1;;36175:1;37071:7;:18;;;;42089:57:::2;42130:2;42134:4;;42089:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;::::0;;;;-1:-1:-1;42140:5:0;;-1:-1:-1;42089:40:0::2;::::0;-1:-1:-1;;42089:57:0:i:2;:::-;;42181:2;-1:-1:-1::0;;;;;42162:35:0::2;;42185:4;;42191:5;42162:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;::::2;::::0;::::2;::::0;::::2;::::0;;::::2;-1:-1:-1::0;;42162:35:0::2;::::0;;::::2;::::0;;::::2;::::0;-1:-1:-1;42162:35:0;;-1:-1:-1;;;;;42162:35:0::2;-1:-1:-1::0;;36131:1:0::1;37250:7;:22:::0;-1:-1:-1;;41942:263:0:o;39355:254::-;8665:13;;;;;;;;:33;;;8682:16;:14;:16::i;:::-;8665:50;;;-1:-1:-1;8703:12:0;;;;8702:13;8665:50;8643:146;;;;-1:-1:-1;;;8643:146:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8802:19;8825:13;;;;;;8824:14;8849:101;;;;8884:13;:20;;-1:-1:-1;;;;8884:20:0;;;;;8919:19;8900:4;8919:19;;;8849:101;-1:-1:-1;;;;;39439:28:0;::::1;39431:74;;;;-1:-1:-1::0;;;39431:74:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39518:24;:22;:24::i;:::-;39555:13;:46:::0;;-1:-1:-1;;;;;;39555:46:0::1;-1:-1:-1::0;;;;;39555:46:0;::::1;;::::0;;8976:68;;;;9027:5;9011:21;;-1:-1:-1;;9011:21:0;;;8976:68;39355:254;;:::o;41137:376::-;39021:13;;:43;;;-1:-1:-1;;;39021:43:0;;:13;:43;;;;39053:10;39021:43;;;;;;-1:-1:-1;;;;;39021:13:0;;;;:28;;:43;;;;;;;;;;;;;;;:13;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39021:43:0;39013:80;;;;;-1:-1:-1;;;39013:80:0;;;;;;;;;;;;-1:-1:-1;;;39013:80:0;;;;;;;;;;;;;;;36175:1:::1;36938:7;;:19;;36930:63;;;::::0;;-1:-1:-1;;;36930:63:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;36930:63:0;;;;;;;;;;;;;::::1;;36175:1;37071:7;:18:::0;-1:-1:-1;;;;;41302:23:0;::::2;41294:61;;;::::0;;-1:-1:-1;;;41294:61:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;41294:61:0;;;;;;;;;;;;;::::2;;41366:77;::::0;;-1:-1:-1;;;41366:77:0;;41417:4:::2;41366:77;::::0;::::2;::::0;-1:-1:-1;;;;;41366:77:0;;::::2;::::0;;;;;;;;;;;;:42;;::::2;::::0;::::2;::::0;:77;;;;;-1:-1:-1;;41366:77:0;;;;;;;;-1:-1:-1;41366:42:0;:77;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;41459:46:0::2;::::0;;;;;;;-1:-1:-1;;;;;41459:46:0;;::::2;::::0;-1:-1:-1;41459:46:0;::::2;::::0;-1:-1:-1;41459:46:0::2;::::0;;;;::::2;::::0;;::::2;-1:-1:-1::0;;36131:1:0::1;37250:7;:22:::0;-1:-1:-1;41137:376:0:o;2097:397::-;2212:6;2187:21;:31;;2179:73;;;;;-1:-1:-1;;;2179:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2362:35;;2344:12;;-1:-1:-1;;;;;2362:14:0;;;2385:6;;2344:12;2362:35;2344:12;2362:35;2385:6;2362:14;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2343:54;;;2416:7;2408:78;;;;-1:-1:-1;;;2408:78:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2097:397;;;:::o;23699:222::-;23854:58;;;-1:-1:-1;;;;;23854:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;23854:58:0;-1:-1:-1;;;23854:58:0;;;23827:86;;23847:5;;23827:19;:86::i;4264:273::-;4397:12;4442:87;4464:6;4472:4;4478:5;4442:87;;;;;;;;;;;;;;;;;:21;:87::i;:::-;4422:107;;4264:273;;;;;;:::o;9144:125::-;9192:4;9217:44;9255:4;9217:29;:44::i;:::-;9216:45;9209:52;;9144:125;:::o;36217:108::-;8665:13;;;;;;;;:33;;;8682:16;:14;:16::i;:::-;8665:50;;;-1:-1:-1;8703:12:0;;;;8702:13;8665:50;8643:146;;;;-1:-1:-1;;;8643:146:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8802:19;8825:13;;;;;;8824:14;8849:101;;;;8884:13;:20;;-1:-1:-1;;;;8884:20:0;;;;;8919:19;8900:4;8919:19;;;8849:101;36283:34:::1;:32;:34::i;:::-;8980:14:::0;8976:68;;;9027:5;9011:21;;-1:-1:-1;;9011:21:0;;;8976:68;36217:108;:::o;26400:822::-;26835:23;26861:106;26903:4;26861:106;;;;;;;;;;;;;;;;;26869:5;-1:-1:-1;;;;;26861:27:0;;;:106;;;;;:::i;:::-;26982:17;;26835:132;;-1:-1:-1;26982:21:0;26978:237;;27137:10;27126:30;;;;;;;;;;;;;;;-1:-1:-1;27126:30:0;27118:85;;;;-1:-1:-1;;;27118:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4793:573;4963:12;5021:5;4996:21;:30;;4988:81;;;;-1:-1:-1;;;4988:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5088:18;5099:6;5088:10;:18::i;:::-;5080:60;;;;;-1:-1:-1;;;5080:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;5214:12;5228:23;5255:6;-1:-1:-1;;;;;5255:11:0;5275:5;5283:4;5255:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5255:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5213:75;;;;5306:52;5324:7;5333:10;5345:12;5306:17;:52::i;:::-;5299:59;4793:573;-1:-1:-1;;;;;;;4793:573:0:o;718:444::-;1098:20;1146:8;;;718:444::o;36333:106::-;8665:13;;;;;;;;:33;;;8682:16;:14;:16::i;:::-;8665:50;;;-1:-1:-1;8703:12:0;;;;8702:13;8665:50;8643:146;;;;-1:-1:-1;;;8643:146:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8802:19;8825:13;;;;;;8824:14;8849:101;;;;8884:13;:20;;-1:-1:-1;;;;8884:20:0;;;;;8919:19;8900:4;8919:19;;;8849:101;36131:1:::1;36409:7;:22:::0;8976:68;;;;9027:5;9011:21;;-1:-1:-1;;9011:21:0;;;36333:106;:::o;3660:229::-;3797:12;3829:52;3851:6;3859:4;3865:1;3868:12;3829:21;:52::i;6438:777::-;6588:12;6617:7;6613:595;;;-1:-1:-1;6648:10:0;6641:17;;6613:595;6762:17;;:21;6758:439;;7025:10;7019:17;7086:15;7073:10;7069:2;7065:19;7058:44;6973:148;7168:12;7161:20;;-1:-1:-1;;;7161:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Swarm Source

ipfs://3174b788735f470d70c9efb37a1ec688dc1b7f9bf25cfd46882cbc6a2bfd87ed
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.