ETH Price: $2,507.08 (-0.34%)
Gas: 1.77 Gwei

Contract

0xf2DDf4151ca1719418454150a19Cd86a6faD7705
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Update MOPN Cont...187418022023-12-08 13:21:23269 days ago1702041683IN
0xf2DDf415...a6faD7705
0 ETH0.0018916642.01736073
Update ERC6551Co...187417792023-12-08 13:16:47269 days ago1702041407IN
0xf2DDf415...a6faD7705
0 ETH0.003992443.74133786
Update MOPN Cont...187417782023-12-08 13:16:35269 days ago1702041395IN
0xf2DDf415...a6faD7705
0 ETH0.0088836443.50017487
0x60806040187417222023-12-08 13:05:23269 days ago1702040723IN
 Create: MOPNGovernance
0 ETH0.0500333445

Latest 15 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
187754242023-12-13 6:19:47265 days ago1702448387
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
187753762023-12-13 6:09:59265 days ago1702447799
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
187697682023-12-12 11:20:35266 days ago1702380035
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
187696562023-12-12 10:57:47266 days ago1702378667
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
187679932023-12-12 5:22:35266 days ago1702358555
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
187679912023-12-12 5:22:11266 days ago1702358531
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
187679882023-12-12 5:21:35266 days ago1702358495
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
187679822023-12-12 5:20:23266 days ago1702358423
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
187679792023-12-12 5:19:47266 days ago1702358387
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
187679772023-12-12 5:19:23266 days ago1702358363
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
187679712023-12-12 5:18:11266 days ago1702358291
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
187679662023-12-12 5:16:59266 days ago1702358219
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
187679632023-12-12 5:16:23266 days ago1702358183
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
187679582023-12-12 5:15:23266 days ago1702358123
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
187679552023-12-12 5:14:47266 days ago1702358087
0xf2DDf415...a6faD7705
 Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MOPNGovernance

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
File 1 of 17 : MOPNGovernance.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import "./interfaces/IMOPN.sol";
import "./interfaces/IMOPNToken.sol";
import "./interfaces/IMOPNBomb.sol";
import "./libraries/CollectionVaultBytecodeLib.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Multicall.sol";
import "@openzeppelin/contracts/utils/Create2.sol";

/*
.___  ___.   ______   .______   .__   __. 
|   \/   |  /  __  \  |   _  \  |  \ |  | 
|  \  /  | |  |  |  | |  |_)  | |   \|  | 
|  |\/|  | |  |  |  | |   ___/  |  . `  | 
|  |  |  | |  `--'  | |  |      |  |\   | 
|__|  |__|  \______/  | _|      |__| \__| 
*/
contract MOPNGovernance is Multicall, Ownable {
    event CollectionVaultCreated(
        address indexed collectionAddress,
        address indexed collectionVault
    );

    uint256 public vaultIndex;

    /// uint160 vaultAdderss + uint96 vaultIndex
    mapping(address => uint256) public CollectionVaults;

    address public mopnContract;
    address public bombContract;
    address public tokenContract;
    address public pointContract;
    address public landContract;
    address public dataContract;
    address public collectionVaultContract;
    address public auctionHouseContract;

    address public ERC6551Registry;
    address public ERC6551AccountProxy;
    address public ERC6551AccountHelper;

    modifier onlyMOPN() {
        require(msg.sender == mopnContract, "not allowed");
        _;
    }

    modifier onlyCollectionVault(address collectionAddress) {
        require(
            msg.sender == getCollectionVault(collectionAddress),
            "only collection vault allowed"
        );
        _;
    }

    function updateERC6551Contract(
        address ERC6551Registry_,
        address ERC6551AccountProxy_,
        address ERC6551AccountHelper_
    ) public onlyOwner {
        ERC6551Registry = ERC6551Registry_;
        ERC6551AccountProxy = ERC6551AccountProxy_;
        ERC6551AccountHelper = ERC6551AccountHelper_;
    }

    function updateMOPNContracts(
        address auctionHouseContract_,
        address mopnContract_,
        address bombContract_,
        address tokenContract_,
        address pointContract_,
        address landContract_,
        address dataContract_,
        address collectionVaultContract_
    ) public onlyOwner {
        auctionHouseContract = auctionHouseContract_;
        mopnContract = mopnContract_;
        bombContract = bombContract_;
        tokenContract = tokenContract_;
        pointContract = pointContract_;
        landContract = landContract_;
        dataContract = dataContract_;
        collectionVaultContract = collectionVaultContract_;
    }

    function createCollectionVault(
        address collectionAddress
    ) public returns (address) {
        require(
            CollectionVaults[collectionAddress] == 0,
            "collection vault exist"
        );

        address vaultAddress = _createCollectionVault(collectionAddress);
        CollectionVaults[collectionAddress] =
            (uint256(uint160(vaultAddress)) << 96) |
            vaultIndex;
        emit CollectionVaultCreated(collectionAddress, vaultAddress);
        vaultIndex++;
        return vaultAddress;
    }

    function _createCollectionVault(
        address collectionAddress
    ) internal returns (address) {
        bytes memory code = CollectionVaultBytecodeLib.getCreationCode(
            collectionVaultContract,
            collectionAddress,
            0
        );

        address _account = Create2.computeAddress(bytes32(0), keccak256(code));

        if (_account.code.length != 0) return _account;

        _account = Create2.deploy(0, bytes32(0), code);
        return _account;
    }

    function getCollectionVault(
        address collectionAddress
    ) public view returns (address) {
        return address(uint160(CollectionVaults[collectionAddress] >> 96));
    }

    function getCollectionVaultIndex(
        address collectionAddress
    ) public view returns (uint256) {
        return uint96(CollectionVaults[collectionAddress]);
    }

    function computeCollectionVault(
        address collectionAddress
    ) public view returns (address) {
        bytes memory code = CollectionVaultBytecodeLib.getCreationCode(
            collectionVaultContract,
            collectionAddress,
            0
        );

        return Create2.computeAddress(bytes32(0), keccak256(code));
    }
}

File 2 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 17 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)

pragma solidity ^0.8.0;

import "../token/ERC1155/IERC1155.sol";

File 4 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

File 5 of 17 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol)

pragma solidity ^0.8.0;

import "../token/ERC721/IERC721.sol";

File 6 of 17 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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 7 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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 8 of 17 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 9 of 17 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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 17 : 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 11 of 17 : Create2.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Create2.sol)

pragma solidity ^0.8.0;

/**
 * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.
 * `CREATE2` can be used to compute in advance the address where a smart
 * contract will be deployed, which allows for interesting new mechanisms known
 * as 'counterfactual interactions'.
 *
 * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more
 * information.
 */
library Create2 {
    /**
     * @dev Deploys a contract using `CREATE2`. The address where the contract
     * will be deployed can be known in advance via {computeAddress}.
     *
     * The bytecode for a contract can be obtained from Solidity with
     * `type(contractName).creationCode`.
     *
     * Requirements:
     *
     * - `bytecode` must not be empty.
     * - `salt` must have not been used for `bytecode` already.
     * - the factory must have a balance of at least `amount`.
     * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.
     */
    function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address addr) {
        require(address(this).balance >= amount, "Create2: insufficient balance");
        require(bytecode.length != 0, "Create2: bytecode length is zero");
        /// @solidity memory-safe-assembly
        assembly {
            addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)
        }
        require(addr != address(0), "Create2: Failed on deploy");
    }

    /**
     * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the
     * `bytecodeHash` or `salt` will result in a new destination address.
     */
    function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {
        return computeAddress(salt, bytecodeHash, address(this));
    }

    /**
     * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at
     * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.
     */
    function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address addr) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40) // Get free memory pointer

            // |                   | ↓ ptr ...  ↓ ptr + 0x0B (start) ...  ↓ ptr + 0x20 ...  ↓ ptr + 0x40 ...   |
            // |-------------------|---------------------------------------------------------------------------|
            // | bytecodeHash      |                                                        CCCCCCCCCCCCC...CC |
            // | salt              |                                      BBBBBBBBBBBBB...BB                   |
            // | deployer          | 000000...0000AAAAAAAAAAAAAAAAAAA...AA                                     |
            // | 0xFF              |            FF                                                             |
            // |-------------------|---------------------------------------------------------------------------|
            // | memory            | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC |
            // | keccak(start, 85) |            ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |

            mstore(add(ptr, 0x40), bytecodeHash)
            mstore(add(ptr, 0x20), salt)
            mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes
            let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff
            mstore8(start, 0xff)
            addr := keccak256(start, 85)
        }
    }
}

File 12 of 17 : 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 13 of 17 : Multicall.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Multicall.sol)

pragma solidity ^0.8.0;

import "./Address.sol";

/**
 * @dev Provides a function to batch together multiple calls in a single external call.
 *
 * _Available since v4.1._
 */
abstract contract Multicall {
    /**
     * @dev Receives and executes a batch of function calls on this contract.
     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall
     */
    function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) {
        results = new bytes[](data.length);
        for (uint256 i = 0; i < data.length; i++) {
            results[i] = Address.functionDelegateCall(address(this), data[i]);
        }
        return results;
    }
}

File 14 of 17 : IMOPN.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IMOPN {
    struct CollectionDataStruct {
        uint24 CollectionMOPNPoint;
        uint48 OnMapMOPNPoints;
        uint16 OnMapNftNumber;
        uint16 OnMapAgentPlaceNftNumber;
        uint48 PerCollectionNFTMinted;
        uint48 PerMOPNPointMinted;
        uint48 SettledMT;
    }

    struct AccountDataStruct {
        uint16 LandId;
        uint24 Coordinate;
        uint48 PerMOPNPointMinted;
        uint48 SettledMT;
        uint48 PerCollectionNFTMinted;
        uint16 AgentAssignPercentage;
        address AgentPlacer;
    }

    /**
     * @notice This event emit when an avatar jump into the map
     * @param account account wallet address
     * @param LandId MOPN Land Id
     * @param tileCoordinate tile coordinate
     */
    event AccountJumpIn(
        address indexed account,
        uint16 indexed LandId,
        uint24 tileCoordinate,
        address agentPlacer,
        uint16 AgentAssignPercentage
    );

    /**
     * @notice This event emit when an avatar move on map
     * @param account account wallet address
     * @param LandId MOPN Land Id
     * @param fromCoordinate tile coordinate
     * @param toCoordinate tile coordinate
     */
    event AccountMove(
        address indexed account,
        uint16 indexed LandId,
        uint24 fromCoordinate,
        uint24 toCoordinate
    );

    /**
     * @notice BombUse Event emit when a Bomb is used at a coordinate by an avatar
     * @param account account wallet address
     * @param victim the victim that bombed out of the map
     * @param tileCoordinate the tileCoordinate
     */
    event BombUse(
        address indexed account,
        address victim,
        uint24 tileCoordinate
    );

    event CollectionPointChange(
        address collectionAddress,
        uint256 CollectionPoint
    );

    event AccountMTMinted(
        address indexed account,
        uint256 amount,
        uint16 AgentAssignPercentage
    );

    event CollectionMTMinted(address indexed collectionAddress, uint256 amount);

    event LandHolderMTMinted(uint16 indexed LandId, uint256 amount);

    function MTOutputPerBlock() external view returns (uint32);

    function MTStepStartBlock() external view returns (uint32);

    function MTReduceInterval() external view returns (uint256);

    function TotalMOPNPoints() external view returns (uint48);

    function LastTickBlock() external view returns (uint32);

    function PerMOPNPointMinted() external view returns (uint48);

    function MTTotalMinted() external view returns (uint64);

    function currentMTPPB() external view returns (uint256);

    function currentMTPPB(uint256 reduceTimes) external view returns (uint256);

    function MTReduceTimes() external view returns (uint256);

    function settlePerMOPNPointMinted() external;

    function getCollectionData(
        address collectionAddress
    ) external view returns (CollectionDataStruct memory);

    function settleCollectionMT(address collectionAddress) external;

    function claimCollectionMT(address collectionAddress) external;

    function settleCollectionMOPNPoint(
        address collectionAddress,
        uint24 point
    ) external;

    function getAccountData(
        address account
    ) external view returns (AccountDataStruct memory);

    function getAccountCollection(
        address account
    ) external view returns (address collectionAddress);

    function getAccountOnMapMOPNPoint(
        address account
    ) external view returns (uint256 OnMapMOPNPoint);

    function claimAccountMT(address account) external;
}

File 15 of 17 : IMOPNBomb.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import "@openzeppelin/contracts/interfaces/IERC1155.sol";

interface IMOPNBomb is IERC1155 {
    function mint(address to, uint256 id, uint256 amount) external;

    function burn(address from, uint256 id, uint256 amount) external;

    function transferOwnership(address newOwner) external;
}

File 16 of 17 : IMOPNToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import "@openzeppelin/contracts/interfaces/IERC20.sol";

interface IMOPNToken is IERC20 {
    function mint(address to, uint256 amount) external;

    function burn(uint256 amount) external;

    function burnFrom(address account, uint256 amount) external;

    function mopnburn(address account, uint256 amount) external;

    function safeTransferFrom(
        address _from,
        address _to,
        uint256 _value,
        bytes memory _data
    ) external;

    function transferOwnership(address newOwner) external;
}

File 17 of 17 : CollectionVaultBytecodeLib.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library CollectionVaultBytecodeLib {
    function getCreationCode(
        address implementation_,
        address collectionAddress_,
        uint256 salt_
    ) internal pure returns (bytes memory) {
        return
            abi.encodePacked(
                hex"3d60ad80600a3d3981f3363d3d373d3d3d363d73",
                implementation_,
                hex"5af43d82803e903d91602b57fd5bf3",
                abi.encode(salt_, collectionAddress_)
            );
    }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collectionAddress","type":"address"},{"indexed":true,"internalType":"address","name":"collectionVault","type":"address"}],"name":"CollectionVaultCreated","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":"","type":"address"}],"name":"CollectionVaults","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ERC6551AccountHelper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ERC6551AccountProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ERC6551Registry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"auctionHouseContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bombContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collectionVaultContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collectionAddress","type":"address"}],"name":"computeCollectionVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collectionAddress","type":"address"}],"name":"createCollectionVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dataContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collectionAddress","type":"address"}],"name":"getCollectionVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collectionAddress","type":"address"}],"name":"getCollectionVaultIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"landContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mopnContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pointContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ERC6551Registry_","type":"address"},{"internalType":"address","name":"ERC6551AccountProxy_","type":"address"},{"internalType":"address","name":"ERC6551AccountHelper_","type":"address"}],"name":"updateERC6551Contract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"auctionHouseContract_","type":"address"},{"internalType":"address","name":"mopnContract_","type":"address"},{"internalType":"address","name":"bombContract_","type":"address"},{"internalType":"address","name":"tokenContract_","type":"address"},{"internalType":"address","name":"pointContract_","type":"address"},{"internalType":"address","name":"landContract_","type":"address"},{"internalType":"address","name":"dataContract_","type":"address"},{"internalType":"address","name":"collectionVaultContract_","type":"address"}],"name":"updateMOPNContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vaultIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6112c88061007e6000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c806373210fb1116100e3578063d6ae71d51161008c578063eb3ddd9011610066578063eb3ddd9014610424578063f288ee1914610444578063f2fde38b1461046457600080fd5b8063d6ae71d5146103d1578063dc1a77d8146103f1578063e95e84791461041157600080fd5b8063ac9650d8116100bd578063ac9650d814610358578063adbcef1114610378578063b61935ab1461039857600080fd5b806373210fb1146103075780638da5cb5b146103275780638e2247fb1461034557600080fd5b80632f897b5c1161014557806355a373d61161011f57806355a373d6146102d6578063715018a6146102f657806371d14b82146102fe57600080fd5b80632f897b5c1461024f57806330c692fe1461027d5780633c45fb8e1461029257600080fd5b80630d668818116101765780630d668818146101ef57806315e58d471461020f5780632218e6801461022f57600080fd5b806303d07340146101925780630b757c60146101dc575b600080fd5b6007546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101b26101ea366004610e24565b610477565b6008546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b600d546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b600c546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b61026f61025d366004610e24565b60026020526000908152604090205481565b6040519081526020016101d3565b61029061028b366004610e3f565b6104bd565b005b61026f6102a0366004610e24565b73ffffffffffffffffffffffffffffffffffffffff166000908152600260205260409020546bffffffffffffffffffffffff1690565b6005546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b610290610578565b61026f60015481565b6006546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff166101b2565b610290610353366004610ed6565b61058c565b61036b610366366004610f19565b6105f8565b6040516101d39190610ffc565b600b546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b6101b26103a6366004610e24565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205460601c90565b600a546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b6009546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b6101b261041f366004610e24565b6106ed565b6004546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b6003546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b610290610472366004610e24565b61082b565b60095460009081906104a09073ffffffffffffffffffffffffffffffffffffffff1684836108e2565b90506104b66000801b828051906020012061096b565b9392505050565b6104c5610978565b600a80547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff9a8b1617909155600380548216988a1698909817909755600480548816968916969096179095556005805487169488169490941790935560068054861692871692909217909155600780548516918616919091179055600880548416918516919091179055600980549092169216919091179055565b610580610978565b61058a60006109f9565b565b610594610978565b600b805473ffffffffffffffffffffffffffffffffffffffff9485167fffffffffffffffffffffffff000000000000000000000000000000000000000091821617909155600c805493851693821693909317909255600d8054919093169116179055565b60608167ffffffffffffffff8111156106135761061361107c565b60405190808252806020026020018201604052801561064657816020015b60608152602001906001900390816106315790505b50905060005b828110156106e6576106b63085858481811061066a5761066a6110ab565b905060200281019061067c91906110da565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610a6e92505050565b8282815181106106c8576106c86110ab565b602002602001018190525080806106de90611146565b91505061064c565b5092915050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600260205260408120541561077f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f636f6c6c656374696f6e207661756c742065786973740000000000000000000060448201526064015b60405180910390fd5b600061078a83610a93565b60015473ffffffffffffffffffffffffffffffffffffffff8581166000818152600260205260408082207fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b1690951790945592519394509084169290917f479a45a1575e3e18a39a3f1cf4c526abd63b6db48e50b2cc68a6b0cb9bb8277491a36001805490600061081f83611146565b90915550909392505050565b610833610978565b73ffffffffffffffffffffffffffffffffffffffff81166108d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610776565b6108df816109f9565b50565b606083828460405160200161091792919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261095392916020016111a5565b60405160208183030381529060405290509392505050565b60006104b6838330610b0e565b60005473ffffffffffffffffffffffffffffffffffffffff16331461058a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610776565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60606104b6838360405180606001604052806027815260200161126c60279139610b38565b6009546000908190610abc9073ffffffffffffffffffffffffffffffffffffffff1684836108e2565b90506000610ad46000801b838051906020012061096b565b905073ffffffffffffffffffffffffffffffffffffffff81163b15610afa579392505050565b610b0660008084610bbd565b949350505050565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051610b62919061123c565b600060405180830381855af49150503d8060008114610b9d576040519150601f19603f3d011682016040523d82523d6000602084013e610ba2565b606091505b5091509150610bb386838387610d1c565b9695505050505050565b600083471015610c29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610776565b8151600003610c94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610776565b8282516020840186f5905073ffffffffffffffffffffffffffffffffffffffff81166104b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606401610776565b60608315610db2578251600003610dab5773ffffffffffffffffffffffffffffffffffffffff85163b610dab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610776565b5081610b06565b610b068383815115610dc75781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107769190611258565b803573ffffffffffffffffffffffffffffffffffffffff81168114610e1f57600080fd5b919050565b600060208284031215610e3657600080fd5b6104b682610dfb565b600080600080600080600080610100898b031215610e5c57600080fd5b610e6589610dfb565b9750610e7360208a01610dfb565b9650610e8160408a01610dfb565b9550610e8f60608a01610dfb565b9450610e9d60808a01610dfb565b9350610eab60a08a01610dfb565b9250610eb960c08a01610dfb565b9150610ec760e08a01610dfb565b90509295985092959890939650565b600080600060608486031215610eeb57600080fd5b610ef484610dfb565b9250610f0260208501610dfb565b9150610f1060408501610dfb565b90509250925092565b60008060208385031215610f2c57600080fd5b823567ffffffffffffffff80821115610f4457600080fd5b818501915085601f830112610f5857600080fd5b813581811115610f6757600080fd5b8660208260051b8501011115610f7c57600080fd5b60209290920196919550909350505050565b60005b83811015610fa9578181015183820152602001610f91565b50506000910152565b60008151808452610fca816020860160208601610f8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561106f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261105d858351610fb2565b94509285019290850190600101611023565b5092979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261110f57600080fd5b83018035915067ffffffffffffffff82111561112a57600080fd5b60200191503681900382131561113f57600080fd5b9250929050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361119e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f3d60ad80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008360601b1660148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526000825161122e816037850160208701610f8e565b919091016037019392505050565b6000825161124e818460208701610f8e565b9190910192915050565b6020815260006104b66020830184610fb256fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212208502a8d8e45b4b28a4f483aa34b68c01353665940cf953fb894322014f4ee2f664736f6c63430008130033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061018d5760003560e01c806373210fb1116100e3578063d6ae71d51161008c578063eb3ddd9011610066578063eb3ddd9014610424578063f288ee1914610444578063f2fde38b1461046457600080fd5b8063d6ae71d5146103d1578063dc1a77d8146103f1578063e95e84791461041157600080fd5b8063ac9650d8116100bd578063ac9650d814610358578063adbcef1114610378578063b61935ab1461039857600080fd5b806373210fb1146103075780638da5cb5b146103275780638e2247fb1461034557600080fd5b80632f897b5c1161014557806355a373d61161011f57806355a373d6146102d6578063715018a6146102f657806371d14b82146102fe57600080fd5b80632f897b5c1461024f57806330c692fe1461027d5780633c45fb8e1461029257600080fd5b80630d668818116101765780630d668818146101ef57806315e58d471461020f5780632218e6801461022f57600080fd5b806303d07340146101925780630b757c60146101dc575b600080fd5b6007546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101b26101ea366004610e24565b610477565b6008546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b600d546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b600c546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b61026f61025d366004610e24565b60026020526000908152604090205481565b6040519081526020016101d3565b61029061028b366004610e3f565b6104bd565b005b61026f6102a0366004610e24565b73ffffffffffffffffffffffffffffffffffffffff166000908152600260205260409020546bffffffffffffffffffffffff1690565b6005546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b610290610578565b61026f60015481565b6006546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff166101b2565b610290610353366004610ed6565b61058c565b61036b610366366004610f19565b6105f8565b6040516101d39190610ffc565b600b546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b6101b26103a6366004610e24565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205460601c90565b600a546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b6009546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b6101b261041f366004610e24565b6106ed565b6004546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b6003546101b29073ffffffffffffffffffffffffffffffffffffffff1681565b610290610472366004610e24565b61082b565b60095460009081906104a09073ffffffffffffffffffffffffffffffffffffffff1684836108e2565b90506104b66000801b828051906020012061096b565b9392505050565b6104c5610978565b600a80547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff9a8b1617909155600380548216988a1698909817909755600480548816968916969096179095556005805487169488169490941790935560068054861692871692909217909155600780548516918616919091179055600880548416918516919091179055600980549092169216919091179055565b610580610978565b61058a60006109f9565b565b610594610978565b600b805473ffffffffffffffffffffffffffffffffffffffff9485167fffffffffffffffffffffffff000000000000000000000000000000000000000091821617909155600c805493851693821693909317909255600d8054919093169116179055565b60608167ffffffffffffffff8111156106135761061361107c565b60405190808252806020026020018201604052801561064657816020015b60608152602001906001900390816106315790505b50905060005b828110156106e6576106b63085858481811061066a5761066a6110ab565b905060200281019061067c91906110da565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610a6e92505050565b8282815181106106c8576106c86110ab565b602002602001018190525080806106de90611146565b91505061064c565b5092915050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600260205260408120541561077f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f636f6c6c656374696f6e207661756c742065786973740000000000000000000060448201526064015b60405180910390fd5b600061078a83610a93565b60015473ffffffffffffffffffffffffffffffffffffffff8581166000818152600260205260408082207fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b1690951790945592519394509084169290917f479a45a1575e3e18a39a3f1cf4c526abd63b6db48e50b2cc68a6b0cb9bb8277491a36001805490600061081f83611146565b90915550909392505050565b610833610978565b73ffffffffffffffffffffffffffffffffffffffff81166108d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610776565b6108df816109f9565b50565b606083828460405160200161091792919091825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261095392916020016111a5565b60405160208183030381529060405290509392505050565b60006104b6838330610b0e565b60005473ffffffffffffffffffffffffffffffffffffffff16331461058a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610776565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60606104b6838360405180606001604052806027815260200161126c60279139610b38565b6009546000908190610abc9073ffffffffffffffffffffffffffffffffffffffff1684836108e2565b90506000610ad46000801b838051906020012061096b565b905073ffffffffffffffffffffffffffffffffffffffff81163b15610afa579392505050565b610b0660008084610bbd565b949350505050565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051610b62919061123c565b600060405180830381855af49150503d8060008114610b9d576040519150601f19603f3d011682016040523d82523d6000602084013e610ba2565b606091505b5091509150610bb386838387610d1c565b9695505050505050565b600083471015610c29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610776565b8151600003610c94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610776565b8282516020840186f5905073ffffffffffffffffffffffffffffffffffffffff81166104b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606401610776565b60608315610db2578251600003610dab5773ffffffffffffffffffffffffffffffffffffffff85163b610dab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610776565b5081610b06565b610b068383815115610dc75781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107769190611258565b803573ffffffffffffffffffffffffffffffffffffffff81168114610e1f57600080fd5b919050565b600060208284031215610e3657600080fd5b6104b682610dfb565b600080600080600080600080610100898b031215610e5c57600080fd5b610e6589610dfb565b9750610e7360208a01610dfb565b9650610e8160408a01610dfb565b9550610e8f60608a01610dfb565b9450610e9d60808a01610dfb565b9350610eab60a08a01610dfb565b9250610eb960c08a01610dfb565b9150610ec760e08a01610dfb565b90509295985092959890939650565b600080600060608486031215610eeb57600080fd5b610ef484610dfb565b9250610f0260208501610dfb565b9150610f1060408501610dfb565b90509250925092565b60008060208385031215610f2c57600080fd5b823567ffffffffffffffff80821115610f4457600080fd5b818501915085601f830112610f5857600080fd5b813581811115610f6757600080fd5b8660208260051b8501011115610f7c57600080fd5b60209290920196919550909350505050565b60005b83811015610fa9578181015183820152602001610f91565b50506000910152565b60008151808452610fca816020860160208601610f8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561106f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261105d858351610fb2565b94509285019290850190600101611023565b5092979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261110f57600080fd5b83018035915067ffffffffffffffff82111561112a57600080fd5b60200191503681900382131561113f57600080fd5b9250929050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361119e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f3d60ad80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008360601b1660148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526000825161122e816037850160208701610f8e565b919091016037019392505050565b6000825161124e818460208701610f8e565b9190910192915050565b6020815260006104b66020830184610fb256fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212208502a8d8e45b4b28a4f483aa34b68c01353665940cf953fb894322014f4ee2f664736f6c63430008130033

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