false
false
0

Contract Address Details

0x92612b1F38305D42A0bdd05Df83C97a16f40f4eB

Contract Name
NoNameCollisions
Creator
0xad36cb–e0fd5f at 0x48a28f–b6e324
Balance
0 C2FLR
Tokens
Fetching tokens...
Transactions
Fetching transactions...
Transfers
Fetching transfers...
Gas Used
Fetching gas used...
Last Balance Update
11392604
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
NoNameCollisions




Optimization enabled
true
Compiler version
v0.8.18+commit.87f61d96




Optimization runs
200
Verified at
2023-05-02T19:08:41.973775Z

Constructor Arguments

000000000000000000000000bdacf94ddcab51c39c2dd50bffee60bb8021949a

Arg [0] (address) : 0xbdacf94ddcab51c39c2dd50bffee60bb8021949a

              

src/no-collisions/NoNameCollisions.sol

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import "./INoNameCollisions.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@punkdomains/interfaces/IBasePunkTLD.sol";

contract NoNameCollisions is INoNameCollisions, Ownable {
    IBasePunkTLD public collisionRegistry;

    event CollisionRegistryUpdated(address NewCollisionRegistry);

    constructor(address _collisionRegistry) {
        collisionRegistry = IBasePunkTLD(_collisionRegistry);
    }

    /**
     * @dev Checks to see if there is a name collision for the given name between FNS Registry
     *      and another Registry. getDomainHolder also intakes the label without the TLD. i.e. "a"
     *      and not "a.flr"
     * @param name the name on TLD '.flr' to check for a name collision
     * @return true if there is a name collision, false otherwise
     */
    function isNameCollision(string calldata name) external view returns (bool) {
        // return collisionRegistry.getDomainHolder(name) != address(0);
        return false;
    }

    /**
     * @dev Allows the owner of the contract to update the Collision Registry, in case it
     *      is ever altered in the future
     * @dev This assumes that the interface to check
     * @param newCollisionRegistry the new CollisionRegistry address
     */
    function updateCollisionRegistry(IBasePunkTLD newCollisionRegistry) external onlyOwner {
        require(address(newCollisionRegistry) != address(0), "NoNameCollisions: Cannot Update To Zero Address");
        collisionRegistry = newCollisionRegistry;
        emit CollisionRegistryUpdated(address(newCollisionRegistry));
    }
}
        

src/no-collisions/INoNameCollisions.sol

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

interface INoNameCollisions {
    /**
     * @dev Checks to see if there is a name collision for the given name between FNS Registry
     *      and another Registry
     * @param name the name on TLD '.flr' to check for a name collision
     * @return true if there is a name collision, false otherwise
     */
    function isNameCollision(string calldata name) external view returns (bool);
}
          

lib/openzeppelin-contracts/contracts/access/Ownable.sol

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

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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);
}
          

lib/openzeppelin-contracts/contracts/utils/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;
    }
}
          

lib/openzeppelin-contracts/contracts/utils/introspection/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);
}
          

lib/punk-contracts/contracts/interfaces/IBasePunkTLD.sol

// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

interface IBasePunkTLD is IERC721 {

  struct Domain {
    string name; // domain name that goes before the TLD name; example: "tempetechie" in "tempetechie.web3"
    uint256 tokenId;
    address holder;
    string data; // stringified JSON object, example: {"description": "Some text", "twitter": "@techie1239", "friends": ["0x123..."], "url": "https://punk.domains"}
  }

  event DomainCreated(address indexed user, address indexed owner, string fullDomainName);
  event DomainBurned(address indexed user, string fullDomainName);
  event DefaultDomainChanged(address indexed user, string defaultDomain);
  event DataChanged(address indexed user, string indexed domain); // note that domain may be missing on events from older contracts
  event TldPriceChanged(address indexed user, uint256 tldPrice);
  event ReferralFeeChanged(address indexed user, uint256 referralFee);
  event TldRoyaltyChanged(address indexed user, uint256 tldRoyalty);
  event DomainBuyingToggle(address indexed user, bool domainBuyingToggle);

  function domains(string calldata _domainName) external view returns(string memory, uint256, address, string memory);

  function defaultNames(address) external view returns(string memory);

  function getDomainData(string calldata _domainName) external view returns(string memory);

  function getDomainHolder(string calldata _domainName) external view returns(address);

  function price() external view returns (uint256);
  function referral() external view returns (uint256);

  function changeNameMaxLength(uint256 _maxLength) external;

  function changePrice(uint256 _price) external;

  function changeReferralFee(uint256 _referral) external;

  function mint(
    string memory _domainName,
    address _domainHolder,
    address _referrer
  ) external payable returns(uint256);

}
          

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_collisionRegistry","internalType":"address"}]},{"type":"event","name":"CollisionRegistryUpdated","inputs":[{"type":"address","name":"NewCollisionRegistry","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IBasePunkTLD"}],"name":"collisionRegistry","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isNameCollision","inputs":[{"type":"string","name":"name","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateCollisionRegistry","inputs":[{"type":"address","name":"newCollisionRegistry","internalType":"contract IBasePunkTLD"}]}]
              

Contract Creation Code

0x608060405234801561001057600080fd5b506040516104cd3803806104cd83398101604081905261002f916100ad565b6100383361005d565b600180546001600160a01b0319166001600160a01b03929092169190911790556100dd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100bf57600080fd5b81516001600160a01b03811681146100d657600080fd5b9392505050565b6103e1806100ec6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80631564dc4e1461006757806316327c6e1461007c578063715018a6146100a75780638da5cb5b146100af578063f2fde38b146100d4578063fda37e98146100e7575b600080fd5b61007a610075366004610315565b6100fa565b005b61009261008a366004610339565b600092915050565b60405190151581526020015b60405180910390f35b61007a6101c9565b6000546001600160a01b03165b6040516001600160a01b03909116815260200161009e565b61007a6100e2366004610315565b6101dd565b6001546100bc906001600160a01b031681565b610102610256565b6001600160a01b0381166101755760405162461bcd60e51b815260206004820152602f60248201527f4e6f4e616d65436f6c6c6973696f6e733a2043616e6e6f74205570646174652060448201526e546f205a65726f204164647265737360881b60648201526084015b60405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f0193674498b3eac45e06ec7073c82b7e696e9ecb29b56f31f5fd7bf6f65fde949060200160405180910390a150565b6101d1610256565b6101db60006102b0565b565b6101e5610256565b6001600160a01b03811661024a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161016c565b610253816102b0565b50565b6000546001600160a01b031633146101db5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161016c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461025357600080fd5b60006020828403121561032757600080fd5b813561033281610300565b9392505050565b6000806020838503121561034c57600080fd5b823567ffffffffffffffff8082111561036457600080fd5b818501915085601f83011261037857600080fd5b81358181111561038757600080fd5b86602082850101111561039957600080fd5b6020929092019691955090935050505056fea26469706673582212209b4fcb20c0542ab673163a1982920efed68e60d9f09ac89d5f82a1f56778f89864736f6c63430008120033000000000000000000000000bdacf94ddcab51c39c2dd50bffee60bb8021949a

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c80631564dc4e1461006757806316327c6e1461007c578063715018a6146100a75780638da5cb5b146100af578063f2fde38b146100d4578063fda37e98146100e7575b600080fd5b61007a610075366004610315565b6100fa565b005b61009261008a366004610339565b600092915050565b60405190151581526020015b60405180910390f35b61007a6101c9565b6000546001600160a01b03165b6040516001600160a01b03909116815260200161009e565b61007a6100e2366004610315565b6101dd565b6001546100bc906001600160a01b031681565b610102610256565b6001600160a01b0381166101755760405162461bcd60e51b815260206004820152602f60248201527f4e6f4e616d65436f6c6c6973696f6e733a2043616e6e6f74205570646174652060448201526e546f205a65726f204164647265737360881b60648201526084015b60405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f0193674498b3eac45e06ec7073c82b7e696e9ecb29b56f31f5fd7bf6f65fde949060200160405180910390a150565b6101d1610256565b6101db60006102b0565b565b6101e5610256565b6001600160a01b03811661024a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161016c565b610253816102b0565b50565b6000546001600160a01b031633146101db5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161016c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461025357600080fd5b60006020828403121561032757600080fd5b813561033281610300565b9392505050565b6000806020838503121561034c57600080fd5b823567ffffffffffffffff8082111561036457600080fd5b818501915085601f83011261037857600080fd5b81358181111561038757600080fd5b86602082850101111561039957600080fd5b6020929092019691955090935050505056fea26469706673582212209b4fcb20c0542ab673163a1982920efed68e60d9f09ac89d5f82a1f56778f89864736f6c63430008120033