ETH Price: $2,861.26 (-2.72%)

Contract

0xb641ba92D0598ECB77B9bf99eD3B7c2689Cd2DEA

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

> 10 Internal Transactions found.

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
720839932023-03-21 10:07:411041 days ago1679393261
0xb641ba92...689Cd2DEA
0 ETH
720839932023-03-21 10:07:411041 days ago1679393261
0xb641ba92...689Cd2DEA
0 ETH
720836992023-03-21 10:06:271041 days ago1679393187
0xb641ba92...689Cd2DEA
0 ETH
720836992023-03-21 10:06:271041 days ago1679393187
0xb641ba92...689Cd2DEA
0 ETH
720810102023-03-21 9:55:231041 days ago1679392523
0xb641ba92...689Cd2DEA
0 ETH
720810102023-03-21 9:55:231041 days ago1679392523
0xb641ba92...689Cd2DEA
0 ETH
720773882023-03-21 9:40:281041 days ago1679391628
0xb641ba92...689Cd2DEA
0 ETH
720773882023-03-21 9:40:281041 days ago1679391628
0xb641ba92...689Cd2DEA
0 ETH
720770872023-03-21 9:39:191041 days ago1679391559
0xb641ba92...689Cd2DEA
0 ETH
720770872023-03-21 9:39:191041 days ago1679391559
0xb641ba92...689Cd2DEA
0 ETH
720731122023-03-21 9:22:541041 days ago1679390574
0xb641ba92...689Cd2DEA
0 ETH
720731122023-03-21 9:22:541041 days ago1679390574
0xb641ba92...689Cd2DEA
0 ETH
720725092023-03-21 9:20:311041 days ago1679390431
0xb641ba92...689Cd2DEA
0 ETH
720725092023-03-21 9:20:311041 days ago1679390431
0xb641ba92...689Cd2DEA
0 ETH
720720342023-03-21 9:18:311041 days ago1679390311
0xb641ba92...689Cd2DEA
0 ETH
720720342023-03-21 9:18:311041 days ago1679390311
0xb641ba92...689Cd2DEA
0 ETH
720716912023-03-21 9:17:051041 days ago1679390225
0xb641ba92...689Cd2DEA
0 ETH
720716912023-03-21 9:17:051041 days ago1679390225
0xb641ba92...689Cd2DEA
0 ETH
720699552023-03-21 9:09:571041 days ago1679389797
0xb641ba92...689Cd2DEA
0 ETH
720699552023-03-21 9:09:571041 days ago1679389797
0xb641ba92...689Cd2DEA
0 ETH
720692802023-03-21 9:07:161041 days ago1679389636
0xb641ba92...689Cd2DEA
0 ETH
720692802023-03-21 9:07:161041 days ago1679389636
0xb641ba92...689Cd2DEA
0 ETH
720669162023-03-21 8:57:311041 days ago1679389051
0xb641ba92...689Cd2DEA
0 ETH
720669162023-03-21 8:57:311041 days ago1679389051
0xb641ba92...689Cd2DEA
0 ETH
720650232023-03-21 8:49:451041 days ago1679388585
0xb641ba92...689Cd2DEA
0 ETH
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MagicDomainResolver

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

import {IMagicDomainRegistry} from "./interfaces/IMagicDomainRegistry.sol";
import {IMagicDomainResolver} from "./interfaces/IMagicDomainResolver.sol";
import {AddressResolverAbs} from "./abstracts/AddressResolverAbs.sol";
import {NameResolverAbs} from "./abstracts/NameResolverAbs.sol";
import {TextResolverAbs} from "./abstracts/TextResolverAbs.sol";
import {ResolverAbs} from "./abstracts/ResolverAbs.sol";

/**
 * A simple resolver anyone can use; only allows the owner of a node to set its
 * address.
 */
contract MagicDomainResolver is
    Initializable,
    ResolverAbs,
    AddressResolverAbs,
    NameResolverAbs,
    TextResolverAbs,
    IMagicDomainResolver
{
    IMagicDomainRegistry public magicDomains;
    address public trustedDomainController;
    address public trustedReverseRegistrar;

    /**
     * A mapping of operators. An address that is authorized for an address
     * may make any changes to the name that the owner could, but may not update
     * the set of authorisations.
     * (owner, operator) => approved
     */
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * A mapping of delegates. A delegate that is authorised by an owner
     * for a name may make changes to the name's resolver, but may not update
     * the set of token approvals.
     * (owner, name, delegate) => approved
     */
    mapping(address => mapping(bytes32 => mapping(address => bool))) private _tokenApprovals;

    // Logged when an operator is added or removed.
    event ApprovalForAll(
        address indexed owner,
        address indexed operator,
        bool approved
    );
    // Logged when a delegate is approved or  an approval is revoked.
    event Approved(
        address owner,
        bytes32 indexed node,
        address indexed delegate,
        bool indexed approved
    );

    function initialize(IMagicDomainRegistry _magicDomains,
        address _trustedDomainController,
        address _trustedReverseRegistrar
    ) external initializer {
        magicDomains = _magicDomains;
        trustedDomainController = _trustedDomainController;
        trustedReverseRegistrar = _trustedReverseRegistrar;
    }

    /**
     * @dev Forked from {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) external {
        require(
            msg.sender != operator,
            "MagicDomainResolver: setting approval status for self"
        );

        _operatorApprovals[msg.sender][operator] = approved;
        emit ApprovalForAll(msg.sender, operator, approved);
    }

    /**
     * @dev Forked from {IERC1155-isApprovedForAll}.
     */
    function isApprovedForAll(address account, address operator)
        public
        view
        returns (bool)
    {
        return _operatorApprovals[account][operator];
    }

    /**
     * @dev Approve a delegate to be able to updated records on a node.
     */
    function approve(bytes32 node, address delegate, bool approved) external {
        require(
            msg.sender != delegate,
            "MagicDomainResolver: Setting delegate status for self"
        );

        _tokenApprovals[msg.sender][node][delegate] = approved;
        emit Approved(msg.sender, node, delegate, approved);
    }

    /**
     * @dev Check to see if the delegate has been approved by the owner for the node.
     */
    function isApprovedFor(address owner, bytes32 node, address delegate)
        public
        view
        returns (bool)
    {
        return _tokenApprovals[owner][node][delegate];
    }

    function isAuthorized(bytes32 node) internal view override returns (bool) {
        if (
            msg.sender == trustedDomainController ||
            msg.sender == trustedReverseRegistrar
        ) {
            return true;
        }
        address owner = magicDomains.owner(node);
        return owner == msg.sender 
            || isApprovedForAll(owner, msg.sender)
            || isApprovedFor(owner, node, msg.sender);
    }

    function supportsInterface(bytes4 interfaceID)
        public
        view
        override(
            ResolverAbs,
            AddressResolverAbs,
            NameResolverAbs,
            TextResolverAbs,
            IMagicDomainResolver
        )
        returns (bool)
    {
        return super.supportsInterface(interfaceID) || interfaceID == type(IMagicDomainResolver).interfaceId;
    }
}

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

pragma solidity ^0.8.2;

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

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

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

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

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

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

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

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

    /**
     * @dev Internal function that returns the initialized version. Returns `_initialized`
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Internal function that returns the initialized version. Returns `_initializing`
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

// 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://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.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 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 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);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }

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

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

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import "./ResolverAbs.sol";
import "../interfaces/IAddressResolver.sol";
import "../interfaces/IAddrResolver.sol";

abstract contract AddressResolverAbs is
    IAddrResolver,
    IAddressResolver,
    ResolverAbs
{
    // EVM cointypes are calculated by: (0x80000000 | chainId) >>> 0
    // For more info, see https://docs.ens.domains/ens-improvement-proposals/ensip-11-evmchain-address-resolution
    uint256 private constant COIN_TYPE_ETH = 60;
    // Calculated above w/ chainId 42161.
    // All defaults point to Arbitrum Nitro, where MagicDomains are deployed to
    uint256 private constant COIN_TYPE_ARB_NITRO = 2147441487;

    // node's version -> node -> coinType -> address as binary
    mapping(uint64 => mapping(bytes32 => mapping(uint256 => bytes))) versionable_addresses;

    /**
     * Sets the address associated with a MagicDomains node.
     * May only be called by the owner of that node in the MagicDomains registry.
     * @param node The node to update.
     * @param a The address to set.
     */
    function setAddr(bytes32 node, address a)
        external
        virtual
        authorized(node)
    {
        setAddr(node, COIN_TYPE_ARB_NITRO, addressToBytes(a));
    }

    /**
     * Returns the Arbitrum Nitro address associated with a MagicDomains node.
     * @param node The MagicDomains node to query.
     * @return The associated address.
     */
    function addr(bytes32 node)
        public
        view
        virtual
        override
        returns (address payable)
    {
        bytes memory a = addr(node, COIN_TYPE_ARB_NITRO);
        if (a.length == 0) {
            return payable(0);
        }
        return bytesToAddress(a);
    }

    function setAddr(
        bytes32 node,
        uint256 coinType,
        bytes memory a
    ) public virtual authorized(node) {
        emit AddressChanged(node, coinType, a);
        if (coinType == COIN_TYPE_ARB_NITRO) {
            emit AddrChanged(node, bytesToAddress(a));
        }
        versionable_addresses[recordVersions[node]][node][coinType] = a;
    }

    function addr(bytes32 node, uint256 coinType)
        public
        view
        virtual
        override
        returns (bytes memory)
    {
        return versionable_addresses[recordVersions[node]][node][coinType];
    }

    function supportsInterface(bytes4 interfaceID)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceID == type(IAddrResolver).interfaceId ||
            interfaceID == type(IAddressResolver).interfaceId ||
            super.supportsInterface(interfaceID);
    }

    function bytesToAddress(bytes memory b)
        internal
        pure
        returns (address payable a)
    {
        require(b.length == 20);
        assembly {
            a := div(mload(add(b, 32)), exp(256, 12))
        }
    }

    function addressToBytes(address a) internal pure returns (bytes memory b) {
        b = new bytes(20);
        assembly {
            mstore(add(b, 32), mul(a, exp(256, 12)))
        }
    }
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import "./ResolverAbs.sol";
import "../interfaces/INameResolver.sol";

abstract contract NameResolverAbs is INameResolver, ResolverAbs {
    
    // node's version -> node -> name
    mapping(uint64 => mapping(bytes32 => string)) versionable_names;

    /**
     * Sets the name associated with a MagicDomains node, for reverse records.
     * May only be called by the owner of that node in the MagicDomains registry.
     * @param node The node to update.
     * @param newName The name to to save.
     */
    function setName(bytes32 node, string calldata newName)
        external
        virtual
        authorized(node)
    {
        versionable_names[recordVersions[node]][node] = newName;
        emit NameChanged(node, newName);
    }

    /**
     * Returns the name associated with a MagicDomains node, for reverse records.
     * Defined in EIP181.
     * @param node The MagicDomains node to query.
     * @return The associated name.
     */
    function name(bytes32 node)
        external
        view
        virtual
        override
        returns (string memory)
    {
        return versionable_names[recordVersions[node]][node];
    }

    function supportsInterface(bytes4 interfaceID)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceID == type(INameResolver).interfaceId ||
            super.supportsInterface(interfaceID);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import {ERC165Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol";
import {IVersionableResolver} from "../interfaces/IVersionableResolver.sol";

abstract contract ResolverAbs is ERC165Upgradeable, IVersionableResolver {
    
    // node -> node version
    mapping(bytes32 => uint64) public recordVersions;

    function isAuthorized(bytes32 node) internal view virtual returns (bool);

    modifier authorized(bytes32 node) {
        require(isAuthorized(node), "ResolverAbs: not authorized");
        _;
    }

    /**
     * Increments the record version associated with a MagicDomains node.
     * May only be called by the owner of that node in the MagicDomains registry.
     * @param node The node to update.
     */
    function clearRecords(bytes32 node) public virtual authorized(node) {
        recordVersions[node]++;
        emit VersionChanged(node, recordVersions[node]);
    }

    function supportsInterface(bytes4 interfaceID)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceID == type(IVersionableResolver).interfaceId ||
            super.supportsInterface(interfaceID);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import "./ResolverAbs.sol";
import "../interfaces/ITextResolver.sol";

abstract contract TextResolverAbs is ITextResolver, ResolverAbs {
    // node's version -> node -> key -> text
    mapping(uint64 => mapping(bytes32 => mapping(string => string))) versionable_texts;

    /**
     * Sets the text data associated with a MagicDomains node and key.
     * May only be called by the owner of that node in the MagicDomains registry.
     * @param node The node to update.
     * @param key The key to set.
     * @param value The text data value to set.
     */
    function setText(
        bytes32 node,
        string calldata key,
        string calldata value
    ) external virtual authorized(node) {
        versionable_texts[recordVersions[node]][node][key] = value;
        emit TextChanged(node, key, key, value);
    }

    /**
     * Returns the text data associated with a MagicDomains node and key.
     * @param node The MagicDomains node to query.
     * @param key The text data key to query.
     * @return The associated text data.
     */
    function text(bytes32 node, string calldata key)
        external
        view
        virtual
        override
        returns (string memory)
    {
        return versionable_texts[recordVersions[node]][node][key];
    }

    function supportsInterface(bytes4 interfaceID)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceID == type(ITextResolver).interfaceId ||
            super.supportsInterface(interfaceID);
    }
}

File 10 of 16 : IAddrResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

/**
 * Interface for the new (multicoin) addr function.
 */
interface IAddrResolver {
    event AddrChanged(bytes32 indexed node, address a);

    /**
     * Returns the address associated with a MagicDomain node.
     * @param node The MagicDomain node to query.
     * @return payable The associated address.
     */
    function addr(bytes32 node) external view returns (address payable);
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

/**
 * Interface for the new (multicoin) addr function.
 */
interface IAddressResolver {
    event AddressChanged(bytes32 indexed node, uint256 coinType, bytes newAddress);

    /**
     * Returns the address associated with a MagicDomain node.
     * @param node The MagicDomain node to query.
     * @param coinType The reference type for the given chain (see EIP-2304)
     * @return binaryAddress The associated address in its native binary format (See EIP-2304's Address Encoding section).
     */
    function addr(bytes32 node, uint256 coinType)
        external
        view
        returns (bytes memory binaryAddress);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IMagicDomainRegistry {
    // Logged when the owner of a node assigns a new owner to a subnode.
    event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);
    // Logged when the owner of a node transfers ownership to a new account.
    event Transfer(bytes32 indexed node, address owner);
    // Logged when the resolver for a node changes.
    event NewResolver(bytes32 indexed node, address resolver);
    // Logged when the TTL of a node changes
    event NewTTL(bytes32 indexed node, uint64 ttl);
    // Logged when an operator is added or removed.
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
    // Logged when the owner of a node deletes a subnode.
    event RecordRemoved(bytes32 indexed node, bytes32 indexed label);
    // Logged when the owner of a node changes a subnode's ability to create more subnodes.
    event BlockSubnodeStatusChanged(bytes32 indexed node, bytes32 indexed label, bool blockSubnodes);

    function setRootRecord(address _owner, address resolver, uint64 ttl) external;
    function setSubnodeRecord(bytes32 node, bytes32 label, address owner, address resolver, uint64 ttl) external;
    function removeSubnodeRecord(bytes32 _node, bytes32 _label) external;
    function setSubnodeOwner(bytes32 node, bytes32 label, address owner) external returns(bytes32);
    function setBlockSubnodeForSubnode(bytes32 _node, bytes32 _label, bool _blockSubnode) external returns(bytes32);
    function setResolver(bytes32 node, address resolver) external;
    function setRootOwner(address _owner) external;
    function setTTL(bytes32 node, uint64 ttl) external;
    function setApprovalForAll(address operator, bool approved) external;
    function owner(bytes32 node) external view returns (address);
    function resolver(bytes32 node) external view returns (address);
    function ttl(bytes32 node) external view returns (uint64);
    function areSubnodesBlocked(bytes32 _node) external view returns (bool);
    function recordExists(bytes32 node) external view returns (bool);
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IMagicDomainResolver {
    function supportsInterface(bytes4 interfaceID) external view returns (bool);
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface INameResolver {
    event NameChanged(bytes32 indexed node, string name);

    /**
     * Returns the name associated with an ENS node, for reverse records.
     * Defined in EIP181.
     * @param node The ENS node to query.
     * @return name The associated name.
     */
    function name(bytes32 node) external view returns (string memory name);

    /**
     * Sets the name associated with a MagicDomains node, for reverse records.
     * May only be called by the owner of that node in the MagicDomains registry.
     * @param node The node to update.
     * @param newName The name to to save.
     */
    function setName(bytes32 node, string calldata newName) external;
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface ITextResolver {
    event TextChanged(
        bytes32 indexed node,
        string indexed indexedKey,
        string key,
        string value
    );

    /**
     * Returns the text data associated with an ENS node and key.
     * @param node The ENS node to query.
     * @param key The text data key to query.
     * @return text The associated text data.
     */
    function text(bytes32 node, string calldata key)
        external
        view
        returns (string memory text);
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface IVersionableResolver {
    event VersionChanged(bytes32 indexed node, uint64 newVersion);

    function recordVersions(bytes32 node) external view returns (uint64);
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [
    ":@chainlink/contracts/=lib/chainlink/contracts/",
    ":@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    ":@prb/math/=lib/prb-math/src/",
    ":@prb/test/=lib/prb-math/lib/prb-test/src/",
    ":chainlink/=lib/chainlink/integration-tests/contracts/ethereum/src/",
    ":ds-test/=lib/forge-std/lib/ds-test/src/",
    ":forge-std/=lib/forge-std/src/",
    ":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    ":prb-math/=lib/prb-math/src/",
    ":prb-test/=lib/prb-math/lib/prb-test/src/",
    ":src/=src/"
  ],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"address","name":"a","type":"address"}],"name":"AddrChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"coinType","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"newAddress","type":"bytes"}],"name":"AddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"bool","name":"approved","type":"bool"}],"name":"Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"NameChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"string","name":"indexedKey","type":"string"},{"indexed":false,"internalType":"string","name":"key","type":"string"},{"indexed":false,"internalType":"string","name":"value","type":"string"}],"name":"TextChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"newVersion","type":"uint64"}],"name":"VersionChanged","type":"event"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addr","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"}],"name":"addr","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"clearRecords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMagicDomainRegistry","name":"_magicDomains","type":"address"},{"internalType":"address","name":"_trustedDomainController","type":"address"},{"internalType":"address","name":"_trustedReverseRegistrar","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"}],"name":"isApprovedFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"magicDomains","outputs":[{"internalType":"contract IMagicDomainRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"recordVersions","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"bytes","name":"a","type":"bytes"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"a","type":"address"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"newName","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setText","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"}],"name":"text","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedDomainController","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedReverseRegistrar","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50611648806100206000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c8063a22cb465116100ad578063c0c53b8b11610071578063c0c53b8b1461029d578063d5fa2b00146102b0578063d700ff33146102c3578063e985e9c514610304578063f1cb7e061461034057600080fd5b8063a22cb4651461020d578063a4b91a0114610220578063a9784b3e14610233578063b7bd009214610277578063bd73ce8d1461028a57600080fd5b806359d1d43c116100f457806359d1d43c146101a157806362c50a13146101c1578063691f3431146101d457806377372213146101e75780638b95dd71146101fa57600080fd5b806301ffc9a71461012657806310f13a8c1461014e5780633603d758146101635780633b3b57de14610176575b600080fd5b610139610134366004610ec1565b610353565b60405190151581526020015b60405180910390f35b61016161015c366004610f33565b61037f565b005b610161610171366004610fac565b610469565b610189610184366004610fac565b61051f565b6040516001600160a01b039091168152602001610145565b6101b46101af366004610fc5565b610554565b6040516101459190611056565b603954610189906001600160a01b031681565b6101b46101e2366004610fac565b610635565b6101616101f5366004610fc5565b6106f5565b61016161020836600461107f565b610793565b61016161021b36600461116f565b61088a565b61016161022e3660046111a4565b61096c565b6101396102413660046111e2565b6001600160a01b039283166000908152603b60209081526040808320948352938152838220929094168152925290205460ff1690565b603854610189906001600160a01b031681565b603754610189906001600160a01b031681565b6101616102ab366004611224565b610a57565b6101616102be366004611264565b610ba0565b6102ec6102d1366004610fac565b6033602052600090815260409020546001600160401b031681565b6040516001600160401b039091168152602001610145565b610139610312366004611294565b6001600160a01b039182166000908152603a6020908152604080832093909416825291909152205460ff1690565b6101b461034e3660046112c2565b610bdd565b600061035e82610ca6565b8061037957506001600160e01b031982166301ffc9a760e01b145b92915050565b8461038981610ccb565b6103ae5760405162461bcd60e51b81526004016103a5906112e4565b60405180910390fd5b6000868152603360209081526040808320546001600160401b0316835260368252808320898452909152908190209051849184916103ef908990899061131b565b9081526020016040518091039020918261040a9291906113b3565b50848460405161041b92919061131b565b6040518091039020867f448bc014f1536726cf8d54ff3d6481ed3cbc683c2591ca204274009afa09b1a187878787604051610459949392919061149b565b60405180910390a3505050505050565b8061047381610ccb565b61048f5760405162461bcd60e51b81526004016103a5906112e4565b600082815260336020526040812080546001600160401b0316916104b2836114cd565b82546101009290920a6001600160401b038181021990931691831602179091556000848152603360209081526040918290205491519190921681528492507fc6621ccb8f3f5a04bb6502154b2caf6adf5983fe76dfef1cfc9c42e3579db444910160405180910390a25050565b60008061053083637fff5b4f610bdd565b905080516000036105445750600092915050565b61054d81610de2565b9392505050565b6000838152603360209081526040808320546001600160401b031683526036825280832086845290915290819020905160609190610595908590859061131b565b908152602001604051809103902080546105ae9061132b565b80601f01602080910402602001604051908101604052809291908181526020018280546105da9061132b565b80156106275780601f106105fc57610100808354040283529160200191610627565b820191906000526020600020905b81548152906001019060200180831161060a57829003601f168201915b505050505090509392505050565b6000818152603360209081526040808320546001600160401b031683526035825280832084845290915290208054606091906106709061132b565b80601f016020809104026020016040519081016040528092919081815260200182805461069c9061132b565b80156106e95780601f106106be576101008083540402835291602001916106e9565b820191906000526020600020905b8154815290600101906020018083116106cc57829003601f168201915b50505050509050919050565b826106ff81610ccb565b61071b5760405162461bcd60e51b81526004016103a5906112e4565b6000848152603360209081526040808320546001600160401b031683526035825280832087845290915290206107528385836113b3565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f78484604051610785929190611501565b60405180910390a250505050565b8261079d81610ccb565b6107b95760405162461bcd60e51b81526004016103a5906112e4565b837f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af75284846040516107eb92919061151d565b60405180910390a2637fff5b4f830361084557837f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd261082984610de2565b6040516001600160a01b03909116815260200160405180910390a25b6000848152603360209081526040808320546001600160401b0316835260348252808320878452825280832086845290915290206108838382611536565b5050505050565b6001600160a01b03821633036109005760405162461bcd60e51b815260206004820152603560248201527f4d61676963446f6d61696e5265736f6c7665723a2073657474696e67206170706044820152743937bb30b61039ba30ba3ab9903337b91039b2b63360591b60648201526084016103a5565b336000818152603a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b03821633036109e25760405162461bcd60e51b815260206004820152603560248201527f4d61676963446f6d61696e5265736f6c7665723a2053657474696e672064656c60448201527432b3b0ba329039ba30ba3ab9903337b91039b2b63360591b60648201526084016103a5565b336000818152603b6020908152604080832087845282528083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519384529286917ff0ddb3b04746704017f9aa8bd728fcc2c1d11675041205350018915f5e4750a0910160405180910390a4505050565b600054610100900460ff1615808015610a775750600054600160ff909116105b80610a915750303b158015610a91575060005460ff166001145b610af45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103a5565b6000805460ff191660011790558015610b17576000805461ff0019166101001790555b603780546001600160a01b038087166001600160a01b0319928316179092556038805486841690831617905560398054928516929091169190911790558015610b9a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b81610baa81610ccb565b610bc65760405162461bcd60e51b81526004016103a5906112e4565b610bd883637fff5b4f61020885610e01565b505050565b6000828152603360209081526040808320546001600160401b031683526034825280832085845282528083208484529091529020805460609190610c209061132b565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4c9061132b565b8015610c995780601f10610c6e57610100808354040283529160200191610c99565b820191906000526020600020905b815481529060010190602001808311610c7c57829003601f168201915b5050505050905092915050565b60006001600160e01b03198216631674750f60e21b1480610379575061037982610e31565b6038546000906001600160a01b0316331480610cf157506039546001600160a01b031633145b15610cfe57506001919050565b6037546040516302571be360e01b8152600481018490526000916001600160a01b0316906302571be390602401602060405180830381865afa158015610d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6c91906115f5565b90506001600160a01b038116331480610da857506001600160a01b0381166000908152603a6020908152604080832033845290915290205460ff165b8061054d57506001600160a01b0381166000908152603b60209081526040808320868452825280832033845290915290205460ff1661054d565b60008151601414610df257600080fd5b5060200151600160601b900490565b604080516014808252818301909252606091602082018180368337505050600160601b9290920260208301525090565b60006001600160e01b03198216630f140b1160e11b148061037957506103798260006001600160e01b03198216631d9dabef60e11b1480610e8257506001600160e01b031982166378e5bf0360e11b145b8061037957506103798260006001600160e01b0319821663d700ff3360e01b148061037957506301ffc9a760e01b6001600160e01b0319831614610379565b600060208284031215610ed357600080fd5b81356001600160e01b03198116811461054d57600080fd5b60008083601f840112610efd57600080fd5b5081356001600160401b03811115610f1457600080fd5b602083019150836020828501011115610f2c57600080fd5b9250929050565b600080600080600060608688031215610f4b57600080fd5b8535945060208601356001600160401b0380821115610f6957600080fd5b610f7589838a01610eeb565b90965094506040880135915080821115610f8e57600080fd5b50610f9b88828901610eeb565b969995985093965092949392505050565b600060208284031215610fbe57600080fd5b5035919050565b600080600060408486031215610fda57600080fd5b8335925060208401356001600160401b03811115610ff757600080fd5b61100386828701610eeb565b9497909650939450505050565b6000815180845260005b818110156110365760208185018101518683018201520161101a565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600061054d6020830184611010565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561109457600080fd5b833592506020840135915060408401356001600160401b03808211156110b957600080fd5b818601915086601f8301126110cd57600080fd5b8135818111156110df576110df611069565b604051601f8201601f19908116603f0116810190838211818310171561110757611107611069565b8160405282815289602084870101111561112057600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6001600160a01b038116811461115757600080fd5b50565b8035801515811461116a57600080fd5b919050565b6000806040838503121561118257600080fd5b823561118d81611142565b915061119b6020840161115a565b90509250929050565b6000806000606084860312156111b957600080fd5b8335925060208401356111cb81611142565b91506111d96040850161115a565b90509250925092565b6000806000606084860312156111f757600080fd5b833561120281611142565b925060208401359150604084013561121981611142565b809150509250925092565b60008060006060848603121561123957600080fd5b833561124481611142565b9250602084013561125481611142565b9150604084013561121981611142565b6000806040838503121561127757600080fd5b82359150602083013561128981611142565b809150509250929050565b600080604083850312156112a757600080fd5b82356112b281611142565b9150602083013561128981611142565b600080604083850312156112d557600080fd5b50508035926020909101359150565b6020808252601b908201527f5265736f6c7665724162733a206e6f7420617574686f72697a65640000000000604082015260600190565b8183823760009101908152919050565b600181811c9082168061133f57607f821691505b60208210810361135f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610bd857600081815260208120601f850160051c8101602086101561138c5750805b601f850160051c820191505b818110156113ab57828155600101611398565b505050505050565b6001600160401b038311156113ca576113ca611069565b6113de836113d8835461132b565b83611365565b6000601f84116001811461141257600085156113fa5750838201355b600019600387901b1c1916600186901b178355610883565b600083815260209020601f19861690835b828110156114435786850135825560209485019460019092019101611423565b50868210156114605760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6040815260006114af604083018688611472565b82810360208401526114c2818587611472565b979650505050505050565b60006001600160401b038083168181036114f757634e487b7160e01b600052601160045260246000fd5b6001019392505050565b602081526000611515602083018486611472565b949350505050565b8281526040602082015260006115156040830184611010565b81516001600160401b0381111561154f5761154f611069565b6115638161155d845461132b565b84611365565b602080601f83116001811461159857600084156115805750858301515b600019600386901b1c1916600185901b1785556113ab565b600085815260208120601f198616915b828110156115c7578886015182559484019460019091019084016115a8565b50858210156115e55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121561160757600080fd5b815161054d8161114256fea2646970667358221220ae11d1b4e5ee7dabb42b7fc312e2db729ab6b59dcd51e52a51935970b8fac79364736f6c63430008110033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101215760003560e01c8063a22cb465116100ad578063c0c53b8b11610071578063c0c53b8b1461029d578063d5fa2b00146102b0578063d700ff33146102c3578063e985e9c514610304578063f1cb7e061461034057600080fd5b8063a22cb4651461020d578063a4b91a0114610220578063a9784b3e14610233578063b7bd009214610277578063bd73ce8d1461028a57600080fd5b806359d1d43c116100f457806359d1d43c146101a157806362c50a13146101c1578063691f3431146101d457806377372213146101e75780638b95dd71146101fa57600080fd5b806301ffc9a71461012657806310f13a8c1461014e5780633603d758146101635780633b3b57de14610176575b600080fd5b610139610134366004610ec1565b610353565b60405190151581526020015b60405180910390f35b61016161015c366004610f33565b61037f565b005b610161610171366004610fac565b610469565b610189610184366004610fac565b61051f565b6040516001600160a01b039091168152602001610145565b6101b46101af366004610fc5565b610554565b6040516101459190611056565b603954610189906001600160a01b031681565b6101b46101e2366004610fac565b610635565b6101616101f5366004610fc5565b6106f5565b61016161020836600461107f565b610793565b61016161021b36600461116f565b61088a565b61016161022e3660046111a4565b61096c565b6101396102413660046111e2565b6001600160a01b039283166000908152603b60209081526040808320948352938152838220929094168152925290205460ff1690565b603854610189906001600160a01b031681565b603754610189906001600160a01b031681565b6101616102ab366004611224565b610a57565b6101616102be366004611264565b610ba0565b6102ec6102d1366004610fac565b6033602052600090815260409020546001600160401b031681565b6040516001600160401b039091168152602001610145565b610139610312366004611294565b6001600160a01b039182166000908152603a6020908152604080832093909416825291909152205460ff1690565b6101b461034e3660046112c2565b610bdd565b600061035e82610ca6565b8061037957506001600160e01b031982166301ffc9a760e01b145b92915050565b8461038981610ccb565b6103ae5760405162461bcd60e51b81526004016103a5906112e4565b60405180910390fd5b6000868152603360209081526040808320546001600160401b0316835260368252808320898452909152908190209051849184916103ef908990899061131b565b9081526020016040518091039020918261040a9291906113b3565b50848460405161041b92919061131b565b6040518091039020867f448bc014f1536726cf8d54ff3d6481ed3cbc683c2591ca204274009afa09b1a187878787604051610459949392919061149b565b60405180910390a3505050505050565b8061047381610ccb565b61048f5760405162461bcd60e51b81526004016103a5906112e4565b600082815260336020526040812080546001600160401b0316916104b2836114cd565b82546101009290920a6001600160401b038181021990931691831602179091556000848152603360209081526040918290205491519190921681528492507fc6621ccb8f3f5a04bb6502154b2caf6adf5983fe76dfef1cfc9c42e3579db444910160405180910390a25050565b60008061053083637fff5b4f610bdd565b905080516000036105445750600092915050565b61054d81610de2565b9392505050565b6000838152603360209081526040808320546001600160401b031683526036825280832086845290915290819020905160609190610595908590859061131b565b908152602001604051809103902080546105ae9061132b565b80601f01602080910402602001604051908101604052809291908181526020018280546105da9061132b565b80156106275780601f106105fc57610100808354040283529160200191610627565b820191906000526020600020905b81548152906001019060200180831161060a57829003601f168201915b505050505090509392505050565b6000818152603360209081526040808320546001600160401b031683526035825280832084845290915290208054606091906106709061132b565b80601f016020809104026020016040519081016040528092919081815260200182805461069c9061132b565b80156106e95780601f106106be576101008083540402835291602001916106e9565b820191906000526020600020905b8154815290600101906020018083116106cc57829003601f168201915b50505050509050919050565b826106ff81610ccb565b61071b5760405162461bcd60e51b81526004016103a5906112e4565b6000848152603360209081526040808320546001600160401b031683526035825280832087845290915290206107528385836113b3565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f78484604051610785929190611501565b60405180910390a250505050565b8261079d81610ccb565b6107b95760405162461bcd60e51b81526004016103a5906112e4565b837f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af75284846040516107eb92919061151d565b60405180910390a2637fff5b4f830361084557837f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd261082984610de2565b6040516001600160a01b03909116815260200160405180910390a25b6000848152603360209081526040808320546001600160401b0316835260348252808320878452825280832086845290915290206108838382611536565b5050505050565b6001600160a01b03821633036109005760405162461bcd60e51b815260206004820152603560248201527f4d61676963446f6d61696e5265736f6c7665723a2073657474696e67206170706044820152743937bb30b61039ba30ba3ab9903337b91039b2b63360591b60648201526084016103a5565b336000818152603a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b03821633036109e25760405162461bcd60e51b815260206004820152603560248201527f4d61676963446f6d61696e5265736f6c7665723a2053657474696e672064656c60448201527432b3b0ba329039ba30ba3ab9903337b91039b2b63360591b60648201526084016103a5565b336000818152603b6020908152604080832087845282528083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519384529286917ff0ddb3b04746704017f9aa8bd728fcc2c1d11675041205350018915f5e4750a0910160405180910390a4505050565b600054610100900460ff1615808015610a775750600054600160ff909116105b80610a915750303b158015610a91575060005460ff166001145b610af45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103a5565b6000805460ff191660011790558015610b17576000805461ff0019166101001790555b603780546001600160a01b038087166001600160a01b0319928316179092556038805486841690831617905560398054928516929091169190911790558015610b9a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b81610baa81610ccb565b610bc65760405162461bcd60e51b81526004016103a5906112e4565b610bd883637fff5b4f61020885610e01565b505050565b6000828152603360209081526040808320546001600160401b031683526034825280832085845282528083208484529091529020805460609190610c209061132b565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4c9061132b565b8015610c995780601f10610c6e57610100808354040283529160200191610c99565b820191906000526020600020905b815481529060010190602001808311610c7c57829003601f168201915b5050505050905092915050565b60006001600160e01b03198216631674750f60e21b1480610379575061037982610e31565b6038546000906001600160a01b0316331480610cf157506039546001600160a01b031633145b15610cfe57506001919050565b6037546040516302571be360e01b8152600481018490526000916001600160a01b0316906302571be390602401602060405180830381865afa158015610d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6c91906115f5565b90506001600160a01b038116331480610da857506001600160a01b0381166000908152603a6020908152604080832033845290915290205460ff165b8061054d57506001600160a01b0381166000908152603b60209081526040808320868452825280832033845290915290205460ff1661054d565b60008151601414610df257600080fd5b5060200151600160601b900490565b604080516014808252818301909252606091602082018180368337505050600160601b9290920260208301525090565b60006001600160e01b03198216630f140b1160e11b148061037957506103798260006001600160e01b03198216631d9dabef60e11b1480610e8257506001600160e01b031982166378e5bf0360e11b145b8061037957506103798260006001600160e01b0319821663d700ff3360e01b148061037957506301ffc9a760e01b6001600160e01b0319831614610379565b600060208284031215610ed357600080fd5b81356001600160e01b03198116811461054d57600080fd5b60008083601f840112610efd57600080fd5b5081356001600160401b03811115610f1457600080fd5b602083019150836020828501011115610f2c57600080fd5b9250929050565b600080600080600060608688031215610f4b57600080fd5b8535945060208601356001600160401b0380821115610f6957600080fd5b610f7589838a01610eeb565b90965094506040880135915080821115610f8e57600080fd5b50610f9b88828901610eeb565b969995985093965092949392505050565b600060208284031215610fbe57600080fd5b5035919050565b600080600060408486031215610fda57600080fd5b8335925060208401356001600160401b03811115610ff757600080fd5b61100386828701610eeb565b9497909650939450505050565b6000815180845260005b818110156110365760208185018101518683018201520161101a565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600061054d6020830184611010565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561109457600080fd5b833592506020840135915060408401356001600160401b03808211156110b957600080fd5b818601915086601f8301126110cd57600080fd5b8135818111156110df576110df611069565b604051601f8201601f19908116603f0116810190838211818310171561110757611107611069565b8160405282815289602084870101111561112057600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6001600160a01b038116811461115757600080fd5b50565b8035801515811461116a57600080fd5b919050565b6000806040838503121561118257600080fd5b823561118d81611142565b915061119b6020840161115a565b90509250929050565b6000806000606084860312156111b957600080fd5b8335925060208401356111cb81611142565b91506111d96040850161115a565b90509250925092565b6000806000606084860312156111f757600080fd5b833561120281611142565b925060208401359150604084013561121981611142565b809150509250925092565b60008060006060848603121561123957600080fd5b833561124481611142565b9250602084013561125481611142565b9150604084013561121981611142565b6000806040838503121561127757600080fd5b82359150602083013561128981611142565b809150509250929050565b600080604083850312156112a757600080fd5b82356112b281611142565b9150602083013561128981611142565b600080604083850312156112d557600080fd5b50508035926020909101359150565b6020808252601b908201527f5265736f6c7665724162733a206e6f7420617574686f72697a65640000000000604082015260600190565b8183823760009101908152919050565b600181811c9082168061133f57607f821691505b60208210810361135f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610bd857600081815260208120601f850160051c8101602086101561138c5750805b601f850160051c820191505b818110156113ab57828155600101611398565b505050505050565b6001600160401b038311156113ca576113ca611069565b6113de836113d8835461132b565b83611365565b6000601f84116001811461141257600085156113fa5750838201355b600019600387901b1c1916600186901b178355610883565b600083815260209020601f19861690835b828110156114435786850135825560209485019460019092019101611423565b50868210156114605760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6040815260006114af604083018688611472565b82810360208401526114c2818587611472565b979650505050505050565b60006001600160401b038083168181036114f757634e487b7160e01b600052601160045260246000fd5b6001019392505050565b602081526000611515602083018486611472565b949350505050565b8281526040602082015260006115156040830184611010565b81516001600160401b0381111561154f5761154f611069565b6115638161155d845461132b565b84611365565b602080601f83116001811461159857600084156115805750858301515b600019600386901b1c1916600185901b1785556113ab565b600085815260208120601f198616915b828110156115c7578886015182559484019460019091019084016115a8565b50858210156115e55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121561160757600080fd5b815161054d8161114256fea2646970667358221220ae11d1b4e5ee7dabb42b7fc312e2db729ab6b59dcd51e52a51935970b8fac79364736f6c63430008110033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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.