FTM Price: $0.67 (-6.60%)
Gas: 27 GWei

Contract

0xe6006167d82B59bcA33e3CE2688F79eddA5cF8fF
 

Overview

FTM Balance

Fantom LogoFantom LogoFantom Logo0 FTM

FTM Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x60806040412218432022-06-24 10:52:51662 days ago1656067971IN
 Create: Vault
0 FTM2.855733,000

Latest 1 internal transaction

Parent Txn Hash Block From To Value
412218432022-06-24 10:52:51662 days ago1656067971  Contract Creation0 FTM
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vault

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : Vault.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity 0.8.10;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "../components/SafeOwnableUpgradeable.sol";

/**
 * @notice  Vault collects fees
 */
contract Vault is Initializable, SafeOwnableUpgradeable {
    using SafeERC20Upgradeable for IERC20Upgradeable;

    event TransferETH(address indexed to, uint256 amount);
    event TransferERC20Token(address indexed token, address indexed to, uint256 amount);

    function initialize() external initializer {
        __SafeOwnable_init();
    }

    /**
     * @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 onlyOwner {
        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   recipient   The receiver of the sent asset.
     * @param   tokens      The address of to be sent ERC20 token.
     * @param   amounts     The amount of asset to send.
     */
    function transferERC20(
        address recipient,
        address[] memory tokens,
        uint256[] memory amounts
    ) external onlyOwner {
        require(recipient != address(0), "recipient is zero address");
        require(tokens.length == amounts.length, "length mismatch");
        for (uint256 i = 0; i < tokens.length; i++) {
            IERC20Upgradeable(tokens[i]).safeTransfer(recipient, amounts[i]);
            emit TransferERC20Token(tokens[i], recipient, amounts[i]);
        }
    }

    /**
     * @notice  A helper method to transfer ERC20 to somewhere.
     *
     * @param   recipient   The receiver of the sent asset.
     * @param   tokens      The address of to be sent ERC20 token.
     */
    function transferAllERC20(address recipient, address[] memory tokens) external onlyOwner {
        require(recipient != address(0), "recipient is zero address");
        for (uint256 i = 0; i < tokens.length; i++) {
            uint256 amount = IERC20Upgradeable(tokens[i]).balanceOf(address(this));
            IERC20Upgradeable(tokens[i]).safeTransfer(recipient, amount);
            emit TransferERC20Token(tokens[i], recipient, amount);
        }
    }

    bytes32[50] private __gap;
}

File 2 of 8 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/AddressUpgradeable.sol";

/**
 * @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 proxied contracts do not make use of 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 {ERC1967Proxy-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.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
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() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

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

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 2 of 8 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @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 2 of 8 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";

/**
 * @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 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'
        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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 2 of 8 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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");

        (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");

        (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");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 2 of 8 : SafeOwnableUpgradeable.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity 0.8.10;

import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

contract SafeOwnableUpgradeable is OwnableUpgradeable {
    address internal _pendingOwner;

    event PrepareToTransferOwnership(address indexed pendingOwner);

    function __SafeOwnable_init() internal onlyInitializing {
        __Ownable_init();
    }

    function transferOwnership(address newOwner) public virtual override onlyOwner {
        require(newOwner != address(0), "O=0"); // Owner Is Zero
        require(newOwner != owner(), "O=O"); // Owner is the same as the old Owner
        _pendingOwner = newOwner;
        emit PrepareToTransferOwnership(_pendingOwner);
    }

    function takeOwnership() public virtual {
        require(_msgSender() == _pendingOwner, "SND"); // SeNDer is not authorized
        _transferOwnership(_pendingOwner);
        _pendingOwner = address(0);
    }

    function renounceOwnership() public virtual override onlyOwner {
        _pendingOwner = address(0);
        _transferOwnership(address(0));
    }
}

File 2 of 8 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract 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 onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

    /**
     * This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 2 of 8 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

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

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

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

    /**
     * This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"PrepareToTransferOwnership","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":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferETH","type":"event"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"takeOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"transferAllERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"transferERC20","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"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50611042806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b146100ba578063b77f57a6146100d9578063f2fde38b146100ec578063fa558b71146100ff57600080fd5b8063605361721461008d578063715018a6146100975780637b1a49091461009f5780638129fc1c146100b2575b600080fd5b610095610112565b005b610095610187565b6100956100ad366004610c26565b6101cd565b6100956102b4565b603354604080516001600160a01b039092168252519081900360200190f35b6100956100e7366004610d2d565b610375565b6100956100fa366004610d7b565b610510565b61009561010d366004610d96565b610604565b6065546001600160a01b0316336001600160a01b0316146101605760405162461bcd60e51b815260206004820152600360248201526214d39160ea1b60448201526064015b60405180910390fd5b606554610175906001600160a01b031661076a565b606580546001600160a01b0319169055565b6033546001600160a01b031633146101b15760405162461bcd60e51b815260040161015790610e60565b606580546001600160a01b03191690556101cb600061076a565b565b6033546001600160a01b031633146101f75760405162461bcd60e51b815260040161015790610e60565b6001600160a01b03821661021d5760405162461bcd60e51b815260040161015790610e95565b806102635760405162461bcd60e51b81526020600482015260166024820152757472616e736665722076616c7565206973207a65726f60501b6044820152606401610157565b61026d82826107bc565b816001600160a01b03167ffd69c215b8b91dab5e96ff0bcbaf5dc372919948eea2003ae16481c036f816f8826040516102a891815260200190565b60405180910390a25050565b600054610100900460ff166102cf5760005460ff16156102d3565b303b155b6103365760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610157565b600054610100900460ff16158015610358576000805461ffff19166101011790555b6103606108d5565b8015610372576000805461ff00191690555b50565b6033546001600160a01b0316331461039f5760405162461bcd60e51b815260040161015790610e60565b6001600160a01b0382166103c55760405162461bcd60e51b815260040161015790610e95565b60005b815181101561050b5760008282815181106103e5576103e5610ecc565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610435573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104599190610ee2565b9050610492848285858151811061047257610472610ecc565b60200260200101516001600160a01b03166109049092919063ffffffff16565b836001600160a01b03168383815181106104ae576104ae610ecc565b60200260200101516001600160a01b03167fef5fa1fa3cd0dfe0d2facbe06d2ad27a41064097c8f3a53629aeba6d65f2ddc2836040516104f091815260200190565b60405180910390a3508061050381610efb565b9150506103c8565b505050565b6033546001600160a01b0316331461053a5760405162461bcd60e51b815260040161015790610e60565b6001600160a01b0381166105765760405162461bcd60e51b815260206004820152600360248201526204f3d360ec1b6044820152606401610157565b6033546001600160a01b03828116911614156105ba5760405162461bcd60e51b81526020600482015260036024820152624f3d4f60e81b6044820152606401610157565b606580546001600160a01b0319166001600160a01b0383169081179091556040517fb501f5dc3610d10a179d924f686fc89ddcdd3abb05afd7a1baeead166b2f122c90600090a250565b6033546001600160a01b0316331461062e5760405162461bcd60e51b815260040161015790610e60565b6001600160a01b0383166106545760405162461bcd60e51b815260040161015790610e95565b80518251146106975760405162461bcd60e51b815260206004820152600f60248201526e0d8cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610157565b60005b8251811015610764576106d3848383815181106106b9576106b9610ecc565b602002602001015185848151811061047257610472610ecc565b836001600160a01b03168382815181106106ef576106ef610ecc565b60200260200101516001600160a01b03167fef5fa1fa3cd0dfe0d2facbe06d2ad27a41064097c8f3a53629aeba6d65f2ddc284848151811061073357610733610ecc565b602002602001015160405161074a91815260200190565b60405180910390a38061075c81610efb565b91505061069a565b50505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8047101561080c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610157565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610859576040519150601f19603f3d011682016040523d82523d6000602084013e61085e565b606091505b505090508061050b5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610157565b600054610100900460ff166108fc5760405162461bcd60e51b815260040161015790610f24565b6101cb610956565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261050b908490610985565b600054610100900460ff1661097d5760405162461bcd60e51b815260040161015790610f24565b6101cb610a57565b60006109da826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610a879092919063ffffffff16565b80519091501561050b57808060200190518101906109f89190610f6f565b61050b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610157565b600054610100900460ff16610a7e5760405162461bcd60e51b815260040161015790610f24565b6101cb3361076a565b6060610a968484600085610aa0565b90505b9392505050565b606082471015610b015760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610157565b6001600160a01b0385163b610b585760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610157565b600080866001600160a01b03168587604051610b749190610fbd565b60006040518083038185875af1925050503d8060008114610bb1576040519150601f19603f3d011682016040523d82523d6000602084013e610bb6565b606091505b5091509150610bc6828286610bd1565b979650505050505050565b60608315610be0575081610a99565b825115610bf05782518084602001fd5b8160405162461bcd60e51b81526004016101579190610fd9565b80356001600160a01b0381168114610c2157600080fd5b919050565b60008060408385031215610c3957600080fd5b610c4283610c0a565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610c8f57610c8f610c50565b604052919050565b600067ffffffffffffffff821115610cb157610cb1610c50565b5060051b60200190565b600082601f830112610ccc57600080fd5b81356020610ce1610cdc83610c97565b610c66565b82815260059290921b84018101918181019086841115610d0057600080fd5b8286015b84811015610d2257610d1581610c0a565b8352918301918301610d04565b509695505050505050565b60008060408385031215610d4057600080fd5b610d4983610c0a565b9150602083013567ffffffffffffffff811115610d6557600080fd5b610d7185828601610cbb565b9150509250929050565b600060208284031215610d8d57600080fd5b610a9982610c0a565b600080600060608486031215610dab57600080fd5b610db484610c0a565b925060208085013567ffffffffffffffff80821115610dd257600080fd5b610dde88838901610cbb565b94506040870135915080821115610df457600080fd5b508501601f81018713610e0657600080fd5b8035610e14610cdc82610c97565b81815260059190911b82018301908381019089831115610e3357600080fd5b928401925b82841015610e5157833582529284019290840190610e38565b80955050505050509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526019908201527f726563697069656e74206973207a65726f206164647265737300000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610ef457600080fd5b5051919050565b6000600019821415610f1d57634e487b7160e01b600052601160045260246000fd5b5060010190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600060208284031215610f8157600080fd5b81518015158114610a9957600080fd5b60005b83811015610fac578181015183820152602001610f94565b838111156107645750506000910152565b60008251610fcf818460208701610f91565b9190910192915050565b6020815260008251806020840152610ff8816040850160208701610f91565b601f01601f1916919091016040019291505056fea2646970667358221220dc5b4fdeb66b5df6c3f47451449f9976ee1ceceb804c21ce65748894bd89390664736f6c634300080a0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b146100ba578063b77f57a6146100d9578063f2fde38b146100ec578063fa558b71146100ff57600080fd5b8063605361721461008d578063715018a6146100975780637b1a49091461009f5780638129fc1c146100b2575b600080fd5b610095610112565b005b610095610187565b6100956100ad366004610c26565b6101cd565b6100956102b4565b603354604080516001600160a01b039092168252519081900360200190f35b6100956100e7366004610d2d565b610375565b6100956100fa366004610d7b565b610510565b61009561010d366004610d96565b610604565b6065546001600160a01b0316336001600160a01b0316146101605760405162461bcd60e51b815260206004820152600360248201526214d39160ea1b60448201526064015b60405180910390fd5b606554610175906001600160a01b031661076a565b606580546001600160a01b0319169055565b6033546001600160a01b031633146101b15760405162461bcd60e51b815260040161015790610e60565b606580546001600160a01b03191690556101cb600061076a565b565b6033546001600160a01b031633146101f75760405162461bcd60e51b815260040161015790610e60565b6001600160a01b03821661021d5760405162461bcd60e51b815260040161015790610e95565b806102635760405162461bcd60e51b81526020600482015260166024820152757472616e736665722076616c7565206973207a65726f60501b6044820152606401610157565b61026d82826107bc565b816001600160a01b03167ffd69c215b8b91dab5e96ff0bcbaf5dc372919948eea2003ae16481c036f816f8826040516102a891815260200190565b60405180910390a25050565b600054610100900460ff166102cf5760005460ff16156102d3565b303b155b6103365760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610157565b600054610100900460ff16158015610358576000805461ffff19166101011790555b6103606108d5565b8015610372576000805461ff00191690555b50565b6033546001600160a01b0316331461039f5760405162461bcd60e51b815260040161015790610e60565b6001600160a01b0382166103c55760405162461bcd60e51b815260040161015790610e95565b60005b815181101561050b5760008282815181106103e5576103e5610ecc565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610435573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104599190610ee2565b9050610492848285858151811061047257610472610ecc565b60200260200101516001600160a01b03166109049092919063ffffffff16565b836001600160a01b03168383815181106104ae576104ae610ecc565b60200260200101516001600160a01b03167fef5fa1fa3cd0dfe0d2facbe06d2ad27a41064097c8f3a53629aeba6d65f2ddc2836040516104f091815260200190565b60405180910390a3508061050381610efb565b9150506103c8565b505050565b6033546001600160a01b0316331461053a5760405162461bcd60e51b815260040161015790610e60565b6001600160a01b0381166105765760405162461bcd60e51b815260206004820152600360248201526204f3d360ec1b6044820152606401610157565b6033546001600160a01b03828116911614156105ba5760405162461bcd60e51b81526020600482015260036024820152624f3d4f60e81b6044820152606401610157565b606580546001600160a01b0319166001600160a01b0383169081179091556040517fb501f5dc3610d10a179d924f686fc89ddcdd3abb05afd7a1baeead166b2f122c90600090a250565b6033546001600160a01b0316331461062e5760405162461bcd60e51b815260040161015790610e60565b6001600160a01b0383166106545760405162461bcd60e51b815260040161015790610e95565b80518251146106975760405162461bcd60e51b815260206004820152600f60248201526e0d8cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610157565b60005b8251811015610764576106d3848383815181106106b9576106b9610ecc565b602002602001015185848151811061047257610472610ecc565b836001600160a01b03168382815181106106ef576106ef610ecc565b60200260200101516001600160a01b03167fef5fa1fa3cd0dfe0d2facbe06d2ad27a41064097c8f3a53629aeba6d65f2ddc284848151811061073357610733610ecc565b602002602001015160405161074a91815260200190565b60405180910390a38061075c81610efb565b91505061069a565b50505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8047101561080c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610157565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610859576040519150601f19603f3d011682016040523d82523d6000602084013e61085e565b606091505b505090508061050b5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610157565b600054610100900460ff166108fc5760405162461bcd60e51b815260040161015790610f24565b6101cb610956565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261050b908490610985565b600054610100900460ff1661097d5760405162461bcd60e51b815260040161015790610f24565b6101cb610a57565b60006109da826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610a879092919063ffffffff16565b80519091501561050b57808060200190518101906109f89190610f6f565b61050b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610157565b600054610100900460ff16610a7e5760405162461bcd60e51b815260040161015790610f24565b6101cb3361076a565b6060610a968484600085610aa0565b90505b9392505050565b606082471015610b015760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610157565b6001600160a01b0385163b610b585760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610157565b600080866001600160a01b03168587604051610b749190610fbd565b60006040518083038185875af1925050503d8060008114610bb1576040519150601f19603f3d011682016040523d82523d6000602084013e610bb6565b606091505b5091509150610bc6828286610bd1565b979650505050505050565b60608315610be0575081610a99565b825115610bf05782518084602001fd5b8160405162461bcd60e51b81526004016101579190610fd9565b80356001600160a01b0381168114610c2157600080fd5b919050565b60008060408385031215610c3957600080fd5b610c4283610c0a565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610c8f57610c8f610c50565b604052919050565b600067ffffffffffffffff821115610cb157610cb1610c50565b5060051b60200190565b600082601f830112610ccc57600080fd5b81356020610ce1610cdc83610c97565b610c66565b82815260059290921b84018101918181019086841115610d0057600080fd5b8286015b84811015610d2257610d1581610c0a565b8352918301918301610d04565b509695505050505050565b60008060408385031215610d4057600080fd5b610d4983610c0a565b9150602083013567ffffffffffffffff811115610d6557600080fd5b610d7185828601610cbb565b9150509250929050565b600060208284031215610d8d57600080fd5b610a9982610c0a565b600080600060608486031215610dab57600080fd5b610db484610c0a565b925060208085013567ffffffffffffffff80821115610dd257600080fd5b610dde88838901610cbb565b94506040870135915080821115610df457600080fd5b508501601f81018713610e0657600080fd5b8035610e14610cdc82610c97565b81815260059190911b82018301908381019089831115610e3357600080fd5b928401925b82841015610e5157833582529284019290840190610e38565b80955050505050509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526019908201527f726563697069656e74206973207a65726f206164647265737300000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610ef457600080fd5b5051919050565b6000600019821415610f1d57634e487b7160e01b600052601160045260246000fd5b5060010190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600060208284031215610f8157600080fd5b81518015158114610a9957600080fd5b60005b83811015610fac578181015183820152602001610f94565b838111156107645750506000910152565b60008251610fcf818460208701610f91565b9190910192915050565b6020815260008251806020840152610ff8816040850160208701610f91565b601f01601f1916919091016040019291505056fea2646970667358221220dc5b4fdeb66b5df6c3f47451449f9976ee1ceceb804c21ce65748894bd89390664736f6c634300080a0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

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

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