Contract 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b

Contract Overview

Balance:
141,437.307362257634587029 CRO

CRO Value:
$9,165.14 (@ $0.06/CRO)

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xa46c7e0088466b9f2138881246208104ca9869339d37f45d9742797796f80658Register58564312022-12-04 5:14:0217 hrs 30 mins ago0x65a1e865e654aff19322460bf71c0eca67b11991 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b237.384196184958335 CRO1.7833541352190
0x090cb67be4aae95db51e511603c4c7644aa1184ebbc22018056acf836e50ef03Commit58564162022-12-04 5:12:3717 hrs 31 mins ago0x65a1e865e654aff19322460bf71c0eca67b11991 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0 CRO0.2188237367470
0x86a35505ab652c20fd6690240c807c4f830ff0619fd758657428031cfa5a3d4eRegister58513542022-12-03 21:15:501 day 1 hr ago0x46fc63d1af24611ab81f9782ad8b4d4d76a153f6 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b238.014206540924972 CRO1.7879916819510
0x90835d0c28105eafe892e2ccbed6a44ed62bc08494c0998eb93e7d862232de45Commit58513382022-12-03 21:14:201 day 1 hr ago0x46fc63d1af24611ab81f9782ad8b4d4d76a153f6 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0 CRO0.2188342783210
0xe32a90cec05a7539a54565f9136c2d6b1f9e287b7c5b234f2e3734a275d67dbdRegister58499262022-12-03 19:01:181 day 3 hrs ago0x01e7d7edb9c95c2cfb1f2ec836f3a81fda2751a2 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b169.771611193155563 CRO1.7894744957650
0x8b2890a5fe2fda6c90b9b0338e1ebce86e5c372f971071b713130c8a98d63661Commit58499122022-12-03 18:59:591 day 3 hrs ago0x01e7d7edb9c95c2cfb1f2ec836f3a81fda2751a2 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0 CRO0.2188372021510
0x0b646809470fc58eadbd3ec4b877e062529254b028a92af987733f2b6855ebe1Register58450242022-12-03 11:16:211 day 11 hrs ago0x3f6b1d01b6823ab235fc343069b62b6472774cd1 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b169.533743286136275 CRO1.4636130368640
0x75be41712b696194dba516bc186d6d1886ecb5b5497b36c835a254a6270154a6Commit58450082022-12-03 11:14:511 day 11 hrs ago0x3f6b1d01b6823ab235fc343069b62b6472774cd1 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0 CRO0.2188472825330
0x01c51bc414a0b4b1c8329416a50e40e46360688afb9890cfe632a2f12863615fRegister58384212022-12-03 0:50:301 day 21 hrs ago0xd797df886f488950dc996a5e072ee6059379dae5 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b168.146375356827972 CRO1.7819466430920
0x6b78ac67ad380ca8b3b936ce0925345e36a78b19d3e52b5ff5360e2bd5c3891fCommit58384042022-12-03 0:48:531 day 21 hrs ago0xd797df886f488950dc996a5e072ee6059379dae5 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0 CRO0.2188610963210
0x4028c0fa3c668db353ed782f333a4b3c9016d36a564d97cc5e3c8c35bd4bd4f7Register58362522022-12-02 21:24:522 days 1 hr ago0x91f06e2008f54188b3a514caf17fbb16e164a84c IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b167.964833808667596 CRO1.7774306754280
0xb3173d18b6b015629be10767749d6f8406eb2fab84356df09c7005a76e39d625Commit58362382022-12-02 21:23:332 days 1 hr ago0x91f06e2008f54188b3a514caf17fbb16e164a84c IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0 CRO0.218865555420
0xe6ed4cc138111baf5fe00e3fba01788524038dafdf18db1f47a384a61fc6acd2Register58315532022-12-02 13:59:342 days 8 hrs ago0x8360400dbfcef35f173a61414c40f7b3faf30a39 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b169.165048543455745 CRO1.7874361318970
0xcbb95f11fe3c00aa7131d21c8beb5c9af228bdd5fdf41ddcd01cf13e5dc83b96Commit58315342022-12-02 13:57:472 days 8 hrs ago0x8360400dbfcef35f173a61414c40f7b3faf30a39 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0 CRO0.218816864320
0xc8490c74f67f89887fb563f7145f5cf26b64f1c00c964bd0bf64a8a46e10748dRegister58279482022-12-02 8:18:282 days 14 hrs ago0x636f1fa87e01e080e3043da11aaa7c889a8bb004 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b168.328309760954689 CRO1.7952216655390
0x99520c4acc91a2f1c148d85cf1f1cd352f8f1b1a34f8b7c0da9264cf70f5ed6cCommit58279332022-12-02 8:17:032 days 14 hrs ago0x636f1fa87e01e080e3043da11aaa7c889a8bb004 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0 CRO0.2188827598120
0xd07e1110bfc8756d20167f25b62cc9a555a5f1e4d70013d233dae513da6e53d9Commit58261282022-12-02 5:26:242 days 17 hrs ago0x7dbd7f0a3b64bf8c5e63e124254b662434be0b82 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0 CRO0.2188865595920
0x15733d5c936de98224c4f61bd56d9802d6ccadfc0979942a61b3c0b9ffeea59cRegister58217172022-12-01 22:28:593 days 15 mins ago0xc0d25a43e39f59937581c36fa75b755909c14ab8 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b166.437414030031539 CRO1.4470484502230
0xc2d033d8eb79c072c23ce82efffc2558e97efda9d70d9ab1bfc6ba588cc98900Commit58216982022-12-01 22:27:113 days 17 mins ago0xc0d25a43e39f59937581c36fa75b755909c14ab8 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0 CRO0.2188957504510
0x0ff990147ecf65ae118a627430bd222d6191687f17f43ec3398caa2ba05024daRegister58170642022-12-01 15:07:583 days 7 hrs ago0xb4544f9ca8f7b0840fba89dd818a769f1068da1f IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b167.050161067417757 CRO1.4379761863810
0x0bffbbf1662322082606c519086d8f184dfd92deeab3df6c2f2cb15598731a5dCommit58170502022-12-01 15:06:393 days 7 hrs ago0xb4544f9ca8f7b0840fba89dd818a769f1068da1f IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0 CRO0.2189052935730
0x480d4feaeeb69cbf64f12b667e9a220f457a14f9cf9f74ae57d877d3a12d2bc4Renew58132582022-12-01 9:08:443 days 13 hrs ago0x815b7d3e83dc78edae840c7c2bb0f94c82596705 IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b25 CRO0.40232421704 4,865.628418496
0x2fa8459718634f1aae69222f2d09ba034fb063b4e579c0fbaa5d63d6555fb11aRegister58117012022-12-01 6:41:513 days 16 hrs ago0xe1a27375e1b47dac5c213f9f85dc4b1fba80d88d IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b167.435424354012356 CRO1.626789933250
0x41bc4bb6c925ff877719dcc782a507ce317a6ce0988662cb8e839aa7053b2edaCommit58116862022-12-01 6:40:273 days 16 hrs ago0xe1a27375e1b47dac5c213f9f85dc4b1fba80d88d IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0 CRO0.2189164251780
0xd97fae0705d968a20fcfe243fa0a6ea82f4d82d9e778a9c42949571010cb4b60Register58098792022-12-01 3:49:583 days 18 hrs ago0x03b7d1c39267deceb7e481514079fc03d0a6ccfb IN  0xaff2b5cf1950e8fb22907ccd643728a5dc75278b166.704936853960407 CRO1.4492925383020
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xa46c7e0088466b9f2138881246208104ca9869339d37f45d9742797796f8065858564312022-12-04 5:14:0217 hrs 30 mins ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0x65a1e865e654aff19322460bf71c0eca67b1199121.580381471359848683 CRO
0x86a35505ab652c20fd6690240c807c4f830ff0619fd758657428031cfa5a3d4e58513542022-12-03 21:15:501 day 1 hr ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0x46fc63d1af24611ab81f9782ad8b4d4d76a153f621.637655140084088388 CRO
0xe32a90cec05a7539a54565f9136c2d6b1f9e287b7c5b234f2e3734a275d67dbd58499262022-12-03 19:01:181 day 3 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0x01e7d7edb9c95c2cfb1f2ec836f3a81fda2751a215.433782835741414894 CRO
0x0b646809470fc58eadbd3ec4b877e062529254b028a92af987733f2b6855ebe158450242022-12-03 11:16:211 day 11 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0x3f6b1d01b6823ab235fc343069b62b6472774cd115.412158480557843206 CRO
0x01c51bc414a0b4b1c8329416a50e40e46360688afb9890cfe632a2f12863615f58384212022-12-03 0:50:301 day 21 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0xd797df886f488950dc996a5e072ee6059379dae515.286034123347997504 CRO
0x4028c0fa3c668db353ed782f333a4b3c9016d36a564d97cc5e3c8c35bd4bd4f758362522022-12-02 21:24:522 days 1 hr ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0x91f06e2008f54188b3a514caf17fbb16e164a84c15.269530346242508805 CRO
0xe6ed4cc138111baf5fe00e3fba01788524038dafdf18db1f47a384a61fc6acd258315532022-12-02 13:59:342 days 8 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0x8360400dbfcef35f173a61414c40f7b3faf30a3915.378640776677795081 CRO
0xc8490c74f67f89887fb563f7145f5cf26b64f1c00c964bd0bf64a8a46e10748d58279482022-12-02 8:18:282 days 14 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0x636f1fa87e01e080e3043da11aaa7c889a8bb00415.302573614632244507 CRO
0x15733d5c936de98224c4f61bd56d9802d6ccadfc0979942a61b3c0b9ffeea59c58217172022-12-01 22:28:593 days 15 mins ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0xc0d25a43e39f59937581c36fa75b755909c14ab815.130674002730139972 CRO
0x0ff990147ecf65ae118a627430bd222d6191687f17f43ec3398caa2ba05024da58170642022-12-01 15:07:583 days 7 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0xb4544f9ca8f7b0840fba89dd818a769f1068da1f15.186378278856159815 CRO
0x480d4feaeeb69cbf64f12b667e9a220f457a14f9cf9f74ae57d877d3a12d2bc458132582022-12-01 9:08:443 days 13 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0x815b7d3e83dc78edae840c7c2bb0f94c8259670513.301382314664101735 CRO
0x2fa8459718634f1aae69222f2d09ba034fb063b4e579c0fbaa5d63d6555fb11a58117012022-12-01 6:41:513 days 16 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0xe1a27375e1b47dac5c213f9f85dc4b1fba80d88d15.221402214001123284 CRO
0xd97fae0705d968a20fcfe243fa0a6ea82f4d82d9e778a9c42949571010cb4b6058098792022-12-01 3:49:583 days 18 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0x03b7d1c39267deceb7e481514079fc03d0a6ccfb15.154994259450946167 CRO
0x7c540ddad2e32fa9ee3e99b7f8b63b22370171f11015328d3e1685f1ce0dcc8a58053562022-11-30 20:41:274 days 2 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0xd85a78196eea58a3486c5a07ead96fe7bedec1a732.063541024014950996 CRO
0x1bfec81fa9a866a37e830f2fbace0e9ad4a6cbdcde0d502eac2a57265dc3813558032572022-11-30 17:23:004 days 5 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0xb94c15225e563c7f1684536d5686465c20245f9a15.474794841713685946 CRO
0x3be5643ffbe48af0d95ad98cb5f05b7a6742b4507b468d0e43cab9234be48eca58029762022-11-30 16:56:264 days 5 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0xf355e4a14bda04de72e839baf864217caf17ca7515.438596491206753347 CRO
0x42ad676f8fd19f1790f37daec20b90498c7997782af2f76c47a23b81afdd248958024162022-11-30 16:03:284 days 6 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0xce689bbbabd31e15b40712fac8969a004c711e8e15.433782835741414894 CRO
0x8f662a515b297c97cb9e43c0230fb8b8b4244452725843107176ff0da7af034d58022252022-11-30 15:45:284 days 6 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0xb3901630196d79e5259a4d2269e26fc36976debc21.63090128752378122 CRO
0x26bc5345d904a14c704397d684641d631953aae8ce4aba7cad83b69b963be40858013532022-11-30 14:23:034 days 8 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0xa4c52a36d49dee5f90e4462dd9db82f77bd1e21515.409759514337817081 CRO
0x347da4d56d5cf7d4a51e9dc094a5a74775d8486a1035ca5463f47cabd076746a58011172022-11-30 14:00:394 days 8 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0x20498949eb40f84529491260751a88450974c13615.407361294819594714 CRO
0x218f3acded01817aed3e4b3314e622eecae5f1e617e440e9956800ac2efbc0f558008202022-11-30 13:32:344 days 9 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0xeb0d592015807e80ad0bed66f2f6c9dbf6d381ba32.262569832357688122 CRO
0xe0e43054c33f38fea716e7be11d1304e8f0b5edbae220223746623b7a8e489fb58007882022-11-30 13:29:334 days 9 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0x1724911394b49265f5a39560b988131b13eaa36b45.007717802597167535 CRO
0x69d9520b1cd1f81d9dd29925569ab24d8bddb87621f4f2b531aa77cc6355449358007282022-11-30 13:23:534 days 9 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0xa546af6db6fb9fecdbe7528f2db2504e8a8ce64621.598877980334833749 CRO
0x517330de06d72de335abf6ae0c6ff4f020151ff60665d939db780091d17fb60957998672022-11-30 12:02:204 days 10 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0x1e4b6b923bf2dfd577474ce0da79e87848b8f4dd21.488372092993585762 CRO
0x785dbe42d303375e332c8f429c2e94790a99f22198053d91e4af64d5e003494f57988402022-11-30 10:25:204 days 12 hrs ago 0xaff2b5cf1950e8fb22907ccd643728a5dc75278b0xee30b3772cb6c76169a9a99752aa42bbe932f34415.366705471457245764 CRO
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CRORegistrarController

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 38 : CRORegistrarController.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import "./IBaseRegistrar.sol";
import "./ICRORegistrarController.sol";
import "../oracles/IPriceOracle.sol";
import "../registrars/ReverseRegistrar.sol";
import "../utils/StringUtils.sol";
import "../utils/Blocklist.sol";

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/utils/Address.sol";

/**
 * @dev A registrar controller for registering and renewing names at fixed cost.
 */
contract CRORegistrarController is Ownable, ICRORegistrarController {
    using StringUtils for *;
    using Address for address;

    uint256 public constant MIN_REGISTRATION_DURATION = 28 days;
    string private constant CRO_LABEL = "cro";
    bytes32 private constant CRO_NODE =
        0x5dfacd0a0764eb7c9351dcd36f63cb5e2757014aa2592f976462be5c38ce9ca8;

    IBaseRegistrar public immutable registrar;

    ReverseRegistrar public reverseRegistrar;
    IPriceOracle public priceOracle;
    Blocklist public blocklist;

    uint256 public immutable minCommitmentAge;
    uint256 public immutable maxCommitmentAge;

    mapping(bytes32 => uint256) public commitments;

    event NameRegistered(
        string name,
        bytes32 indexed label,
        address indexed owner,
        uint256 baseCost,
        uint256 premium,
        uint256 expires
    );

    event NameRenewed(
        string name,
        bytes32 indexed label,
        uint256 cost,
        uint256 expires
    );

    event ReverseRegistrarChanged(address indexed reverseRegistrar);

    event PriceOracleChanged(address indexed priceOracle);

    event BlocklistChanged(address indexed blocklist);

    constructor(
        IBaseRegistrar _registrar,
        IPriceOracle _priceOracle,
        ReverseRegistrar _reverseRegistrar,
        uint256 _minCommitmentAge,
        uint256 _maxCommitmentAge
    ) {
        require(_maxCommitmentAge > _minCommitmentAge);

        registrar = _registrar;
        priceOracle = _priceOracle;
        reverseRegistrar = _reverseRegistrar;
        minCommitmentAge = _minCommitmentAge;
        maxCommitmentAge = _maxCommitmentAge;
    }

    function rentPrice(string memory name, uint256 duration)
        public
        view
        override
        returns (IPriceOracle.Price memory price)
    {
        bytes32 label = keccak256(bytes(name));
        price = priceOracle.price(
            name,
            registrar.nameExpires(uint256(label)),
            duration
        );
    }

    function valid(string memory name) public view returns (bool) {
        if (name.strlen() < 5) {
            return false;
        }

        if (address(blocklist) != address(0)) {
            if (blocklist.hasName(name, msg.sender)) {
                return false;
            }
        }

        return true;
    }

    function available(string memory name) public view override returns (bool) {
        bytes32 label = keccak256(bytes(name));
        return valid(name) && registrar.available(uint256(label));
    }

    function makeCommitment(
        string memory name,
        address owner,
        uint256 duration,
        bytes32 secret,
        address resolver,
        bytes[] calldata data,
        bool reverseRecord
    ) public pure override returns (bytes32) {
        bytes32 label = keccak256(bytes(name));
        if (data.length > 0) {
            require(
                resolver != address(0),
                "CRORegistrarController: resolver is required when data is supplied"
            );
        }
        return
            keccak256(
                abi.encode(
                    label,
                    owner,
                    duration,
                    resolver,
                    data,
                    secret,
                    reverseRecord
                )
            );
    }

    function commit(bytes32 commitment) public override {
        require(commitments[commitment] + maxCommitmentAge < block.timestamp);
        commitments[commitment] = block.timestamp;
    }

    function register(
        string calldata name,
        address owner,
        uint256 duration,
        bytes32 secret,
        address resolver,
        bytes[] calldata data,
        bool reverseRecord
    ) public payable override {
        bytes32 label = keccak256(bytes(name));
        IPriceOracle.Price memory price = rentPrice(name, duration);
        require(
            msg.value >= (price.base + price.premium),
            "CRORegistrarController: Not enough CRO provided"
        );

        _consumeCommitment(
            name,
            duration,
            makeCommitment(
                name,
                owner,
                duration,
                secret,
                resolver,
                data,
                reverseRecord
            )
        );

        uint256 expires = registrar.registerExtra(uint256(label), owner, duration, resolver, uint64(0));

        _setRecords(resolver, label, data);

        if (reverseRecord) {
            _setReverseRecord(name, resolver, msg.sender);
        }

        emit NameRegistered(
            name,
            label,
            owner,
            price.base,
            price.premium,
            expires
        );

        if (msg.value > (price.base + price.premium)) {
            payable(msg.sender).transfer(
                msg.value - (price.base + price.premium)
            );
        }
    }

    function renew(string calldata name, uint256 duration)
        external
        payable
        override
    {
        bytes32 label = keccak256(bytes(name));
        IPriceOracle.Price memory price = rentPrice(name, duration);
        require(
            msg.value >= price.base,
            "CRORegistrarController: Not enough CRO provided for renewal"
        );

        uint256 expires = registrar.renew(uint256(label), duration);

        if (msg.value > price.base) {
            payable(msg.sender).transfer(msg.value - price.base);
        }

        emit NameRenewed(name, label, price.base, expires);
    }

    function withdraw() public {
        payable(owner()).transfer(address(this).balance);
    }

    function setReverseRegistrar(address _reverseRegistrar) external onlyOwner {
        reverseRegistrar = ReverseRegistrar(_reverseRegistrar);
        emit ReverseRegistrarChanged(_reverseRegistrar);
    }

    function setPriceOracle(address _priceOracle) external onlyOwner {
        priceOracle = IPriceOracle(_priceOracle);
        emit PriceOracleChanged(_priceOracle);
    }

    function setBlocklist(address _blocklist) external onlyOwner {
        blocklist = Blocklist(_blocklist);
        emit BlocklistChanged(_blocklist);
    }

    function supportsInterface(bytes4 interfaceID)
        external
        pure
        returns (bool)
    {
        return
            interfaceID == type(IERC165).interfaceId ||
            interfaceID == type(ICRORegistrarController).interfaceId;
    }

    /* Internal functions */

    function _consumeCommitment(
        string memory name,
        uint256 duration,
        bytes32 commitment
    ) internal {
        // Require a valid commitment (is old enough and is committed)
        require(
            commitments[commitment] + minCommitmentAge <= block.timestamp,
            "CRORegistrarController: Commitment is not valid"
        );

        // If the commitment is too old, or the name is registered, stop
        require(
            commitments[commitment] + maxCommitmentAge > block.timestamp,
            "CRORegistrarController: Commitment has expired"
        );
        require(available(name), "CRORegistrarController: Name is unavailable");

        delete commitments[commitment];

        require(duration >= MIN_REGISTRATION_DURATION);
    }

    function _setRecords(
        address resolver,
        bytes32 label,
        bytes[] calldata data
    ) internal {
        bytes32 nodehash = keccak256(abi.encodePacked(CRO_NODE, label));
        for (uint256 i = 0; i < data.length; i++) {
            // check first few bytes are namehash
            bytes32 txNamehash = bytes32(data[i][4:36]);
            require(
                txNamehash == nodehash,
                "CRORegistrarController: Namehash on record do not match the name being registered"
            );
            resolver.functionCall(
                data[i],
                "CRORegistrarController: Failed to set Record"
            );
        }
    }

    function _setReverseRecord(
        string memory name,
        address resolver,
        address owner
    ) internal {
        reverseRegistrar.setNameForAddr(
            msg.sender,
            owner,
            resolver,
            string.concat(name, ".", CRO_LABEL)
        );
    }
}

File 2 of 38 : ICRORegistrarController.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import "../oracles/IPriceOracle.sol";

interface ICRORegistrarController {
    function rentPrice(string memory, uint256)
        external
        returns (IPriceOracle.Price memory);

    function available(string memory) external returns (bool);

    function makeCommitment(
        string memory,
        address,
        uint256,
        bytes32,
        address,
        bytes[] calldata,
        bool
    ) external returns (bytes32);

    function commit(bytes32) external;

    function register(
        string calldata,
        address,
        uint256,
        bytes32,
        address,
        bytes[] calldata,
        bool
    ) external payable;

    function renew(string calldata, uint256) external payable;
}

File 3 of 38 : IBaseRegistrar.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

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

interface IBaseRegistrar is IERC721 {
    event ControllerAdded(address indexed controller);
    event ControllerRemoved(address indexed controller);
    event NameMigrated(
        uint256 indexed id,
        address indexed owner,
        uint256 expires
    );
    event NameRegistered(
        uint256 indexed id,
        address indexed owner,
        uint256 expires
    );
    event NameRenewed(uint256 indexed id, uint256 expires);

    // Authorises a controller, who can register and renew domains.
    function addController(address controller) external;

    // Revoke controller permission for an address.
    function removeController(address controller) external;

    // Set the resolver for the TLD this registrar manages.
    function setResolver(address resolver) external;

    // Returns the expiration timestamp of the specified label hash.
    function nameExpires(uint256 id) external view returns (uint256);

    // Returns true iff the specified name is available for registration.
    function available(uint256 id) external view returns (bool);

    /**
     * @dev Register a name.
     */
    function register(
        uint256 id,
        address owner,
        uint256 duration
    ) external returns (uint256);

    /**
     * @dev Register a name only.
     */
    function registerOnly(
        uint256 id,
        address owner,
        uint256 duration
    ) external returns (uint256);

    /**
     * @dev Register a name with extra parameters, resolver and ttl.
     */
    function registerExtra(
        uint256 id,
        address owner,
        uint256 duration,
        address resolver,
        uint64 ttl
    ) external returns (uint256);

    function renew(uint256 id, uint256 duration) external returns (uint256);

    /**
     * @dev Reclaim ownership of a name in CROID, if you own it in the registrar.
     */
    function reclaim(uint256 id, address owner) external;
}

File 4 of 38 : IPriceOracle.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface IPriceOracle {
    struct Price {
        uint256 base;
        uint256 premium;
    }

    /**
     * @dev Returns the price to register or renew a name.
     * @param name The name being registered or renewed.
     * @param expires When the name presently expires (0 if this is a new registration).
     * @param duration How long the name is being registered or extended for, in seconds.
     * @return base premium tuple of base price + premium price
     */
    function price(
        string calldata name,
        uint256 expires,
        uint256 duration
    ) external view returns (Price calldata);
}

File 5 of 38 : ReverseRegistrar.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import "../CROID.sol";
import "./IReverseRegistrar.sol";
import "../resolvers/IResolver.sol";
import "../utils/Controllable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

bytes32 constant lookup = 0x3031323334353637383961626364656600000000000000000000000000000000;

// namehash('addr.reverse')
bytes32 constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;

contract ReverseRegistrar is Ownable, Controllable, IReverseRegistrar {
    CROID public immutable croid;
    IResolver public defaultResolver;

    event ReverseClaimed(address indexed addr, bytes32 indexed node);

    event ResolverChanged(address indexed resolver);

    /**
     * @dev Constructor
     * @param _croid The address of the CROID registry.
     */
    constructor(CROID _croid) {
        croid = _croid;

        // Assign ownership of the reverse record to our deployer
        ReverseRegistrar oldRegistrar = ReverseRegistrar(
            _croid.owner(ADDR_REVERSE_NODE)
        );
        if (address(oldRegistrar) != address(0x0)) {
            oldRegistrar.claim(msg.sender);
        }
    }

    modifier authorised(address addr) {
        require(
            addr == msg.sender ||
                controllers[msg.sender] ||
                croid.isApprovedForAll(addr, msg.sender) ||
                ownsContract(addr),
            "ReverseRegistrar: Caller is not a controller or authorised by address or the address itself"
        );
        _;
    }

    function setDefaultResolver(address resolver) public override onlyOwner {
        require(
            address(resolver) != address(0),
            "ReverseRegistrar: Resolver address must not be 0"
        );
        defaultResolver = IResolver(resolver);
        emit ResolverChanged(resolver);
    }

    /**
     * @dev Transfers ownership of the reverse CROID record associated with the
     *      calling account.
     * @param owner The address to set as the owner of the reverse record in CROID.
     * @return The CROID node hash of the reverse record.
     */
    function claim(address owner) public override returns (bytes32) {
        return claimForAddr(msg.sender, owner, address(defaultResolver));
    }

    /**
     * @dev Transfers ownership of the reverse CROID record associated with the
     *      calling account.
     * @param addr The reverse record to set
     * @param owner The address to set as the owner of the reverse record in CROID.
     * @return The CROID node hash of the reverse record.
     */
    function claimForAddr(
        address addr,
        address owner,
        address resolver
    ) public override authorised(addr) returns (bytes32) {
        bytes32 labelHash = sha3HexAddress(addr);
        bytes32 reverseNode = keccak256(
            abi.encodePacked(ADDR_REVERSE_NODE, labelHash)
        );
        emit ReverseClaimed(addr, reverseNode);
        croid.setSubnodeRecord(ADDR_REVERSE_NODE, labelHash, owner, resolver, 0);
        return reverseNode;
    }

    /**
     * @dev Transfers ownership of the reverse CROID record associated with the
     *      calling account.
     * @param owner The address to set as the owner of the reverse record in CROID.
     * @param resolver The address of the resolver to set; 0 to leave unchanged.
     * @return The CROID node hash of the reverse record.
     */
    function claimWithResolver(address owner, address resolver)
        public
        override
        returns (bytes32)
    {
        return claimForAddr(msg.sender, owner, resolver);
    }

    /**
     * @dev Sets the `name()` record for the reverse CROID record associated with
     * the calling account. First updates the resolver to the default reverse
     * resolver if necessary.
     * @param name The name to set for this address.
     * @return The CROID node hash of the reverse record.
     */
    function setName(string memory name) public override returns (bytes32) {
        return
            setNameForAddr(
                msg.sender,
                msg.sender,
                address(defaultResolver),
                name
            );
    }

    function setNameOnly(
        address addr,
        address resolver,
        string memory name
    ) external override authorised(addr) returns (bytes32) {
        if (resolver == address(0x0)) {
            resolver = address(defaultResolver);
        }

        bytes32 reverseNode = node(addr);
        IResolver(resolver).setName(reverseNode, name);
        return reverseNode;
    }

    /**
     * @dev Sets the `name()` record for the reverse CROID record associated with
     * the account provided. First updates the resolver to the default reverse
     * resolver if necessary.
     * Only callable by controllers and authorised users
     * @param addr The reverse record to set
     * @param owner The owner of the reverse node
     * @param name The name to set for this address.
     * @return The CROID node hash of the reverse record.
     */
    function setNameForAddr(
        address addr,
        address owner,
        address resolver,
        string memory name
    ) public override returns (bytes32) {
        if (resolver == address(0x0)) {
            resolver = address(defaultResolver);
        }

        bytes32 reverseNode = claimForAddr(addr, owner, resolver);
        IResolver(resolver).setName(reverseNode, name);
        return reverseNode;
    }

    /**
     * @dev Returns the node hash for a given account's reverse records.
     * @param addr The address to hash
     * @return The CROID node hash.
     */
    function node(address addr) public pure override returns (bytes32) {
        return
            keccak256(
                abi.encodePacked(ADDR_REVERSE_NODE, sha3HexAddress(addr))
            );
    }

    /**
     * @dev An optimised function to compute the sha3 of the lower-case
     *      hexadecimal representation of an Cronos address.
     * @param addr The address to hash
     * @return ret The SHA3 hash of the lower-case hexadecimal encoding of the
     *         input address.
     */
    function sha3HexAddress(address addr) private pure returns (bytes32 ret) {
        assembly {
            for {
                let i := 40
            } gt(i, 0) {

            } {
                i := sub(i, 1)
                mstore8(i, byte(and(addr, 0xf), lookup))
                addr := div(addr, 0x10)
                i := sub(i, 1)
                mstore8(i, byte(and(addr, 0xf), lookup))
                addr := div(addr, 0x10)
            }

            ret := keccak256(0, 40)
        }
    }

    function ownsContract(address addr) internal view returns (bool) {
        try Ownable(addr).owner() returns (address owner) {
            return owner == msg.sender;
        } catch {
            return false;
        }
    }
}

File 6 of 38 : StringUtils.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

library StringUtils {
    /**
     * @dev Returns the length of a given string
     *
     * @param s The string to measure the length of
     * @return The length of the input string
     */
    function strlen(string memory s) internal pure returns (uint) {
        uint len;
        uint i = 0;
        uint bytelength = bytes(s).length;
        for(len = 0; i < bytelength; len++) {
            bytes1 b = bytes(s)[i];
            if(b < 0x80) {
                i += 1;
            } else if (b < 0xE0) {
                i += 2;
            } else if (b < 0xF0) {
                i += 3;
            } else if (b < 0xF8) {
                i += 4;
            } else if (b < 0xFC) {
                i += 5;
            } else {
                i += 6;
            }
        }
        return len;
    }

    function toLower(string memory s) internal pure returns (string memory) {
        bytes memory bstr = bytes(s);
        bytes memory blower = new bytes(bstr.length);
        for (uint i = 0; i < bstr.length; i++) {
            if ((uint8(bstr[i]) >= 65) && (uint8(bstr[i]) <= 90)) {
                blower[i] = bytes1(uint8(bstr[i]) + 32);
            } else {
                blower[i] = bstr[i];
            }
        }
        return string(blower);
    }

    function toUpper(string memory s) internal pure returns (string memory) {
        bytes memory bstr = bytes(s);
        bytes memory bupper = new bytes(bstr.length);
        for (uint i = 0; i < bstr.length; i++) {
            if ((uint8(bstr[i]) >= 97) && (uint8(bstr[i]) <= 122)) {
                bupper[i] = bytes1(uint8(bstr[i]) - 32);
            } else {
                bupper[i] = bstr[i];
            }
        }
        return string(bupper);
    }
}

File 7 of 38 : Blocklist.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "../utils/StringUtils.sol";

contract Blocklist is UUPSUpgradeable, OwnableUpgradeable {
    using StringUtils for *;

    bool public enabled;
    mapping(bytes32 => bool) private _list;
    mapping(address => mapping(bytes32 => bool)) private _allows;

    event EnabledChange(bool enabled);

    function initialize() initializer public {
        __Ownable_init();
        __UUPSUpgradeable_init();

        enabled = true;
    }

    function has(bytes32 label, address user) public view returns (bool) {
        if (enabled != true) {
            return false;
        }

        if (_list[label] != true) {
            return false;
        }

        if (user == address(0)) {
            user = msg.sender;
        }

        // allow target users
        if (_allows[user][label] == true) {
            return false;
        }

        return true;
    }

    function hasName(string memory name, address user) public view returns (bool) {
        // if all chars are from ASCII
        if (name.strlen() == bytes(name).length) {
            name = name.toLower();
        }

        return has(keccak256(bytes(name)), user);
    }

    function update(bytes32 label, bool blocked) external onlyOwner() {
        _list[label] = blocked;
    }

    function batchUpdate(bytes32[] calldata labels, bool blocked) external onlyOwner() {
        for (uint i = 0; i < labels.length; i++) {
            _list[labels[i]] = blocked;
        }
    }

    function batchDelete(bytes32[] calldata labels) external onlyOwner() {
        for (uint i = 0; i < labels.length; i++) {
            delete _list[labels[i]];
        }
    }

    function allowed(address user, bytes32 label) public view returns (bool) {
        return _allows[user][label];
    }

    function allow(address user, bytes32[] calldata labels) external onlyOwner() {
        for (uint i = 0; i < labels.length; i++) {
            _allows[user][labels[i]] = true;
        }
    }

    function disallow(address user, bytes32[] calldata labels) external onlyOwner() {
        for (uint i = 0; i < labels.length; i++) {
            delete _allows[user][labels[i]];
        }
    }

    function batchAllow(address[] calldata users, bytes32[] calldata labels) external onlyOwner() {
        for (uint i = 0; i < users.length; i++) {
            _allows[users[i]][labels[i]] = true;
        }
    }

    function batchDisallow(address[] calldata users, bytes32[] calldata labels) external onlyOwner() {
        for (uint i = 0; i < users.length; i++) {
            delete _allows[users[i]][labels[i]];
        }
    }

    function enable() external onlyOwner() {
        enabled = true;
        emit EnabledChange(enabled);
    }

    function disable() external onlyOwner() {
        enabled = false;
        emit EnabledChange(enabled);
    }

    function _authorizeUpgrade(address) internal override onlyOwner {}
}

File 8 of 38 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

File 9 of 38 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev 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) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 10 of 38 : 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 11 of 38 : CROID.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface CROID {
    // 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
    );

    function setRecord(
        bytes32 node,
        address owner,
        address resolver,
        uint64 ttl
    ) external;

    function setSubnodeRecord(
        bytes32 node,
        bytes32 label,
        address owner,
        address resolver,
        uint64 ttl
    ) external;

    function setSubnodeOwner(
        bytes32 node,
        bytes32 label,
        address owner
    ) external returns (bytes32);

    function setResolver(bytes32 node, address resolver) external;

    function setOwner(bytes32 node, 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 recordExists(bytes32 node) external view returns (bool);

    function isApprovedForAll(address owner, address operator)
        external
        view
        returns (bool);
}

File 12 of 38 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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 be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 13 of 38 : IResolver.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "./profiles/IABIResolver.sol";
import "./profiles/IAddressResolver.sol";
import "./profiles/IAddrResolver.sol";
import "./profiles/IContentHashResolver.sol";
import "./profiles/IDNSRecordResolver.sol";
import "./profiles/IDNSZoneResolver.sol";
import "./profiles/IInterfaceResolver.sol";
import "./profiles/INameResolver.sol";
import "./profiles/IPubkeyResolver.sol";
import "./profiles/ITextResolver.sol";
import "./profiles/IExtendedResolver.sol";

/**
 * A generic resolver interface which includes all the functions including the ones deprecated
 */
interface IResolver is
    IERC165,
    IABIResolver,
    IAddressResolver,
    IAddrResolver,
    IContentHashResolver,
    IDNSRecordResolver,
    IDNSZoneResolver,
    IInterfaceResolver,
    INameResolver,
    IPubkeyResolver,
    ITextResolver,
    IExtendedResolver
{
    /* Deprecated events */
    event ContentChanged(bytes32 indexed node, bytes32 hash);

    function setABI(
        bytes32 node,
        uint256 contentType,
        bytes calldata data
    ) external;

    function setAddr(bytes32 node, address addr) external;

    function setAddr(
        bytes32 node,
        uint256 coinType,
        bytes calldata a
    ) external;

    function setContenthash(bytes32 node, bytes calldata hash) external;

    function setDnsrr(bytes32 node, bytes calldata data) external;

    function setName(bytes32 node, string calldata _name) external;

    function setPubkey(
        bytes32 node,
        bytes32 x,
        bytes32 y
    ) external;

    function setText(
        bytes32 node,
        string calldata key,
        string calldata value
    ) external;

    function setInterface(
        bytes32 node,
        bytes4 interfaceID,
        address implementer
    ) external;

    function multicall(bytes[] calldata data)
        external
        returns (bytes[] memory results);

    /* Deprecated functions */
    function content(bytes32 node) external view returns (bytes32);

    function multihash(bytes32 node) external view returns (bytes memory);

    function setContent(bytes32 node, bytes32 hash) external;

    function setMultihash(bytes32 node, bytes calldata hash) external;
}

File 14 of 38 : IReverseRegistrar.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface IReverseRegistrar {
    function setDefaultResolver(address resolver) external;

    function claim(address owner) external returns (bytes32);

    function claimForAddr(
        address addr,
        address owner,
        address resolver
    ) external returns (bytes32);

    function claimWithResolver(address owner, address resolver)
        external
        returns (bytes32);

    function setName(string memory name) external returns (bytes32);

    function setNameOnly(
        address addr,
        address resolver,
        string memory name
    ) external returns (bytes32);

    function setNameForAddr(
        address addr,
        address owner,
        address resolver,
        string memory name
    ) external returns (bytes32);

    function node(address addr) external pure returns (bytes32);
}

File 15 of 38 : Controllable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/access/Ownable.sol";

contract Controllable is Ownable {
    mapping(address => bool) public controllers;

    event ControllerChanged(address indexed controller, bool enabled);

    modifier onlyController {
        require(
            controllers[msg.sender],
            "Controllable: Caller is not a controller"
        );
        _;
    }

    function setController(address controller, bool enabled) public onlyOwner {
        controllers[controller] = enabled;
        emit ControllerChanged(controller, enabled);
    }
}

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

interface IContentHashResolver {
    event ContenthashChanged(bytes32 indexed node, bytes hash);

    /**
     * Returns the contenthash associated with an CROID node.
     * @param node The CROID node to query.
     * @return The associated contenthash.
     */
    function contenthash(bytes32 node) external view returns (bytes memory);
}

File 17 of 38 : IABIResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import "./IABIResolver.sol";
import "../ResolverBase.sol";

interface IABIResolver {
    event ABIChanged(bytes32 indexed node, uint256 indexed contentType);
    /**
     * Returns the ABI associated with an CROID node.
     * Defined in EIP205.
     * @param node The CROID node to query
     * @param contentTypes A bitwise OR of the ABI formats accepted by the caller.
     * @return contentType The content type of the return value
     * @return data The ABI data
     */
    function ABI(bytes32 node, uint256 contentTypes) external view returns (uint256, bytes memory);
}

File 18 of 38 : IAddressResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

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

    /**
     * Returns the address associated with an CROID node.
     * @param node The CROID node to query.
     * @param coinType The coin type from slip-0044.
     * @return The associated address in bytes.
     */
    function addr(bytes32 node, uint coinType) external view returns(bytes memory);
}

File 19 of 38 : IDNSRecordResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface IDNSRecordResolver {
    // DNSRecordChanged is emitted whenever a given node/name/resource's RRSET is updated.
    event DNSRecordChanged(bytes32 indexed node, bytes name, uint16 resource, bytes record);
    // DNSRecordDeleted is emitted whenever a given node/name/resource's RRSET is deleted.
    event DNSRecordDeleted(bytes32 indexed node, bytes name, uint16 resource);
    // DNSZoneCleared is emitted whenever a given node's zone information is cleared.
    event DNSZoneCleared(bytes32 indexed node);

    /**
     * Obtain a DNS record.
     * @param node the namehash of the node for which to fetch the record
     * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record
     * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types
     * @return the DNS record in wire format if present, otherwise empty
     */
    function dnsRecord(bytes32 node, bytes32 name, uint16 resource) external view returns (bytes memory);
}

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

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

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

File 21 of 38 : IDNSZoneResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface IDNSZoneResolver {
    // DNSZonehashChanged is emitted whenever a given node's zone hash is updated.
    event DNSZonehashChanged(bytes32 indexed node, bytes lastzonehash, bytes zonehash);

    /**
     * zonehash obtains the hash for the zone.
     * @param node The CROID node to query.
     * @return The associated contenthash.
     */
    function zonehash(bytes32 node) external view returns (bytes memory);
}

File 22 of 38 : IInterfaceResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface IInterfaceResolver {
    event InterfaceChanged(bytes32 indexed node, bytes4 indexed interfaceID, address implementer);

    /**
     * Returns the address of a contract that implements the specified interface for this name.
     * If an implementer has not been set for this interfaceID and name, the resolver will query
     * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that
     * contract implements EIP165 and returns `true` for the specified interfaceID, its address
     * will be returned.
     * @param node The CROID node to query.
     * @param interfaceID The EIP 165 interface ID to check for.
     * @return The address that implements this interface, or 0 if the interface is unsupported.
     */
    function interfaceImplementer(bytes32 node, bytes4 interfaceID) external view returns (address);
}

File 23 of 38 : INameResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

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

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

File 24 of 38 : IPubkeyResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface IPubkeyResolver {
    event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y);

    /**
     * Returns the SECP256k1 public key associated with an CROID node.
     * Defined in EIP 619.
     * @param node The CROID node to query
     * @return x The X coordinate of the curve point for the public key.
     * @return y The Y coordinate of the curve point for the public key.
     */
    function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y);
}

File 25 of 38 : ITextResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

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

    /**
     * Returns the text data associated with an CROID node and key.
     * @param node The CROID 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 returns (string memory);
}

File 26 of 38 : IExtendedResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface IExtendedResolver {
    function resolve(bytes memory name, bytes memory data)
        external
        view
        returns (bytes memory, address);
}

File 27 of 38 : ResolverBase.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

abstract contract ResolverBase is ERC165 {
    function isAuthorised(bytes32 node) internal view virtual returns (bool);

    modifier authorised(bytes32 node) {
        require(isAuthorised(node), "Unauthorised resolver operation");
        _;
    }
}

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

pragma solidity ^0.8.0;

import "./IERC165.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 ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 29 of 38 : 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 30 of 38 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

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

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

File 31 of 38 : UUPSUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/UUPSUpgradeable.sol)

pragma solidity ^0.8.0;

import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../ERC1967/ERC1967UpgradeUpgradeable.sol";
import "./Initializable.sol";

/**
 * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
 * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
 *
 * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
 * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
 * `UUPSUpgradeable` with a custom implementation of upgrades.
 *
 * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
 *
 * _Available since v4.1._
 */
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {
    function __UUPSUpgradeable_init() internal onlyInitializing {
    }

    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
    }
    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
    address private immutable __self = address(this);

    /**
     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is
     * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
     * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
     * fail.
     */
    modifier onlyProxy() {
        require(address(this) != __self, "Function must be called through delegatecall");
        require(_getImplementation() == __self, "Function must be called through active proxy");
        _;
    }

    /**
     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be
     * callable on the implementing contract but not through proxies.
     */
    modifier notDelegated() {
        require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall");
        _;
    }

    /**
     * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
     * implementation. It is used to validate that the this implementation remains valid after an upgrade.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
     */
    function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
        return _IMPLEMENTATION_SLOT;
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     */
    function upgradeTo(address newImplementation) external virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
     * encoded in `data`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     */
    function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, data, true);
    }

    /**
     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
     * {upgradeTo} and {upgradeToAndCall}.
     *
     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
     *
     * ```solidity
     * function _authorizeUpgrade(address) internal override onlyOwner {}
     * ```
     */
    function _authorizeUpgrade(address newImplementation) internal virtual;

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

File 32 of 38 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

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

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

pragma solidity ^0.8.2;

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

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

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

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

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

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

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

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

File 34 of 38 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 35 of 38 : draft-IERC1822Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)

pragma solidity ^0.8.0;

/**
 * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
 * proxy whose upgrades are fully controlled by the current implementation.
 */
interface IERC1822ProxiableUpgradeable {
    /**
     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
     * address.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy.
     */
    function proxiableUUID() external view returns (bytes32);
}

File 36 of 38 : ERC1967UpgradeUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)

pragma solidity ^0.8.2;

import "../beacon/IBeaconUpgradeable.sol";
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/StorageSlotUpgradeable.sol";
import "../utils/Initializable.sol";

/**
 * @dev This abstract contract provides getters and event emitting update functions for
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
 *
 * _Available since v4.1._
 *
 * @custom:oz-upgrades-unsafe-allow delegatecall
 */
abstract contract ERC1967UpgradeUpgradeable is Initializable {
    function __ERC1967Upgrade_init() internal onlyInitializing {
    }

    function __ERC1967Upgrade_init_unchained() internal onlyInitializing {
    }
    // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Returns the current implementation address.
     */
    function _getImplementation() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 implementation slot.
     */
    function _setImplementation(address newImplementation) private {
        require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract");
        StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
    }

    /**
     * @dev Perform implementation upgrade
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeTo(address newImplementation) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    /**
     * @dev Perform implementation upgrade with additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCall(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        _upgradeTo(newImplementation);
        if (data.length > 0 || forceCall) {
            _functionDelegateCall(newImplementation, data);
        }
    }

    /**
     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCallUUPS(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        // Upgrades from old implementations will perform a rollback test. This test requires the new
        // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
        // this special case will break upgrade paths from old UUPS implementation to new ones.
        if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {
            _setImplementation(newImplementation);
        } else {
            try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {
                require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
            } catch {
                revert("ERC1967Upgrade: new implementation is not UUPS");
            }
            _upgradeToAndCall(newImplementation, data, forceCall);
        }
    }

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Returns the current admin.
     */
    function _getAdmin() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 admin slot.
     */
    function _setAdmin(address newAdmin) private {
        require(newAdmin != address(0), "ERC1967: new admin is the zero address");
        StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {AdminChanged} event.
     */
    function _changeAdmin(address newAdmin) internal {
        emit AdminChanged(_getAdmin(), newAdmin);
        _setAdmin(newAdmin);
    }

    /**
     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
     * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
     */
    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

    /**
     * @dev Emitted when the beacon is upgraded.
     */
    event BeaconUpgraded(address indexed beacon);

    /**
     * @dev Returns the current beacon.
     */
    function _getBeacon() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;
    }

    /**
     * @dev Stores a new beacon in the EIP1967 beacon slot.
     */
    function _setBeacon(address newBeacon) private {
        require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract");
        require(
            AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),
            "ERC1967: beacon implementation is not a contract"
        );
        StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;
    }

    /**
     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
     *
     * Emits a {BeaconUpgraded} event.
     */
    function _upgradeBeaconToAndCall(
        address newBeacon,
        bytes memory data,
        bool forceCall
    ) internal {
        _setBeacon(newBeacon);
        emit BeaconUpgraded(newBeacon);
        if (data.length > 0 || forceCall) {
            _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);
        }
    }

    /**
     * @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) private returns (bytes memory) {
        require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed");
    }

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

File 37 of 38 : IBeaconUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.0;

/**
 * @dev This is the interface that {BeaconProxy} expects of its beacon.
 */
interface IBeaconUpgradeable {
    /**
     * @dev Must return an address that can be used as a delegate call target.
     *
     * {BeaconProxy} will check that this address is a contract.
     */
    function implementation() external view returns (address);
}

File 38 of 38 : StorageSlotUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._
 */
library StorageSlotUpgradeable {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"contract IBaseRegistrar","name":"_registrar","type":"address"},{"internalType":"contract IPriceOracle","name":"_priceOracle","type":"address"},{"internalType":"contract ReverseRegistrar","name":"_reverseRegistrar","type":"address"},{"internalType":"uint256","name":"_minCommitmentAge","type":"uint256"},{"internalType":"uint256","name":"_maxCommitmentAge","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"blocklist","type":"address"}],"name":"BlocklistChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":true,"internalType":"bytes32","name":"label","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"baseCost","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"premium","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expires","type":"uint256"}],"name":"NameRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":true,"internalType":"bytes32","name":"label","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"cost","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expires","type":"uint256"}],"name":"NameRenewed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"priceOracle","type":"address"}],"name":"PriceOracleChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reverseRegistrar","type":"address"}],"name":"ReverseRegistrarChanged","type":"event"},{"inputs":[],"name":"MIN_REGISTRATION_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"available","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blocklist","outputs":[{"internalType":"contract Blocklist","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitment","type":"bytes32"}],"name":"commit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"commitments","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"bytes32","name":"secret","type":"bytes32"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"bytes[]","name":"data","type":"bytes[]"},{"internalType":"bool","name":"reverseRecord","type":"bool"}],"name":"makeCommitment","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"maxCommitmentAge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minCommitmentAge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceOracle","outputs":[{"internalType":"contract IPriceOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"bytes32","name":"secret","type":"bytes32"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"bytes[]","name":"data","type":"bytes[]"},{"internalType":"bool","name":"reverseRecord","type":"bool"}],"name":"register","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"registrar","outputs":[{"internalType":"contract IBaseRegistrar","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"renew","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"rentPrice","outputs":[{"components":[{"internalType":"uint256","name":"base","type":"uint256"},{"internalType":"uint256","name":"premium","type":"uint256"}],"internalType":"struct IPriceOracle.Price","name":"price","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reverseRegistrar","outputs":[{"internalType":"contract ReverseRegistrar","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_blocklist","type":"address"}],"name":"setBlocklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_priceOracle","type":"address"}],"name":"setPriceOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_reverseRegistrar","type":"address"}],"name":"setReverseRegistrar","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"valid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040523480156200001157600080fd5b5060405162002863380380620028638339810160408190526200003491620000fa565b6200003f3362000091565b8181116200004c57600080fd5b6001600160a01b03948516608052600280546001600160a01b031990811695871695909517905560018054909416929094169190911790915560a05260c0526200015f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620000f757600080fd5b50565b600080600080600060a086880312156200011357600080fd5b85516200012081620000e1565b60208701519095506200013381620000e1565b60408701519094506200014681620000e1565b6060870151608090970151959894975095949392505050565b60805160a05160c0516126a3620001c06000396000818161047d015281816112a401526114a60152600081816103ab01526113f60152600081816102330152818161079801528181610d0801528181610fd3015261113001526126a36000f3fe6080604052600436106101805760003560e01c806383e7f6ff116100d6578063aeb8ce9b1161007f578063d64e539611610059578063d64e53961461049f578063f14fcbc8146104cc578063f2fde38b146104ec57600080fd5b8063aeb8ce9b1461042b578063aef18ae71461044b578063ce1e09c01461046b57600080fd5b80638da5cb5b116100b05780638da5cb5b146103cd5780639791c097146103f8578063acf1a8411461041857600080fd5b806383e7f6ff146103475780638a95b09f146103825780638d839ffe1461039957600080fd5b80633d4aa89e11610138578063715018a611610112578063715018a6146102d857806380869853146102ed578063839df9451461031a57600080fd5b80633d4aa89e1461026a578063530e784f14610298578063557499ba146102b857600080fd5b80632630c12f116101695780632630c12f146101cf5780632b20e397146102215780633ccfd60b1461025557600080fd5b806301ffc9a714610185578063237592e8146101ba575b600080fd5b34801561019157600080fd5b506101a56101a0366004611c6c565b61050c565b60405190151581526020015b60405180910390f35b6101cd6101c8366004611d73565b6105a5565b005b3480156101db57600080fd5b506002546101fc9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b1565b34801561022d57600080fd5b506101fc7f000000000000000000000000000000000000000000000000000000000000000081565b34801561026157600080fd5b506101cd61092e565b34801561027657600080fd5b5061028a610285366004611f07565b610978565b6040519081526020016101b1565b3480156102a457600080fd5b506101cd6102b3366004611fb9565b610a7b565b3480156102c457600080fd5b506101cd6102d3366004611fb9565b610b51565b3480156102e457600080fd5b506101cd610c27565b3480156102f957600080fd5b506001546101fc9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561032657600080fd5b5061028a610335366004611fd4565b60046020526000908152604090205481565b34801561035357600080fd5b50610367610362366004611fed565b610c9a565b604080518251815260209283015192810192909252016101b1565b34801561038e57600080fd5b5061028a6224ea0081565b3480156103a557600080fd5b5061028a7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d957600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166101fc565b34801561040457600080fd5b506101a5610413366004612032565b610dda565b6101cd610426366004612067565b610ec1565b34801561043757600080fd5b506101a5610446366004612032565b6110e7565b34801561045757600080fd5b506101cd610466366004611fb9565b6111b7565b34801561047757600080fd5b5061028a7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104ab57600080fd5b506003546101fc9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104d857600080fd5b506101cd6104e7366004611fd4565b61128d565b3480156104f857600080fd5b506101cd610507366004611fb9565b6112e6565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000148061059f57507fffffffff0000000000000000000000000000000000000000000000000000000082167f6ede619b00000000000000000000000000000000000000000000000000000000145b92915050565b600089896040516105b79291906120b3565b6040518091039020905060006106048b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c9250610c9a915050565b60208101518151919250610617916120f2565b3410156106915760405162461bcd60e51b815260206004820152602f60248201527f43524f526567697374726172436f6e74726f6c6c65723a204e6f7420656e6f7560448201527f67682043524f2070726f7669646564000000000000000000000000000000000060648201526084015b60405180910390fd5b6107338b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508961072e8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8d8d8d8d8d610978565b6113df565b6040517ffee55ef50000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8a81166024830152604482018a90528781166064830152600060848301819052917f00000000000000000000000000000000000000000000000000000000000000009091169063fee55ef59060a4016020604051808303816000875af11580156107e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610807919061210a565b9050610815878488886115dd565b831561085e5761085e8c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92503391506117c29050565b8973ffffffffffffffffffffffffffffffffffffffff16837f69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf278e8e86600001518760200151876040516108b595949392919061216c565b60405180910390a3602082015182516108ce91906120f2565b341115610920576020820151825133916108fc916108ec91906120f2565b6108f6903461219d565b6040518115909202916000818181858888f1935050505015801561091e573d6000803e3d6000fd5b505b505050505050505050505050565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116914780156108fc02929091818181858888f19350505050158015610975573d6000803e3d6000fd5b50565b875160208901206000908315610a375773ffffffffffffffffffffffffffffffffffffffff8616610a375760405162461bcd60e51b815260206004820152604260248201527f43524f526567697374726172436f6e74726f6c6c65723a207265736f6c76657260448201527f206973207265717569726564207768656e206461746120697320737570706c6960648201527f6564000000000000000000000000000000000000000000000000000000000000608482015260a401610688565b8089898888888c89604051602001610a569897969594939291906121b4565b6040516020818303038152906040528051906020012091505098975050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ae25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610688565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fb36d86785c7d32b1ad714bb705e00e93eccc37b8cf47549043e61e10908ad25190600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314610bb85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610688565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f34a80311cdc56a47d7f1767a6501ac19d9b5fcddd4197476b135e4b887c8c45090600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c8e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610688565b610c9860006118c2565b565b6040805180820190915260008082526020820152825160208401206002546040517fd6e4fa860000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff918216916350e9a7159187917f0000000000000000000000000000000000000000000000000000000000000000169063d6e4fa8690602401602060405180830381865afa158015610d4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d73919061210a565b866040518463ffffffff1660e01b8152600401610d929392919061234d565b6040805180830381865afa158015610dae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd29190612372565b949350505050565b60006005610de783611937565b1015610df557506000919050565b60035473ffffffffffffffffffffffffffffffffffffffff1615610eb9576003546040517f7621077800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690637621077890610e6b90859033906004016123c1565b602060405180830381865afa158015610e88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eac91906123f9565b15610eb957506000919050565b506001919050565b60008383604051610ed39291906120b3565b604051809103902090506000610f2085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250879250610c9a915050565b8051909150341015610f9a5760405162461bcd60e51b815260206004820152603b60248201527f43524f526567697374726172436f6e74726f6c6c65723a204e6f7420656e6f7560448201527f67682043524f2070726f766964656420666f722072656e6577616c00000000006064820152608401610688565b6040517fc475abff00000000000000000000000000000000000000000000000000000000815260048101839052602481018490526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063c475abff906044016020604051808303816000875af1158015611031573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611055919061210a565b825190915034111561109d57815133906108fc90611073903461219d565b6040518115909202916000818181858888f1935050505015801561109b573d6000803e3d6000fd5b505b827f3da24c024582931cfaf8267d8ed24d13a82a8068d5bd337d30ec45cea4e506ae87878560000151856040516110d79493929190612416565b60405180910390a2505050505050565b805160208201206000906110fa83610dda565b80156111b057506040517f96e494e8000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906396e494e890602401602060405180830381865afa15801561118c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b091906123f9565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461121e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610688565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f03198670e18c03d7739e5db8c31ba442a94bfa7e14b89a7ddf7e85fd3fa7c2d990600090a250565b60008181526004602052604090205442906112c9907f0000000000000000000000000000000000000000000000000000000000000000906120f2565b106112d357600080fd5b6000908152600460205260409020429055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461134d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610688565b73ffffffffffffffffffffffffffffffffffffffff81166113d65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610688565b610975816118c2565b600081815260046020526040902054429061141b907f0000000000000000000000000000000000000000000000000000000000000000906120f2565b111561148f5760405162461bcd60e51b815260206004820152602f60248201527f43524f526567697374726172436f6e74726f6c6c65723a20436f6d6d69746d6560448201527f6e74206973206e6f742076616c696400000000000000000000000000000000006064820152608401610688565b60008181526004602052604090205442906114cb907f0000000000000000000000000000000000000000000000000000000000000000906120f2565b1161153e5760405162461bcd60e51b815260206004820152602e60248201527f43524f526567697374726172436f6e74726f6c6c65723a20436f6d6d69746d6560448201527f6e742068617320657870697265640000000000000000000000000000000000006064820152608401610688565b611547836110e7565b6115b95760405162461bcd60e51b815260206004820152602b60248201527f43524f526567697374726172436f6e74726f6c6c65723a204e616d652069732060448201527f756e617661696c61626c650000000000000000000000000000000000000000006064820152608401610688565b6000818152600460205260408120556224ea008210156115d857600080fd5b505050565b604080517f5dfacd0a0764eb7c9351dcd36f63cb5e2757014aa2592f976462be5c38ce9ca8602082015290810184905260009060600160405160208183030381529060405280519060200120905060005b828110156117ba57600084848381811061164a5761164a61243d565b905060200281019061165c919061246c565b61166b916024916004916124d1565b611674916124fb565b90508281146117115760405162461bcd60e51b815260206004820152605160248201527f43524f526567697374726172436f6e74726f6c6c65723a204e616d656861736860448201527f206f6e207265636f726420646f206e6f74206d6174636820746865206e616d6560648201527f206265696e672072656769737465726564000000000000000000000000000000608482015260a401610688565b6117a58585848181106117265761172661243d565b9050602002810190611738919061246c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805160608101909152602c8082529092509050612642602083013973ffffffffffffffffffffffffffffffffffffffff8a169190611b3e565b505080806117b290612537565b91505061162e565b505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637a806d6b338385876040518060400160405280600381526020017f63726f000000000000000000000000000000000000000000000000000000000081525060405160200161184b92919061256f565b6040516020818303038152906040526040518563ffffffff1660e01b815260040161187994939291906125c7565b6020604051808303816000875af1158015611898573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118bc919061210a565b50505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8051600090819081905b80821015611b3557600085838151811061195d5761195d61243d565b01602001517fff000000000000000000000000000000000000000000000000000000000000001690507f80000000000000000000000000000000000000000000000000000000000000008110156119c0576119b96001846120f2565b9250611b22565b7fe0000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000082161015611a15576119b96002846120f2565b7ff0000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000082161015611a6a576119b96003846120f2565b7ff8000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000082161015611abf576119b96004846120f2565b7ffc000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000082161015611b14576119b96005846120f2565b611b1f6006846120f2565b92505b5082611b2d81612537565b935050611941565b50909392505050565b6060610dd284846000858573ffffffffffffffffffffffffffffffffffffffff85163b611bad5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610688565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611bd69190612612565b60006040518083038185875af1925050503d8060008114611c13576040519150601f19603f3d011682016040523d82523d6000602084013e611c18565b606091505b5091509150611c28828286611c33565b979650505050505050565b60608315611c425750816111b0565b825115611c525782518084602001fd5b8160405162461bcd60e51b8152600401610688919061262e565b600060208284031215611c7e57600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146111b057600080fd5b60008083601f840112611cc057600080fd5b50813567ffffffffffffffff811115611cd857600080fd5b602083019150836020828501011115611cf057600080fd5b9250929050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611d1b57600080fd5b919050565b60008083601f840112611d3257600080fd5b50813567ffffffffffffffff811115611d4a57600080fd5b6020830191508360208260051b8501011115611cf057600080fd5b801515811461097557600080fd5b600080600080600080600080600060e08a8c031215611d9157600080fd5b893567ffffffffffffffff80821115611da957600080fd5b611db58d838e01611cae565b909b509950899150611dc960208d01611cf7565b985060408c0135975060608c01359650611de560808d01611cf7565b955060a08c0135915080821115611dfb57600080fd5b50611e088c828d01611d20565b90945092505060c08a0135611e1c81611d65565b809150509295985092959850929598565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112611e6d57600080fd5b813567ffffffffffffffff80821115611e8857611e88611e2d565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611ece57611ece611e2d565b81604052838152866020858801011115611ee757600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060008060e0898b031215611f2357600080fd5b883567ffffffffffffffff80821115611f3b57600080fd5b611f478c838d01611e5c565b9950611f5560208c01611cf7565b985060408b0135975060608b01359650611f7160808c01611cf7565b955060a08b0135915080821115611f8757600080fd5b50611f948b828c01611d20565b90945092505060c0890135611fa881611d65565b809150509295985092959890939650565b600060208284031215611fcb57600080fd5b6111b082611cf7565b600060208284031215611fe657600080fd5b5035919050565b6000806040838503121561200057600080fd5b823567ffffffffffffffff81111561201757600080fd5b61202385828601611e5c565b95602094909401359450505050565b60006020828403121561204457600080fd5b813567ffffffffffffffff81111561205b57600080fd5b610dd284828501611e5c565b60008060006040848603121561207c57600080fd5b833567ffffffffffffffff81111561209357600080fd5b61209f86828701611cae565b909790965060209590950135949350505050565b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612105576121056120c3565b500190565b60006020828403121561211c57600080fd5b5051919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b608081526000612180608083018789612123565b602083019590955250604081019290925260609091015292915050565b6000828210156121af576121af6120c3565b500390565b600060e082018a8352602073ffffffffffffffffffffffffffffffffffffffff808c16828601528a6040860152808a1660608601525060e060808501528187835261010092508285019050828860051b86010192508860005b898110156122b7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0087860301835281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18c360301811261226e57600080fd5b8b01803567ffffffffffffffff81111561228757600080fd5b8036038d131561229657600080fd5b6122a38782888501612123565b96505050918301919083019060010161220d565b5050505060a08301949094525090151560c0909101529695505050505050565b60005b838110156122f25781810151838201526020016122da565b838111156118bc5750506000910152565b6000815180845261231b8160208601602086016122d7565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6060815260006123606060830186612303565b60208301949094525060400152919050565b60006040828403121561238457600080fd5b6040516040810181811067ffffffffffffffff821117156123a7576123a7611e2d565b604052825181526020928301519281019290925250919050565b6040815260006123d46040830185612303565b905073ffffffffffffffffffffffffffffffffffffffff831660208301529392505050565b60006020828403121561240b57600080fd5b81516111b081611d65565b60608152600061242a606083018688612123565b6020830194909452506040015292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126124a157600080fd5b83018035915067ffffffffffffffff8211156124bc57600080fd5b602001915036819003821315611cf057600080fd5b600080858511156124e157600080fd5b838611156124ee57600080fd5b5050820193919092039150565b8035602083101561059f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612568576125686120c3565b5060010190565b600083516125818184602088016122d7565b7f2e0000000000000000000000000000000000000000000000000000000000000090830190815283516125bb8160018401602088016122d7565b01600101949350505050565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152808516604084015250608060608301526126086080830184612303565b9695505050505050565b600082516126248184602087016122d7565b9190910192915050565b6020815260006111b0602083018461230356fe43524f526567697374726172436f6e74726f6c6c65723a204661696c656420746f20736574205265636f7264a2646970667358221220c73470d09025bee901412dcede5cd9a0f3440bb23340e4d339a831a36333aaa464736f6c634300080d0033000000000000000000000000f884647dfa84696d9373f36ee413ccc48093f924000000000000000000000000905f5280fc0b64fd1d3b0179f728bfb901426e5b00000000000000000000000082b28e5a2444d22af36e1bb40cfd1b3e155d9486000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000015180

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000f884647dfa84696d9373f36ee413ccc48093f924000000000000000000000000905f5280fc0b64fd1d3b0179f728bfb901426e5b00000000000000000000000082b28e5a2444d22af36e1bb40cfd1b3e155d9486000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000015180

-----Decoded View---------------
Arg [0] : _registrar (address): 0xf884647dfa84696d9373f36ee413ccc48093f924
Arg [1] : _priceOracle (address): 0x905f5280fc0b64fd1d3b0179f728bfb901426e5b
Arg [2] : _reverseRegistrar (address): 0x82b28e5a2444d22af36e1bb40cfd1b3e155d9486
Arg [3] : _minCommitmentAge (uint256): 60
Arg [4] : _maxCommitmentAge (uint256): 86400

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000f884647dfa84696d9373f36ee413ccc48093f924
Arg [1] : 000000000000000000000000905f5280fc0b64fd1d3b0179f728bfb901426e5b
Arg [2] : 00000000000000000000000082b28e5a2444d22af36e1bb40cfd1b3e155d9486
Arg [3] : 000000000000000000000000000000000000000000000000000000000000003c
Arg [4] : 0000000000000000000000000000000000000000000000000000000000015180


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.