ETH Price: $2,740.18 (+2.01%)

Contract

0xB92D9E862BE0eFE9687E2d0097f2ee98c681d38b
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Omnisender

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 9 : Omnisender.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.4;

import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";

/**
 * @title Omnisender
 *
 * @notice allows for distribution of any standard tokens to multiple addresses
 */
contract Omnisender is OwnableUpgradeable {

    // flag for discounts
    bool private discountEnabled;
    // fee charged in native token
    uint256 public fee;
    // counter for number of times an address has used Omnisender
    mapping(address => uint256) public uses;

    constructor() {}

    /**
     @dev initialize the fee
     @param _fee the fee in wei
     */
    function initialize(
        uint256 _fee
    ) external initializer {
        __Ownable_init();
        fee = _fee;
        discountEnabled = false;
    }

    /**
     @notice distributes the native token to recipients
     @param recipients the addresses receiving the tokens
     @param amounts the amounts each address should receive
     */
    function distributeETH(
        address[] calldata recipients, 
        uint256[] calldata amounts
    ) external payable incrementUses {
        require(recipients.length == amounts.length, "Mismatched input lengths");
        uint256 total = calculateFee();
        for (uint256 i = 0; i < recipients.length; i++) {
            payable(recipients[i]).transfer(amounts[i]);
            total += amounts[i];
        }
        require(total == msg.value, "Invalid fee amount");
    }

    /**
     @notice distributes ERC20 tokens to the recipients
     @param recipients the addresses receiving the tokens
     @param amounts the amounts each address should receive
     */
    function distributeERC20(
        address token, 
        address[] calldata recipients, 
        uint256[] calldata amounts
    ) external payable incrementUses{
        require(msg.value == calculateFee(), "Invalid fee amount");
        IERC20 erc20 = IERC20(token);
        require(recipients.length == amounts.length, "Mismatched input lengths");
        for (uint256 i = 0; i < recipients.length; i++) {
            erc20.transferFrom(msg.sender, recipients[i], amounts[i]);
        }
    }

    /**
     @notice distributes ERC1155 tokens to the recipients
     @param recipients the addresses receiving the tokens
     @param ids the ID of each token to send to each address
     @param amounts the amounts each address should receive of the corresponding token ID
     */
    function distributeERC1155(
        address token, 
        address[] calldata recipients, 
        uint256[] calldata ids, 
        uint256[] calldata amounts
    ) external payable incrementUses {
        require(msg.value == calculateFee(), "Invalid fee amount");        
        IERC1155 erc1155 = IERC1155(token);
        require(recipients.length == amounts.length, "Mismatched input lengths");
        require(recipients.length == ids.length, "Mismatched input lengths");
        for (uint256 i = 0; i < recipients.length; i++) {
            erc1155.safeTransferFrom(msg.sender, recipients[i], ids[i], amounts[i], "");
        }
    }

    /**
     @notice distributes ERC721 tokens to the recipients
     @param recipients the addresses receiving the tokens
     @param ids the ID of each token to send to the corresponding address
     */
    function distributeERC721(
        address token, 
        address[] calldata recipients, 
        uint256[] calldata ids
    ) external payable incrementUses {
        require(msg.value == calculateFee(), "Invalid fee amount");
        IERC721 erc721 = IERC721(token);
        require(recipients.length == ids.length, "Mismatched input lengths");
        for (uint256 i = 0; i < recipients.length; i++) {
            erc721.transferFrom(msg.sender, recipients[i], ids[i]);
        }
    }

    /**
     @dev updates the fee
     @param _fee the new fee in wei
     */
    function setFee(uint256 _fee) external onlyOwner {
        fee = _fee;
    }

    /**
     @dev enables / disables the discount feature
     @param _enabled whether or not it should be enabled
     */
    function setDiscountEnabled(bool _enabled) external onlyOwner {
        discountEnabled = _enabled;
    }

    /**
     @dev withdraws fees to the contract owner
     */
    function withdraw() external onlyOwner {
        payable(msg.sender).transfer(address(this).balance);
    }

    /**
     @dev calculates the fee based on whether the discount is enabled
     * 10% discount for each use
     */
    function calculateFee() internal view returns(uint256) {
        if (!discountEnabled) return fee;
        uint256 use = uses[msg.sender] > 8 ? 8 : uses[msg.sender];
        return fee - (use * fee / 10);
    }

    /**
     @dev tracks the number of times an address has used the contract
     */
    modifier incrementUses() {
        _;
        uses[msg.sender] += 1;
    }
}

File 2 of 9 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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);
    }

    /**
     * @dev 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 3 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 4 of 9 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @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`.
     *
     * 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 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 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

File 5 of 9 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 6 of 9 : 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;
    }

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

File 7 of 9 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

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.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * 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 prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

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

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

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

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

File 8 of 9 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 9 of 9 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"distributeERC1155","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"distributeERC20","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"distributeERC721","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"distributeETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"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":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setDiscountEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"uses","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50611bb7806100206000396000f3fe6080604052600436106100c25760003560e01c8063b32d79dd1161007f578063f2fde38b11610059578063f2fde38b14610212578063f8b7fabf1461023b578063fe4b84df14610257578063feeb944914610280576100c2565b8063b32d79dd1461018e578063b882f67c146101aa578063ddca3f43146101e7576100c2565b80633ccfd60b146100c757806369fe0e2d146100de578063715018a61461010757806384b7d3aa1461011e578063871d0805146101475780638da5cb5b14610163575b600080fd5b3480156100d357600080fd5b506100dc61029c565b005b3480156100ea57600080fd5b50610105600480360381019061010091906114a1565b6102ed565b005b34801561011357600080fd5b5061011c6102ff565b005b34801561012a57600080fd5b506101456004803603810190610140919061144f565b610313565b005b610161600480360381019061015c9190611321565b610338565b005b34801561016f57600080fd5b506101786105d5565b60405161018591906115ec565b60405180910390f35b6101a860048036038101906101a39190611298565b6105ff565b005b3480156101b657600080fd5b506101d160048036038101906101cc919061126f565b610832565b6040516101de9190611771565b60405180910390f35b3480156101f357600080fd5b506101fc61084a565b6040516102099190611771565b60405180910390f35b34801561021e57600080fd5b506102396004803603810190610234919061126f565b610850565b005b610255600480360381019061025091906113da565b6108d4565b005b34801561026357600080fd5b5061027e600480360381019061027991906114a1565b610b0a565b005b61029a60048036038101906102959190611298565b610c6b565b005b6102a4610e7d565b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f193505050501580156102ea573d6000803e3d6000fd5b50565b6102f5610e7d565b8060668190555050565b610307610e7d565b6103116000610efb565b565b61031b610e7d565b80606560006101000a81548160ff02191690831515021790555050565b610340610fc1565b3414610381576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610378906116b1565b60405180910390fd5b60008790508282905087879050146103ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103c5906116f1565b60405180910390fd5b848490508787905014610416576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040d906116f1565b60405180910390fd5b60005b87879050811015610573578173ffffffffffffffffffffffffffffffffffffffff1663f242432a338a8a8581811061047a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201602081019061048f919061126f565b8989868181106104c8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135888887818110610508577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201356040518563ffffffff1660e01b815260040161052e949392919061163e565b600060405180830381600087803b15801561054857600080fd5b505af115801561055c573d6000803e3d6000fd5b50505050808061056b9061192a565b915050610419565b50506001606760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546105c591906117ae565b9250508190555050505050505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610607610fc1565b3414610648576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063f906116b1565b60405180910390fd5b6000859050828290508585905014610695576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068c906116f1565b60405180910390fd5b60005b858590508110156107d2578173ffffffffffffffffffffffffffffffffffffffff166323b872dd338888858181106106f9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201602081019061070e919061126f565b878786818110610747577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b815260040161076c93929190611607565b602060405180830381600087803b15801561078657600080fd5b505af115801561079a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107be9190611478565b5080806107ca9061192a565b915050610698565b50506001606760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461082491906117ae565b925050819055505050505050565b60676020528060005260406000206000915090505481565b60665481565b610858610e7d565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156108c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108bf906116d1565b60405180910390fd5b6108d181610efb565b50565b81819050848490501461091c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610913906116f1565b60405180910390fd5b6000610926610fc1565b905060005b85859050811015610a695785858281811061096f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002016020810190610984919061126f565b73ffffffffffffffffffffffffffffffffffffffff166108fc8585848181106109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201359081150290604051600060405180830381858888f19350505050158015610a08573d6000803e3d6000fd5b50838382818110610a42577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002013582610a5491906117ae565b91508080610a619061192a565b91505061092b565b50348114610aac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa3906116b1565b60405180910390fd5b506001606760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610afd91906117ae565b9250508190555050505050565b60008060019054906101000a900460ff16159050808015610b3b5750600160008054906101000a900460ff1660ff16105b80610b685750610b4a306110a2565b158015610b675750600160008054906101000a900460ff1660ff16145b5b610ba7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9e90611711565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610be4576001600060016101000a81548160ff0219169083151502179055505b610bec6110c5565b816066819055506000606560006101000a81548160ff0219169083151502179055508015610c675760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610c5e9190611696565b60405180910390a15b5050565b610c73610fc1565b3414610cb4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cab906116b1565b60405180910390fd5b6000859050828290508585905014610d01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf8906116f1565b60405180910390fd5b60005b85859050811015610e1d578173ffffffffffffffffffffffffffffffffffffffff166323b872dd33888885818110610d65577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002016020810190610d7a919061126f565b878786818110610db3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b8152600401610dd893929190611607565b600060405180830381600087803b158015610df257600080fd5b505af1158015610e06573d6000803e3d6000fd5b505050508080610e159061192a565b915050610d04565b50506001606760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e6f91906117ae565b925050819055505050505050565b610e8561111e565b73ffffffffffffffffffffffffffffffffffffffff16610ea36105d5565b73ffffffffffffffffffffffffffffffffffffffff1614610ef9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ef090611731565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000606560009054906101000a900460ff16610fe157606654905061109f565b60006008606760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541161106f57606760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611072565b60085b9050600a606654826110849190611835565b61108e9190611804565b60665461109b919061188f565b9150505b90565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110b90611751565b60405180910390fd5b61111c611126565b565b600033905090565b600060019054906101000a900460ff16611175576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116c90611751565b60405180910390fd5b61118561118061111e565b610efb565b565b60008135905061119681611b3c565b92915050565b60008083601f8401126111ae57600080fd5b8235905067ffffffffffffffff8111156111c757600080fd5b6020830191508360208202830111156111df57600080fd5b9250929050565b60008083601f8401126111f857600080fd5b8235905067ffffffffffffffff81111561121157600080fd5b60208301915083602082028301111561122957600080fd5b9250929050565b60008135905061123f81611b53565b92915050565b60008151905061125481611b53565b92915050565b60008135905061126981611b6a565b92915050565b60006020828403121561128157600080fd5b600061128f84828501611187565b91505092915050565b6000806000806000606086880312156112b057600080fd5b60006112be88828901611187565b955050602086013567ffffffffffffffff8111156112db57600080fd5b6112e78882890161119c565b9450945050604086013567ffffffffffffffff81111561130657600080fd5b611312888289016111e6565b92509250509295509295909350565b60008060008060008060006080888a03121561133c57600080fd5b600061134a8a828b01611187565b975050602088013567ffffffffffffffff81111561136757600080fd5b6113738a828b0161119c565b9650965050604088013567ffffffffffffffff81111561139257600080fd5b61139e8a828b016111e6565b9450945050606088013567ffffffffffffffff8111156113bd57600080fd5b6113c98a828b016111e6565b925092505092959891949750929550565b600080600080604085870312156113f057600080fd5b600085013567ffffffffffffffff81111561140a57600080fd5b6114168782880161119c565b9450945050602085013567ffffffffffffffff81111561143557600080fd5b611441878288016111e6565b925092505092959194509250565b60006020828403121561146157600080fd5b600061146f84828501611230565b91505092915050565b60006020828403121561148a57600080fd5b600061149884828501611245565b91505092915050565b6000602082840312156114b357600080fd5b60006114c18482850161125a565b91505092915050565b6114d3816118c3565b82525050565b6114e281611918565b82525050565b60006114f560128361179d565b9150611500826119d1565b602082019050919050565b600061151860268361179d565b9150611523826119fa565b604082019050919050565b600061153b60188361179d565b915061154682611a49565b602082019050919050565b600061155e602e8361179d565b915061156982611a72565b604082019050919050565b600061158160208361179d565b915061158c82611ac1565b602082019050919050565b60006115a460008361178c565b91506115af82611aea565b600082019050919050565b60006115c7602b8361179d565b91506115d282611aed565b604082019050919050565b6115e681611901565b82525050565b600060208201905061160160008301846114ca565b92915050565b600060608201905061161c60008301866114ca565b61162960208301856114ca565b61163660408301846115dd565b949350505050565b600060a08201905061165360008301876114ca565b61166060208301866114ca565b61166d60408301856115dd565b61167a60608301846115dd565b818103608083015261168b81611597565b905095945050505050565b60006020820190506116ab60008301846114d9565b92915050565b600060208201905081810360008301526116ca816114e8565b9050919050565b600060208201905081810360008301526116ea8161150b565b9050919050565b6000602082019050818103600083015261170a8161152e565b9050919050565b6000602082019050818103600083015261172a81611551565b9050919050565b6000602082019050818103600083015261174a81611574565b9050919050565b6000602082019050818103600083015261176a816115ba565b9050919050565b600060208201905061178660008301846115dd565b92915050565b600082825260208201905092915050565b600082825260208201905092915050565b60006117b982611901565b91506117c483611901565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156117f9576117f8611973565b5b828201905092915050565b600061180f82611901565b915061181a83611901565b92508261182a576118296119a2565b5b828204905092915050565b600061184082611901565b915061184b83611901565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561188457611883611973565b5b828202905092915050565b600061189a82611901565b91506118a583611901565b9250828210156118b8576118b7611973565b5b828203905092915050565b60006118ce826118e1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006119238261190b565b9050919050565b600061193582611901565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561196857611967611973565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f496e76616c69642066656520616d6f756e740000000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4d69736d61746368656420696e707574206c656e677468730000000000000000600082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b611b45816118c3565b8114611b5057600080fd5b50565b611b5c816118d5565b8114611b6757600080fd5b50565b611b7381611901565b8114611b7e57600080fd5b5056fea2646970667358221220cb45299743a87ba0c3589c6d22902bb41b589a7da5c5e30489118c29eb78c43d64736f6c63430008040033

Deployed Bytecode

0x6080604052600436106100c25760003560e01c8063b32d79dd1161007f578063f2fde38b11610059578063f2fde38b14610212578063f8b7fabf1461023b578063fe4b84df14610257578063feeb944914610280576100c2565b8063b32d79dd1461018e578063b882f67c146101aa578063ddca3f43146101e7576100c2565b80633ccfd60b146100c757806369fe0e2d146100de578063715018a61461010757806384b7d3aa1461011e578063871d0805146101475780638da5cb5b14610163575b600080fd5b3480156100d357600080fd5b506100dc61029c565b005b3480156100ea57600080fd5b50610105600480360381019061010091906114a1565b6102ed565b005b34801561011357600080fd5b5061011c6102ff565b005b34801561012a57600080fd5b506101456004803603810190610140919061144f565b610313565b005b610161600480360381019061015c9190611321565b610338565b005b34801561016f57600080fd5b506101786105d5565b60405161018591906115ec565b60405180910390f35b6101a860048036038101906101a39190611298565b6105ff565b005b3480156101b657600080fd5b506101d160048036038101906101cc919061126f565b610832565b6040516101de9190611771565b60405180910390f35b3480156101f357600080fd5b506101fc61084a565b6040516102099190611771565b60405180910390f35b34801561021e57600080fd5b506102396004803603810190610234919061126f565b610850565b005b610255600480360381019061025091906113da565b6108d4565b005b34801561026357600080fd5b5061027e600480360381019061027991906114a1565b610b0a565b005b61029a60048036038101906102959190611298565b610c6b565b005b6102a4610e7d565b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f193505050501580156102ea573d6000803e3d6000fd5b50565b6102f5610e7d565b8060668190555050565b610307610e7d565b6103116000610efb565b565b61031b610e7d565b80606560006101000a81548160ff02191690831515021790555050565b610340610fc1565b3414610381576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610378906116b1565b60405180910390fd5b60008790508282905087879050146103ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103c5906116f1565b60405180910390fd5b848490508787905014610416576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040d906116f1565b60405180910390fd5b60005b87879050811015610573578173ffffffffffffffffffffffffffffffffffffffff1663f242432a338a8a8581811061047a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201602081019061048f919061126f565b8989868181106104c8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020135888887818110610508577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201356040518563ffffffff1660e01b815260040161052e949392919061163e565b600060405180830381600087803b15801561054857600080fd5b505af115801561055c573d6000803e3d6000fd5b50505050808061056b9061192a565b915050610419565b50506001606760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546105c591906117ae565b9250508190555050505050505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610607610fc1565b3414610648576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063f906116b1565b60405180910390fd5b6000859050828290508585905014610695576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068c906116f1565b60405180910390fd5b60005b858590508110156107d2578173ffffffffffffffffffffffffffffffffffffffff166323b872dd338888858181106106f9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201602081019061070e919061126f565b878786818110610747577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b815260040161076c93929190611607565b602060405180830381600087803b15801561078657600080fd5b505af115801561079a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107be9190611478565b5080806107ca9061192a565b915050610698565b50506001606760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461082491906117ae565b925050819055505050505050565b60676020528060005260406000206000915090505481565b60665481565b610858610e7d565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156108c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108bf906116d1565b60405180910390fd5b6108d181610efb565b50565b81819050848490501461091c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610913906116f1565b60405180910390fd5b6000610926610fc1565b905060005b85859050811015610a695785858281811061096f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002016020810190610984919061126f565b73ffffffffffffffffffffffffffffffffffffffff166108fc8585848181106109d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201359081150290604051600060405180830381858888f19350505050158015610a08573d6000803e3d6000fd5b50838382818110610a42577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002013582610a5491906117ae565b91508080610a619061192a565b91505061092b565b50348114610aac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa3906116b1565b60405180910390fd5b506001606760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610afd91906117ae565b9250508190555050505050565b60008060019054906101000a900460ff16159050808015610b3b5750600160008054906101000a900460ff1660ff16105b80610b685750610b4a306110a2565b158015610b675750600160008054906101000a900460ff1660ff16145b5b610ba7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9e90611711565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610be4576001600060016101000a81548160ff0219169083151502179055505b610bec6110c5565b816066819055506000606560006101000a81548160ff0219169083151502179055508015610c675760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610c5e9190611696565b60405180910390a15b5050565b610c73610fc1565b3414610cb4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cab906116b1565b60405180910390fd5b6000859050828290508585905014610d01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf8906116f1565b60405180910390fd5b60005b85859050811015610e1d578173ffffffffffffffffffffffffffffffffffffffff166323b872dd33888885818110610d65577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002016020810190610d7a919061126f565b878786818110610db3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b8152600401610dd893929190611607565b600060405180830381600087803b158015610df257600080fd5b505af1158015610e06573d6000803e3d6000fd5b505050508080610e159061192a565b915050610d04565b50506001606760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e6f91906117ae565b925050819055505050505050565b610e8561111e565b73ffffffffffffffffffffffffffffffffffffffff16610ea36105d5565b73ffffffffffffffffffffffffffffffffffffffff1614610ef9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ef090611731565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000606560009054906101000a900460ff16610fe157606654905061109f565b60006008606760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541161106f57606760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611072565b60085b9050600a606654826110849190611835565b61108e9190611804565b60665461109b919061188f565b9150505b90565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110b90611751565b60405180910390fd5b61111c611126565b565b600033905090565b600060019054906101000a900460ff16611175576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116c90611751565b60405180910390fd5b61118561118061111e565b610efb565b565b60008135905061119681611b3c565b92915050565b60008083601f8401126111ae57600080fd5b8235905067ffffffffffffffff8111156111c757600080fd5b6020830191508360208202830111156111df57600080fd5b9250929050565b60008083601f8401126111f857600080fd5b8235905067ffffffffffffffff81111561121157600080fd5b60208301915083602082028301111561122957600080fd5b9250929050565b60008135905061123f81611b53565b92915050565b60008151905061125481611b53565b92915050565b60008135905061126981611b6a565b92915050565b60006020828403121561128157600080fd5b600061128f84828501611187565b91505092915050565b6000806000806000606086880312156112b057600080fd5b60006112be88828901611187565b955050602086013567ffffffffffffffff8111156112db57600080fd5b6112e78882890161119c565b9450945050604086013567ffffffffffffffff81111561130657600080fd5b611312888289016111e6565b92509250509295509295909350565b60008060008060008060006080888a03121561133c57600080fd5b600061134a8a828b01611187565b975050602088013567ffffffffffffffff81111561136757600080fd5b6113738a828b0161119c565b9650965050604088013567ffffffffffffffff81111561139257600080fd5b61139e8a828b016111e6565b9450945050606088013567ffffffffffffffff8111156113bd57600080fd5b6113c98a828b016111e6565b925092505092959891949750929550565b600080600080604085870312156113f057600080fd5b600085013567ffffffffffffffff81111561140a57600080fd5b6114168782880161119c565b9450945050602085013567ffffffffffffffff81111561143557600080fd5b611441878288016111e6565b925092505092959194509250565b60006020828403121561146157600080fd5b600061146f84828501611230565b91505092915050565b60006020828403121561148a57600080fd5b600061149884828501611245565b91505092915050565b6000602082840312156114b357600080fd5b60006114c18482850161125a565b91505092915050565b6114d3816118c3565b82525050565b6114e281611918565b82525050565b60006114f560128361179d565b9150611500826119d1565b602082019050919050565b600061151860268361179d565b9150611523826119fa565b604082019050919050565b600061153b60188361179d565b915061154682611a49565b602082019050919050565b600061155e602e8361179d565b915061156982611a72565b604082019050919050565b600061158160208361179d565b915061158c82611ac1565b602082019050919050565b60006115a460008361178c565b91506115af82611aea565b600082019050919050565b60006115c7602b8361179d565b91506115d282611aed565b604082019050919050565b6115e681611901565b82525050565b600060208201905061160160008301846114ca565b92915050565b600060608201905061161c60008301866114ca565b61162960208301856114ca565b61163660408301846115dd565b949350505050565b600060a08201905061165360008301876114ca565b61166060208301866114ca565b61166d60408301856115dd565b61167a60608301846115dd565b818103608083015261168b81611597565b905095945050505050565b60006020820190506116ab60008301846114d9565b92915050565b600060208201905081810360008301526116ca816114e8565b9050919050565b600060208201905081810360008301526116ea8161150b565b9050919050565b6000602082019050818103600083015261170a8161152e565b9050919050565b6000602082019050818103600083015261172a81611551565b9050919050565b6000602082019050818103600083015261174a81611574565b9050919050565b6000602082019050818103600083015261176a816115ba565b9050919050565b600060208201905061178660008301846115dd565b92915050565b600082825260208201905092915050565b600082825260208201905092915050565b60006117b982611901565b91506117c483611901565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156117f9576117f8611973565b5b828201905092915050565b600061180f82611901565b915061181a83611901565b92508261182a576118296119a2565b5b828204905092915050565b600061184082611901565b915061184b83611901565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561188457611883611973565b5b828202905092915050565b600061189a82611901565b91506118a583611901565b9250828210156118b8576118b7611973565b5b828203905092915050565b60006118ce826118e1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006119238261190b565b9050919050565b600061193582611901565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561196857611967611973565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f496e76616c69642066656520616d6f756e740000000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4d69736d61746368656420696e707574206c656e677468730000000000000000600082015250565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b611b45816118c3565b8114611b5057600080fd5b50565b611b5c816118d5565b8114611b6757600080fd5b50565b611b7381611901565b8114611b7e57600080fd5b5056fea2646970667358221220cb45299743a87ba0c3589c6d22902bb41b589a7da5c5e30489118c29eb78c43d64736f6c63430008040033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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.