ETH Price: $2,471.19 (+0.90%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Enable170266332023-04-11 18:32:47572 days ago1681237967IN
0xC25A94Fd...862A77cc0
0 ETH0.0018330648.46946636
Transfer Ownersh...170143212023-04-10 0:41:35574 days ago1681087295IN
0xC25A94Fd...862A77cc0
0 ETH0.0007169725
Map Tokens170143192023-04-10 0:41:11574 days ago1681087271IN
0xC25A94Fd...862A77cc0
0 ETH0.0097120525
Map Tokens170143182023-04-10 0:40:59574 days ago1681087259IN
0xC25A94Fd...862A77cc0
0 ETH0.0233167525
Map Tokens170142862023-04-10 0:34:23574 days ago1681086863IN
0xC25A94Fd...862A77cc0
0 ETH0.0233161525
Map Tokens170142852023-04-10 0:34:11574 days ago1681086851IN
0xC25A94Fd...862A77cc0
0 ETH0.0233164525
Map Tokens170142832023-04-10 0:33:47574 days ago1681086827IN
0xC25A94Fd...862A77cc0
0 ETH0.0233170525
Map Tokens170142822023-04-10 0:33:35574 days ago1681086815IN
0xC25A94Fd...862A77cc0
0 ETH0.0233164525
Initialize170142812023-04-10 0:33:23574 days ago1681086803IN
0xC25A94Fd...862A77cc0
0 ETH0.0029689725
0x60806040170142802023-04-10 0:33:11574 days ago1681086791IN
 Create: TaggrNftRelay
0 ETH0.0382144525

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TaggrNftRelay

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

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

pragma solidity >=0.8.0 <0.9.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "../interfaces/ITaggrNftRelay.sol";
import "../lib/BlackholePrevention.sol";

/**
 Testing Scenario:

  1. Deploy a Fake/Mock NFT Contract (Standard, with Random Token IDs)
  2. Deploy TaggrNftRelay Contract
  3. Mint X amount of Mock NFTs to an EOA (Personal Test Wallet)
  4. Approve the TaggrNftRelay Contract (setApprovalForAll) for the Mock NFTs
  5. Create Customer with Taggr.managerUpdateCustomerAccount()
  6. Call Taggr.managerLaunchNewProjectWithContract() with the TaggrNftRelay Contract address
  7. Call initialize() on TaggrNftRelay
  8. Call mapTokens() on TaggrNftRelay
  9. Call enable() on TaggrNftRelay (will only work if Approved to transfer Mock NFTs first)
 10. Test forceDistributeToken()
 11. Test ClaimNft from NftDistributor
 12. Test OwnerOf() for Taggr Owner Verification
*/

/**
 * @dev Allows an External NFT Contract to Relay Distribution of Tokens through Taggr's NftDistributor
 *  - Allows you to Map Non-Sequential or Custom Token IDs to a Sequential Set with Claim Codes
 *  - Allows Distribution of the External NFTs via Mint or Transfer by Taggr's NftDistributor (provides the required "distributeToken" function)
 */
contract TaggrNftRelay is Ownable, BlackholePrevention, ITaggrNftRelay, IERC721Receiver {
  event Initialized(address owner, address nftDistributor, address nftHolder);
  event ForcedDistribution(address owner, address to, uint256 tokenId);
  event TokensMapped(uint256 amount);
  event StateUpdated(bool isEnabled);

  bool internal _enabled;
  string internal _deployedProjectName;
  address internal _tokenDistributor;
  address internal _nftContractAddress;
  address internal _nftHolderAddress;

  // Internal Token ID => External Token ID
  mapping (uint256 => uint256) internal tokenIdToNftTokenId;

  // External Token ID => Internal Token ID
  mapping (uint256 => uint256) internal nftTokenIdToTokenId;

  // Internal Token ID => Is Distributed
  mapping (uint256 => bool) internal _nftTokenDistributed;


  /***********************************|
  |          Public Functions         |
  |__________________________________*/

  function balanceOf(address owner) external view returns (uint256 balance) {
    balance = IERC721(_nftContractAddress).balanceOf(owner);
  }

  function ownerOf(uint256 tokenId) external view returns (address owner) {
    uint256 nftTokenId = tokenIdToNftTokenId[tokenId];
    owner = IERC721(_nftContractAddress).ownerOf(nftTokenId);
  }

  function getProjectName() external view returns (string memory projectName) {
    projectName = _deployedProjectName;
  }

  function getTokenById(uint256 tokenId) external view returns (uint256 nftTokenId, bool isDistributed) {
    nftTokenId = tokenIdToNftTokenId[tokenId];
    isDistributed = _nftTokenDistributed[tokenId];
  }

  function getTokenByNftId(uint256 nftTokenId) external view returns (uint256 tokenId, bool isDistributed) {
    tokenId = nftTokenIdToTokenId[nftTokenId];
    isDistributed = _nftTokenDistributed[tokenId];
  }

  function distributeToken(address to, uint256 tokenId) external override {
    require(_enabled, "not enabled");
    require(msg.sender == _tokenDistributor, "must be distributor");
    _distributeToken(to, tokenId);
  }

  function onERC721Received(address, address, uint256, bytes calldata) external pure override returns (bytes4) {
    return IERC721Receiver.onERC721Received.selector;
  }

  /***********************************|
  |            Only Owner             |
  |__________________________________*/

  function initialize(
    string memory _projectName,
    address _owner,
    address _nftDistributor,
    address _nftContract,
    address _nftHolder
  )
    external
    onlyOwner
  {
    _deployedProjectName = _projectName;
    _tokenDistributor = _nftDistributor;
    _nftContractAddress = _nftContract;
    _nftHolderAddress = _nftHolder;
    if (_nftHolderAddress == address(0)) {
      _nftHolderAddress = address(this);
    }

    _transferOwnership(_owner);

    emit Initialized(_owner, _nftDistributor, _nftHolder);
  }

  function mapTokens(uint256[] calldata _tokenIds, uint256[] calldata _nftTokenIds) external onlyOwner {
    require(_tokenIds.length == _nftTokenIds.length, "array length mismatch");
    uint256 len = _tokenIds.length;
    uint i = 0;
    for (; i < len; i++) {
      tokenIdToNftTokenId[_tokenIds[i]] = _nftTokenIds[i];
      nftTokenIdToTokenId[_nftTokenIds[i]] = _tokenIds[i];
    }
    emit TokensMapped(i);
  }

  function enable() external onlyOwner {
    if (_nftHolderAddress != address(this)) {
      require(IERC721(_nftContractAddress).isApprovedForAll(_nftHolderAddress, address(this)), "approval not set");
    } else {
      require(IERC721(_nftContractAddress).balanceOf(_nftHolderAddress) > 0, "no NFT balance");
    }
    _enabled = true;
    emit StateUpdated(_enabled);
  }

  function disable() external onlyOwner {
    _enabled = false;
    emit StateUpdated(_enabled);
  }

  function setProjectName(string memory name) external onlyOwner {
    _deployedProjectName = name;
  }

  function setTokenDistributor(address distributor) external onlyOwner {
    _tokenDistributor = distributor;
  }

  function setNftHolder(address nftHolder) external onlyOwner {
    _nftHolderAddress = nftHolder;
  }

  function forceDistributeToken(address to, uint256 tokenId) external onlyOwner {
    _distributeToken(to, tokenId);
    emit ForcedDistribution(owner(), to, tokenId);
  }

  /***********************************|
  |            Only Owner             |
  |      (blackhole prevention)       |
  |__________________________________*/

  function withdrawEther(address payable receiver, uint256 amount) external onlyOwner {
    _withdrawEther(receiver, amount);
  }

  function withdrawErc20(address payable receiver, address tokenAddress, uint256 amount) external onlyOwner {
    _withdrawERC20(receiver, tokenAddress, amount);
  }

  function withdrawERC721(address payable receiver, address tokenAddress, uint256 tokenId) external onlyOwner {
    _withdrawERC721(receiver, tokenAddress, tokenId);
  }

  /***********************************|
  |         Private/Internal          |
  |__________________________________*/

  function _distributeToken(address to, uint256 tokenId) internal {
    // Validate Internal Token ID
    require(tokenId > 0, "invalid token id");
    require(!_nftTokenDistributed[tokenId], "token already distributed");

    // Validate External Token ID
    uint256 nftTokenId = tokenIdToNftTokenId[tokenId];
    require(nftTokenId > 0, "invalid token map");

    // Distribute Mapped Token
    _nftTokenDistributed[tokenId] = true;
    IERC721(_nftContractAddress).safeTransferFrom(_nftHolderAddress, to, nftTokenId);
  }
}

File 2 of 15 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.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 Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _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);
    }
}

File 3 of 15 : 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 4 of 15 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 5 of 15 : ITaggrNftRelay.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.0;

interface ITaggrNftRelay {
  function distributeToken(address to, uint256 tokenId) external;
}

File 6 of 15 : BlackholePrevention.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol";

/**
 * @notice Prevents ETH or Tokens from getting stuck in a contract by allowing
 *  the Owner/DAO to pull them out on behalf of a user
 * This is only meant to contracts that are not expected to hold tokens, but do handle transferring them.
 */
contract BlackholePrevention {
  using AddressUpgradeable for address payable;
  using SafeERC20Upgradeable for IERC20Upgradeable;

  event WithdrawStuckEther(address indexed receiver, uint256 amount);
  event WithdrawStuckERC20(address indexed receiver, address indexed tokenAddress, uint256 amount);
  event WithdrawStuckERC721(address indexed receiver, address indexed tokenAddress, uint256 indexed tokenId);
  event WithdrawStuckERC1155(address indexed receiver, address indexed tokenAddress, uint256 indexed tokenId, uint256 amount);

  function _withdrawEther(address payable receiver, uint256 amount) internal virtual {
    require(receiver != address(0x0), "BHP:E-103");
    if (address(this).balance >= amount) {
      receiver.sendValue(amount);
      emit WithdrawStuckEther(receiver, amount);
    }
  }

  function _withdrawERC20(address payable receiver, address tokenAddress, uint256 amount) internal virtual {
    require(receiver != address(0x0), "BHP:E-103");
    if (IERC20Upgradeable(tokenAddress).balanceOf(address(this)) >= amount) {
      IERC20Upgradeable(tokenAddress).safeTransfer(receiver, amount);
      emit WithdrawStuckERC20(receiver, tokenAddress, amount);
    }
  }

  function _withdrawERC721(address payable receiver, address tokenAddress, uint256 tokenId) internal virtual {
    require(receiver != address(0x0), "BHP:E-103");
    if (IERC721Upgradeable(tokenAddress).ownerOf(tokenId) == address(this)) {
      IERC721Upgradeable(tokenAddress).transferFrom(address(this), receiver, tokenId);
      emit WithdrawStuckERC721(receiver, tokenAddress, tokenId);
    }
  }

  function _withdrawERC1155(address payable receiver, address tokenAddress, uint256 tokenId, uint256 amount) internal virtual {
    require(receiver != address(0x0), "BHP:E-103");
    if (IERC1155Upgradeable(tokenAddress).balanceOf(address(this), tokenId) >= amount) {
      IERC1155Upgradeable(tokenAddress).safeTransferFrom(address(this), receiver, tokenId, amount, "");
      emit WithdrawStuckERC1155(receiver, tokenAddress, tokenId, amount);
    }
  }
}

File 7 of 15 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @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 Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

File 8 of 15 : 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);
}

File 9 of 15 : 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 10 of 15 : IERC20Upgradeable.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 IERC20Upgradeable {
    /**
     * @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 11 of 15 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../extensions/draft-IERC20PermitUpgradeable.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));
        }
    }

    function safePermit(
        IERC20PermitUpgradeable token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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 12 of 15 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * 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 13 of 15 : IERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165Upgradeable.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 IERC1155Upgradeable is IERC165Upgradeable {
    /**
     * @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 14 of 15 : draft-IERC20PermitUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20PermitUpgradeable {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 15 of 15 : IERC165Upgradeable.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 IERC165Upgradeable {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ForcedDistribution","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"nftDistributor","type":"address"},{"indexed":false,"internalType":"address","name":"nftHolder","type":"address"}],"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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"StateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensMapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawStuckERC1155","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawStuckERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"WithdrawStuckERC721","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawStuckEther","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"distributeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"forceDistributeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getProjectName","outputs":[{"internalType":"string","name":"projectName","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenById","outputs":[{"internalType":"uint256","name":"nftTokenId","type":"uint256"},{"internalType":"bool","name":"isDistributed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftTokenId","type":"uint256"}],"name":"getTokenByNftId","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"isDistributed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_projectName","type":"string"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_nftDistributor","type":"address"},{"internalType":"address","name":"_nftContract","type":"address"},{"internalType":"address","name":"_nftHolder","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_nftTokenIds","type":"uint256[]"}],"name":"mapTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nftHolder","type":"address"}],"name":"setNftHolder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"setProjectName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"distributor","type":"address"}],"name":"setTokenDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawErc20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611a3a8061007e6000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c8063522f6815116100b85780638da5cb5b1161007c5780638da5cb5b146102c95780639faf6215146102da578063a3907d71146102ef578063ae008e7d146102f7578063b178ce601461032d578063f2fde38b1461034057600080fd5b8063522f68151461021a5780636352211e1461022d57806370a0823114610258578063715018a6146102795780637bdc60d91461028157600080fd5b80632f2770db116100ff5780632f2770db146101c657806338280e6b146101ce5780634025feb2146101e157806348b6b16f146101f45780634aa8e7251461020757600080fd5b8062bff3e41461013b5780630b885ac314610150578063150b7a02146101635780631593dee1146101a05780632ca9cbe8146101b3575b600080fd5b61014e61014936600461169c565b610353565b005b61014e61015e36600461181d565b6103c5565b6101826101713660046116c7565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020015b60405180910390f35b61014e6101ae36600461165c565b61048e565b61014e6101c136600461169c565b6104a6565b61014e610550565b61014e6101dc366004611624565b6105af565b61014e6101ef36600461165c565b6105d9565b61014e6102023660046117ea565b6105ec565b61014e610215366004611624565b610607565b61014e61022836600461169c565b610631565b61024061023b3660046118a5565b610643565b6040516001600160a01b039091168152602001610197565b61026b610266366004611624565b6106d5565b604051908152602001610197565b61014e610759565b6102b461028f3660046118a5565b600090815260056020908152604080832054600790925290912054909160ff90911690565b60408051928352901515602083015201610197565b6000546001600160a01b0316610240565b6102e261076d565b60405161019791906118f1565b61014e6107ff565b6102b46103053660046118a5565b600090815260066020908152604080832054808452600790925290912054909160ff90911690565b61014e61033b366004611761565b6109f7565b61014e61034e366004611624565b610b68565b61035b610be1565b6103658282610c3b565b7fd6bfe8cef24add71648a814eae18b5183f99c583749530c3d9ac4105fa1c149d6103986000546001600160a01b031690565b604080516001600160a01b0392831681529185166020830152810183905260600160405180910390a15050565b6103cd610be1565b84516103e09060019060208801906114ba565b50600280546001600160a01b038086166001600160a01b0319928316179092556003805485841690831617905560048054928416929091168217905561043357600480546001600160a01b031916301790555b61043c84610dbf565b604080516001600160a01b038681168252858116602083015283168183015290517fad307780531f6353137c35adc50ad58d71b76e76aa891e729387f2e720f2de209181900360600190a15050505050565b610496610be1565b6104a1838383610e0f565b505050565b600054600160a01b900460ff166104f25760405162461bcd60e51b815260206004820152600b60248201526a1b9bdd08195b98589b195960aa1b60448201526064015b60405180910390fd5b6002546001600160a01b031633146105425760405162461bcd60e51b815260206004820152601360248201527236bab9ba103132903234b9ba3934b13aba37b960691b60448201526064016104e9565b61054c8282610c3b565b5050565b610558610be1565b6000805460ff60a01b1916908190556040517ff68abf2856351c34b7411fb655395a774171d6db77a50753df30a69f17b7a217916105a591600160a01b90910460ff161515815260200190565b60405180910390a1565b6105b7610be1565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6105e1610be1565b6104a1838383610f19565b6105f4610be1565b805161054c9060019060208401906114ba565b61060f610be1565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b610639610be1565b61054c8282611076565b6000818152600560205260408082205460035491516331a9108f60e11b81526004810182905290916001600160a01b031690636352211e9060240160206040518083038186803b15801561069657600080fd5b505afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190611640565b9392505050565b6003546040516370a0823160e01b81526001600160a01b03838116600483015260009216906370a082319060240160206040518083038186803b15801561071b57600080fd5b505afa15801561072f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075391906118bd565b92915050565b610761610be1565b61076b6000610dbf565b565b60606001805461077c90611977565b80601f01602080910402602001604051908101604052809291908181526020018280546107a890611977565b80156107f55780601f106107ca576101008083540402835291602001916107f5565b820191906000526020600020905b8154815290600101906020018083116107d857829003601f168201915b5050505050905090565b610807610be1565b6004546001600160a01b031630146108e6576003546004805460405163e985e9c560e01b81526001600160a01b03918216928101929092523060248301529091169063e985e9c59060440160206040518083038186803b15801561086a57600080fd5b505afa15801561087e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a291906117ca565b6108e15760405162461bcd60e51b815260206004820152601060248201526f185c1c1c9bdd985b081b9bdd081cd95d60821b60448201526064016104e9565b6109a8565b600354600480546040516370a0823160e01b81526001600160a01b039182169281019290925260009216906370a082319060240160206040518083038186803b15801561093257600080fd5b505afa158015610946573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096a91906118bd565b116109a85760405162461bcd60e51b815260206004820152600e60248201526d6e6f204e46542062616c616e636560901b60448201526064016104e9565b6000805460ff60a01b1916600160a01b908117918290556040517ff68abf2856351c34b7411fb655395a774171d6db77a50753df30a69f17b7a217926105a592900460ff161515815260200190565b6109ff610be1565b828114610a465760405162461bcd60e51b81526020600482015260156024820152740c2e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b60448201526064016104e9565b8260005b81811015610b2d57838382818110610a7257634e487b7160e01b600052603260045260246000fd5b9050602002013560056000888885818110610a9d57634e487b7160e01b600052603260045260246000fd5b90506020020135815260200190815260200160002081905550858582818110610ad657634e487b7160e01b600052603260045260246000fd5b9050602002013560066000868685818110610b0157634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020819055508080610b25906119b2565b915050610a4a565b6040518181527f6461def4821daa88121d9bfcd84b2a191e9d0dc1decd99a834046fbc4bf71eed9060200160405180910390a1505050505050565b610b70610be1565b6001600160a01b038116610bd55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104e9565b610bde81610dbf565b50565b6000546001600160a01b0316331461076b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e9565b60008111610c7e5760405162461bcd60e51b815260206004820152601060248201526f1a5b9d985b1a59081d1bdad95b881a5960821b60448201526064016104e9565b60008181526007602052604090205460ff1615610cdd5760405162461bcd60e51b815260206004820152601960248201527f746f6b656e20616c72656164792064697374726962757465640000000000000060448201526064016104e9565b60008181526005602052604090205480610d2d5760405162461bcd60e51b81526020600482015260116024820152700696e76616c696420746f6b656e206d617607c1b60448201526064016104e9565b60008281526007602052604090819020805460ff19166001179055600354600480549251632142170760e11b81526001600160a01b03938416918101919091528583166024820152604481018490529116906342842e0e90606401600060405180830381600087803b158015610da257600080fd5b505af1158015610db6573d6000803e3d6000fd5b50505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038316610e355760405162461bcd60e51b81526004016104e990611924565b6040516370a0823160e01b815230600482015281906001600160a01b038416906370a082319060240160206040518083038186803b158015610e7657600080fd5b505afa158015610e8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eae91906118bd565b106104a157610ec76001600160a01b03831684836110fc565b816001600160a01b0316836001600160a01b03167f6c9d637297625e945b296ff73a71fcfbd0a9e062652b6491a921c4c60194176b83604051610f0c91815260200190565b60405180910390a3505050565b6001600160a01b038316610f3f5760405162461bcd60e51b81526004016104e990611924565b6040516331a9108f60e11b81526004810182905230906001600160a01b03841690636352211e9060240160206040518083038186803b158015610f8157600080fd5b505afa158015610f95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb99190611640565b6001600160a01b031614156104a1576040516323b872dd60e01b81523060048201526001600160a01b038481166024830152604482018390528316906323b872dd90606401600060405180830381600087803b15801561101857600080fd5b505af115801561102c573d6000803e3d6000fd5b5050505080826001600160a01b0316846001600160a01b03167ffefe036cac4ee3a4aca074a81cbcc4376e1484693289078dbec149c890101d5b60405160405180910390a4505050565b6001600160a01b03821661109c5760405162461bcd60e51b81526004016104e990611924565b80471061054c576110b66001600160a01b0383168261114e565b816001600160a01b03167eddb683bb45cd5d0ad8a200c6fae7152b1c236ee90a4a37db692407f5cc38bd826040516110f091815260200190565b60405180910390a25050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526104a1908490611267565b8047101561119e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016104e9565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146111eb576040519150601f19603f3d011682016040523d82523d6000602084013e6111f0565b606091505b50509050806104a15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016104e9565b60006112bc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113399092919063ffffffff16565b8051909150156104a157808060200190518101906112da91906117ca565b6104a15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104e9565b60606113488484600085611350565b949350505050565b6060824710156113b15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104e9565b6001600160a01b0385163b6114085760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104e9565b600080866001600160a01b0316858760405161142491906118d5565b60006040518083038185875af1925050503d8060008114611461576040519150601f19603f3d011682016040523d82523d6000602084013e611466565b606091505b5091509150611476828286611481565b979650505050505050565b606083156114905750816106ce565b8251156114a05782518084602001fd5b8160405162461bcd60e51b81526004016104e991906118f1565b8280546114c690611977565b90600052602060002090601f0160209004810192826114e8576000855561152e565b82601f1061150157805160ff191683800117855561152e565b8280016001018555821561152e579182015b8281111561152e578251825591602001919060010190611513565b5061153a92915061153e565b5090565b5b8082111561153a576000815560010161153f565b60008083601f840112611564578182fd5b50813567ffffffffffffffff81111561157b578182fd5b6020830191508360208260051b850101111561159657600080fd5b9250929050565b600082601f8301126115ad578081fd5b813567ffffffffffffffff808211156115c8576115c86119d9565b604051601f8301601f19908116603f011681019082821181831017156115f0576115f06119d9565b81604052838152866020858801011115611608578485fd5b8360208701602083013792830160200193909352509392505050565b600060208284031215611635578081fd5b81356106ce816119ef565b600060208284031215611651578081fd5b81516106ce816119ef565b600080600060608486031215611670578182fd5b833561167b816119ef565b9250602084013561168b816119ef565b929592945050506040919091013590565b600080604083850312156116ae578182fd5b82356116b9816119ef565b946020939093013593505050565b6000806000806000608086880312156116de578081fd5b85356116e9816119ef565b945060208601356116f9816119ef565b935060408601359250606086013567ffffffffffffffff8082111561171c578283fd5b818801915088601f83011261172f578283fd5b81358181111561173d578384fd5b89602082850101111561174e578384fd5b9699959850939650602001949392505050565b60008060008060408587031215611776578384fd5b843567ffffffffffffffff8082111561178d578586fd5b61179988838901611553565b909650945060208701359150808211156117b1578384fd5b506117be87828801611553565b95989497509550505050565b6000602082840312156117db578081fd5b815180151581146106ce578182fd5b6000602082840312156117fb578081fd5b813567ffffffffffffffff811115611811578182fd5b6113488482850161159d565b600080600080600060a08688031215611834578081fd5b853567ffffffffffffffff81111561184a578182fd5b6118568882890161159d565b9550506020860135611867816119ef565b93506040860135611877816119ef565b92506060860135611887816119ef565b91506080860135611897816119ef565b809150509295509295909350565b6000602082840312156118b6578081fd5b5035919050565b6000602082840312156118ce578081fd5b5051919050565b600082516118e7818460208701611947565b9190910192915050565b6020815260008251806020840152611910816040850160208701611947565b601f01601f19169190910160400192915050565b6020808252600990820152684248503a452d31303360b81b604082015260600190565b60005b8381101561196257818101518382015260200161194a565b83811115611971576000848401525b50505050565b600181811c9082168061198b57607f821691505b602082108114156119ac57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156119d257634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610bde57600080fdfea26469706673582212200053e02eec4da231b7ff4cf8d3402cd01ac5906dae553dcd4c47f2ff0ad8c81064736f6c63430008040033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101365760003560e01c8063522f6815116100b85780638da5cb5b1161007c5780638da5cb5b146102c95780639faf6215146102da578063a3907d71146102ef578063ae008e7d146102f7578063b178ce601461032d578063f2fde38b1461034057600080fd5b8063522f68151461021a5780636352211e1461022d57806370a0823114610258578063715018a6146102795780637bdc60d91461028157600080fd5b80632f2770db116100ff5780632f2770db146101c657806338280e6b146101ce5780634025feb2146101e157806348b6b16f146101f45780634aa8e7251461020757600080fd5b8062bff3e41461013b5780630b885ac314610150578063150b7a02146101635780631593dee1146101a05780632ca9cbe8146101b3575b600080fd5b61014e61014936600461169c565b610353565b005b61014e61015e36600461181d565b6103c5565b6101826101713660046116c7565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020015b60405180910390f35b61014e6101ae36600461165c565b61048e565b61014e6101c136600461169c565b6104a6565b61014e610550565b61014e6101dc366004611624565b6105af565b61014e6101ef36600461165c565b6105d9565b61014e6102023660046117ea565b6105ec565b61014e610215366004611624565b610607565b61014e61022836600461169c565b610631565b61024061023b3660046118a5565b610643565b6040516001600160a01b039091168152602001610197565b61026b610266366004611624565b6106d5565b604051908152602001610197565b61014e610759565b6102b461028f3660046118a5565b600090815260056020908152604080832054600790925290912054909160ff90911690565b60408051928352901515602083015201610197565b6000546001600160a01b0316610240565b6102e261076d565b60405161019791906118f1565b61014e6107ff565b6102b46103053660046118a5565b600090815260066020908152604080832054808452600790925290912054909160ff90911690565b61014e61033b366004611761565b6109f7565b61014e61034e366004611624565b610b68565b61035b610be1565b6103658282610c3b565b7fd6bfe8cef24add71648a814eae18b5183f99c583749530c3d9ac4105fa1c149d6103986000546001600160a01b031690565b604080516001600160a01b0392831681529185166020830152810183905260600160405180910390a15050565b6103cd610be1565b84516103e09060019060208801906114ba565b50600280546001600160a01b038086166001600160a01b0319928316179092556003805485841690831617905560048054928416929091168217905561043357600480546001600160a01b031916301790555b61043c84610dbf565b604080516001600160a01b038681168252858116602083015283168183015290517fad307780531f6353137c35adc50ad58d71b76e76aa891e729387f2e720f2de209181900360600190a15050505050565b610496610be1565b6104a1838383610e0f565b505050565b600054600160a01b900460ff166104f25760405162461bcd60e51b815260206004820152600b60248201526a1b9bdd08195b98589b195960aa1b60448201526064015b60405180910390fd5b6002546001600160a01b031633146105425760405162461bcd60e51b815260206004820152601360248201527236bab9ba103132903234b9ba3934b13aba37b960691b60448201526064016104e9565b61054c8282610c3b565b5050565b610558610be1565b6000805460ff60a01b1916908190556040517ff68abf2856351c34b7411fb655395a774171d6db77a50753df30a69f17b7a217916105a591600160a01b90910460ff161515815260200190565b60405180910390a1565b6105b7610be1565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6105e1610be1565b6104a1838383610f19565b6105f4610be1565b805161054c9060019060208401906114ba565b61060f610be1565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b610639610be1565b61054c8282611076565b6000818152600560205260408082205460035491516331a9108f60e11b81526004810182905290916001600160a01b031690636352211e9060240160206040518083038186803b15801561069657600080fd5b505afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190611640565b9392505050565b6003546040516370a0823160e01b81526001600160a01b03838116600483015260009216906370a082319060240160206040518083038186803b15801561071b57600080fd5b505afa15801561072f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075391906118bd565b92915050565b610761610be1565b61076b6000610dbf565b565b60606001805461077c90611977565b80601f01602080910402602001604051908101604052809291908181526020018280546107a890611977565b80156107f55780601f106107ca576101008083540402835291602001916107f5565b820191906000526020600020905b8154815290600101906020018083116107d857829003601f168201915b5050505050905090565b610807610be1565b6004546001600160a01b031630146108e6576003546004805460405163e985e9c560e01b81526001600160a01b03918216928101929092523060248301529091169063e985e9c59060440160206040518083038186803b15801561086a57600080fd5b505afa15801561087e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a291906117ca565b6108e15760405162461bcd60e51b815260206004820152601060248201526f185c1c1c9bdd985b081b9bdd081cd95d60821b60448201526064016104e9565b6109a8565b600354600480546040516370a0823160e01b81526001600160a01b039182169281019290925260009216906370a082319060240160206040518083038186803b15801561093257600080fd5b505afa158015610946573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096a91906118bd565b116109a85760405162461bcd60e51b815260206004820152600e60248201526d6e6f204e46542062616c616e636560901b60448201526064016104e9565b6000805460ff60a01b1916600160a01b908117918290556040517ff68abf2856351c34b7411fb655395a774171d6db77a50753df30a69f17b7a217926105a592900460ff161515815260200190565b6109ff610be1565b828114610a465760405162461bcd60e51b81526020600482015260156024820152740c2e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b60448201526064016104e9565b8260005b81811015610b2d57838382818110610a7257634e487b7160e01b600052603260045260246000fd5b9050602002013560056000888885818110610a9d57634e487b7160e01b600052603260045260246000fd5b90506020020135815260200190815260200160002081905550858582818110610ad657634e487b7160e01b600052603260045260246000fd5b9050602002013560066000868685818110610b0157634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020819055508080610b25906119b2565b915050610a4a565b6040518181527f6461def4821daa88121d9bfcd84b2a191e9d0dc1decd99a834046fbc4bf71eed9060200160405180910390a1505050505050565b610b70610be1565b6001600160a01b038116610bd55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104e9565b610bde81610dbf565b50565b6000546001600160a01b0316331461076b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e9565b60008111610c7e5760405162461bcd60e51b815260206004820152601060248201526f1a5b9d985b1a59081d1bdad95b881a5960821b60448201526064016104e9565b60008181526007602052604090205460ff1615610cdd5760405162461bcd60e51b815260206004820152601960248201527f746f6b656e20616c72656164792064697374726962757465640000000000000060448201526064016104e9565b60008181526005602052604090205480610d2d5760405162461bcd60e51b81526020600482015260116024820152700696e76616c696420746f6b656e206d617607c1b60448201526064016104e9565b60008281526007602052604090819020805460ff19166001179055600354600480549251632142170760e11b81526001600160a01b03938416918101919091528583166024820152604481018490529116906342842e0e90606401600060405180830381600087803b158015610da257600080fd5b505af1158015610db6573d6000803e3d6000fd5b50505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038316610e355760405162461bcd60e51b81526004016104e990611924565b6040516370a0823160e01b815230600482015281906001600160a01b038416906370a082319060240160206040518083038186803b158015610e7657600080fd5b505afa158015610e8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eae91906118bd565b106104a157610ec76001600160a01b03831684836110fc565b816001600160a01b0316836001600160a01b03167f6c9d637297625e945b296ff73a71fcfbd0a9e062652b6491a921c4c60194176b83604051610f0c91815260200190565b60405180910390a3505050565b6001600160a01b038316610f3f5760405162461bcd60e51b81526004016104e990611924565b6040516331a9108f60e11b81526004810182905230906001600160a01b03841690636352211e9060240160206040518083038186803b158015610f8157600080fd5b505afa158015610f95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb99190611640565b6001600160a01b031614156104a1576040516323b872dd60e01b81523060048201526001600160a01b038481166024830152604482018390528316906323b872dd90606401600060405180830381600087803b15801561101857600080fd5b505af115801561102c573d6000803e3d6000fd5b5050505080826001600160a01b0316846001600160a01b03167ffefe036cac4ee3a4aca074a81cbcc4376e1484693289078dbec149c890101d5b60405160405180910390a4505050565b6001600160a01b03821661109c5760405162461bcd60e51b81526004016104e990611924565b80471061054c576110b66001600160a01b0383168261114e565b816001600160a01b03167eddb683bb45cd5d0ad8a200c6fae7152b1c236ee90a4a37db692407f5cc38bd826040516110f091815260200190565b60405180910390a25050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526104a1908490611267565b8047101561119e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016104e9565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146111eb576040519150601f19603f3d011682016040523d82523d6000602084013e6111f0565b606091505b50509050806104a15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016104e9565b60006112bc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113399092919063ffffffff16565b8051909150156104a157808060200190518101906112da91906117ca565b6104a15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104e9565b60606113488484600085611350565b949350505050565b6060824710156113b15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104e9565b6001600160a01b0385163b6114085760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104e9565b600080866001600160a01b0316858760405161142491906118d5565b60006040518083038185875af1925050503d8060008114611461576040519150601f19603f3d011682016040523d82523d6000602084013e611466565b606091505b5091509150611476828286611481565b979650505050505050565b606083156114905750816106ce565b8251156114a05782518084602001fd5b8160405162461bcd60e51b81526004016104e991906118f1565b8280546114c690611977565b90600052602060002090601f0160209004810192826114e8576000855561152e565b82601f1061150157805160ff191683800117855561152e565b8280016001018555821561152e579182015b8281111561152e578251825591602001919060010190611513565b5061153a92915061153e565b5090565b5b8082111561153a576000815560010161153f565b60008083601f840112611564578182fd5b50813567ffffffffffffffff81111561157b578182fd5b6020830191508360208260051b850101111561159657600080fd5b9250929050565b600082601f8301126115ad578081fd5b813567ffffffffffffffff808211156115c8576115c86119d9565b604051601f8301601f19908116603f011681019082821181831017156115f0576115f06119d9565b81604052838152866020858801011115611608578485fd5b8360208701602083013792830160200193909352509392505050565b600060208284031215611635578081fd5b81356106ce816119ef565b600060208284031215611651578081fd5b81516106ce816119ef565b600080600060608486031215611670578182fd5b833561167b816119ef565b9250602084013561168b816119ef565b929592945050506040919091013590565b600080604083850312156116ae578182fd5b82356116b9816119ef565b946020939093013593505050565b6000806000806000608086880312156116de578081fd5b85356116e9816119ef565b945060208601356116f9816119ef565b935060408601359250606086013567ffffffffffffffff8082111561171c578283fd5b818801915088601f83011261172f578283fd5b81358181111561173d578384fd5b89602082850101111561174e578384fd5b9699959850939650602001949392505050565b60008060008060408587031215611776578384fd5b843567ffffffffffffffff8082111561178d578586fd5b61179988838901611553565b909650945060208701359150808211156117b1578384fd5b506117be87828801611553565b95989497509550505050565b6000602082840312156117db578081fd5b815180151581146106ce578182fd5b6000602082840312156117fb578081fd5b813567ffffffffffffffff811115611811578182fd5b6113488482850161159d565b600080600080600060a08688031215611834578081fd5b853567ffffffffffffffff81111561184a578182fd5b6118568882890161159d565b9550506020860135611867816119ef565b93506040860135611877816119ef565b92506060860135611887816119ef565b91506080860135611897816119ef565b809150509295509295909350565b6000602082840312156118b6578081fd5b5035919050565b6000602082840312156118ce578081fd5b5051919050565b600082516118e7818460208701611947565b9190910192915050565b6020815260008251806020840152611910816040850160208701611947565b601f01601f19169190910160400192915050565b6020808252600990820152684248503a452d31303360b81b604082015260600190565b60005b8381101561196257818101518382015260200161194a565b83811115611971576000848401525b50505050565b600181811c9082168061198b57607f821691505b602082108114156119ac57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156119d257634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610bde57600080fdfea26469706673582212200053e02eec4da231b7ff4cf8d3402cd01ac5906dae553dcd4c47f2ff0ad8c81064736f6c63430008040033

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
[ 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.