Contract 0x0cb56F1c023B7BA29ddd7B9e30283EE3DE2187D7

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x0365bdc2b0d7ea82ec1eaa73de0033165915a820fe6ff18a1b0cb5d4c8936336Register74886682023-03-21 1:14:186 hrs 57 mins ago0x85433e9df5999a89391971209d5e7c501144a5ed IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7156.006016760761602 CRO2.712975003857 4,789.180560404
0xed09d9dfbf68540ad91ccff5376c1354e1b8a4e0ae59833864c8b064777220b9Commit74886512023-03-21 1:12:426 hrs 58 mins ago0x85433e9df5999a89391971209d5e7c501144a5ed IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70 CRO0.211734496148 4,789.181338321
0xdc887e380aa7340e48553107f9a027e1d761da180bc8f40cc107690abafdf6c7Register74863452023-03-20 21:35:3010 hrs 36 mins ago0x986a0636b477b97e135f12ee46d6936c0a296a93 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7151.302535602430894 CRO2.3746367134680
0x78ef4ad87e7758df17d4c4e673fe9637690709d9224c57945052f3cc927fcb9eCommit74863312023-03-20 21:34:1110 hrs 37 mins ago0x986a0636b477b97e135f12ee46d6936c0a296a93 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70 CRO0.2117303071380
0x9c7df8f2eeb02f9cf226fb24eeca7c4d0bc68c8ffdeedafa9c09be727a9b2efeRegister74831982023-03-20 16:38:5815 hrs 32 mins ago0x2e8ff7dab72f9a3138e66f11aaf2159cb012d11b IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7208.307145784655678 CRO2.1949452935830
0xac46fa1bd1ff9d04bf5c95fbfdd4b5ca760f38d08c2ee54ef95da967e7761899Commit74831802023-03-20 16:37:1615 hrs 34 mins ago0x2e8ff7dab72f9a3138e66f11aaf2159cb012d11b IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70 CRO0.2117366807420
0x60312c8c572132f8b4050c44742c4b1ee4a187e289a19d567434bb5c9f767a74Register74804892023-03-20 12:23:3219 hrs 48 mins ago0x483a3c0401a72d6353b440b7ef2350c2ba552034 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7204.712990936273233 CRO2.164789496390
0x01aef5466bfe5f76dd94ccdb98381a0b0c25df070761c86270ae6efe85b1fd4eCommit74804692023-03-20 12:21:4019 hrs 49 mins ago0x483a3c0401a72d6353b440b7ef2350c2ba552034 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70 CRO0.211742170440
0xaa2d9785eafeb115d1a19032a927ade9691549eda141a2b7469a88b7666b1083Register74753902023-03-20 4:22:581 day 3 hrs ago0xb2051bec727b5fb0e8f90e098cac9cacc5e03165 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7149.300795173909564 CRO2.7091419912870
0x22dca987d8735e99217d2b283e995607d0f285efd65cd36890294fc9e5f71264Commit74753752023-03-20 4:21:331 day 3 hrs ago0xb2051bec727b5fb0e8f90e098cac9cacc5e03165 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70 CRO0.2117525267780
0xfab120b28346019088e22fbb879e345f6f09850b3fe50af1edab601123bd7b8fRenew74749942023-03-20 3:45:391 day 4 hrs ago0xa5bb3c2912ef2f151982f0bc818c894e3ebd6983 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7738.856096070626476 CRO1.387750706237 4,789.806738126
0xd9f4f65e035bfe74420eb75a4199d452f863b2a8ec8ed5a7037e54ec800cf794Register74715932023-03-19 22:25:051 day 9 hrs ago0xf99f14bcfb8fc442abb2e46b2bf9fbf2168decda IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7212.918092311695399 CRO2.3675491021150
0xbdfb7ffddbb317b42170793aa898501ed53828026adb665ff8d865b3ebf4f4a3Commit74715782023-03-19 22:23:391 day 9 hrs ago0xf99f14bcfb8fc442abb2e46b2bf9fbf2168decda IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70 CRO0.2117601302650
0x71bf97ff05ca36b0bdcaddc18d92227080782c3f850eafafb461e9b7e6654fcbRegister74715362023-03-19 22:19:421 day 9 hrs ago0xf99f14bcfb8fc442abb2e46b2bf9fbf2168decda IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7212.918092311695399 CRO2.7149485996890
0xf747eb172a38b460e1a99f1d05890b0cc828b3f673f563b3c26cdab2a8aa886aCommit74715212023-03-19 22:18:171 day 9 hrs ago0xf99f14bcfb8fc442abb2e46b2bf9fbf2168decda IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70 CRO0.2117602433090
0x327b857bfb6baa53194097691dcbe8da7e4fef8a6a5ce813788f5ded7410bf27Register74689432023-03-19 18:15:301 day 13 hrs ago0x22683f1a5ac603d0c253a6917c4886816d6f4fa0 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7151.449829636116593 CRO2.7118836886540
0x4a5237effc172cdb74fbf920786711dc953d79bf88fa8c28ae37ca27ac9fdc61Commit74689202023-03-19 18:13:201 day 13 hrs ago0x22683f1a5ac603d0c253a6917c4886816d6f4fa0 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70 CRO0.211765469450
0x68922b79c8b3a7b7f7e50c4f46e690a7aa76fe1e0c5612f8176ab01e06024ec3Commit74643262023-03-19 11:00:271 day 21 hrs ago0x22683f1a5ac603d0c253a6917c4886816d6f4fa0 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70 CRO0.2117172217860
0xa2fe3382428ad230812daaf936e655b9247993cc8e205dd36fffcb193ccab284Register74630392023-03-19 8:59:081 day 23 hrs ago0x55bed55db5214f66dc544130c7e8b5e41182ebb4 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7153.900508761799938 CRO2.1730314805630
0x2d34737f7c120899a154cf810743205056fc31a7c9c706d3f55f888af5098eacCommit74630242023-03-19 8:57:441 day 23 hrs ago0x55bed55db5214f66dc544130c7e8b5e41182ebb4 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70 CRO0.2117198612170
0x51e1f286b049f311a435000fc2704ba6a4eefd618607102db13bd8e7d2ec29c9Register74630122023-03-19 8:56:371 day 23 hrs ago0x55bed55db5214f66dc544130c7e8b5e41182ebb4 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7153.900508761799938 CRO2.2095853260140
0x3b505822334a7613468afff52ad6ea8d62b914e72b01c397c0e8138b6e98e278Commit74629942023-03-19 8:54:541 day 23 hrs ago0x55bed55db5214f66dc544130c7e8b5e41182ebb4 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70 CRO0.2117773849330
0x9d43f887f090ea2ab24b9cbfa007d5c111c03a4616f9303d9c2eab6dff5a355cRegister74629672023-03-19 8:52:221 day 23 hrs ago0x55bed55db5214f66dc544130c7e8b5e41182ebb4 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7153.900508761799938 CRO2.725628318080
0x7fee8f0edd50ecad4961ec6f837f13fb3ac204397b8adc52fcb63a73de21cf60Commit74629522023-03-19 8:50:581 day 23 hrs ago0x55bed55db5214f66dc544130c7e8b5e41182ebb4 IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70 CRO0.2117774736270
0x78750f473156937690da1cfe26249892e7155a09241c9e0cf43de86deaceb5f9Register74610332023-03-19 5:50:232 days 2 hrs ago0x070b561eb2352ca087b52a5b8ee807075e6e6bba IN  0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7153.099957823491686 CRO2.7014470964710
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x0365bdc2b0d7ea82ec1eaa73de0033165915a820fe6ff18a1b0cb5d4c893633674886682023-03-21 1:14:186 hrs 57 mins ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70x85433e9df5999a89391971209d5e7c501144a5ed14.182365160069236564 CRO
0x0365bdc2b0d7ea82ec1eaa73de0033165915a820fe6ff18a1b0cb5d4c893633674886682023-03-21 1:14:186 hrs 57 mins ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7 0x67f2bf6b579820de54dc51270a8811482fed6cf1141.823651600692365647 CRO
0xdc887e380aa7340e48553107f9a027e1d761da180bc8f40cc107690abafdf6c774863452023-03-20 21:35:3010 hrs 36 mins ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70x986a0636b477b97e135f12ee46d6936c0a296a9313.754775963857354059 CRO
0xdc887e380aa7340e48553107f9a027e1d761da180bc8f40cc107690abafdf6c774863452023-03-20 21:35:3010 hrs 36 mins ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7 0x67f2bf6b579820de54dc51270a8811482fed6cf1137.54775963857354059 CRO
0x9c7df8f2eeb02f9cf226fb24eeca7c4d0bc68c8ffdeedafa9c09be727a9b2efe74831982023-03-20 16:38:5815 hrs 32 mins ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70x2e8ff7dab72f9a3138e66f11aaf2159cb012d11b18.937013253150516213 CRO
0x9c7df8f2eeb02f9cf226fb24eeca7c4d0bc68c8ffdeedafa9c09be727a9b2efe74831982023-03-20 16:38:5815 hrs 32 mins ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7 0x67f2bf6b579820de54dc51270a8811482fed6cf1189.370132531505162139 CRO
0x60312c8c572132f8b4050c44742c4b1ee4a187e289a19d567434bb5c9f767a7474804892023-03-20 12:23:3219 hrs 48 mins ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70x483a3c0401a72d6353b440b7ef2350c2ba55203418.610271903297566723 CRO
0x60312c8c572132f8b4050c44742c4b1ee4a187e289a19d567434bb5c9f767a7474804892023-03-20 12:23:3219 hrs 48 mins ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7 0x67f2bf6b579820de54dc51270a8811482fed6cf1186.10271903297566723 CRO
0xaa2d9785eafeb115d1a19032a927ade9691549eda141a2b7469a88b7666b108374753902023-03-20 4:22:581 day 3 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70xb2051bec727b5fb0e8f90e098cac9cacc5e0316513.572799561264505873 CRO
0xaa2d9785eafeb115d1a19032a927ade9691549eda141a2b7469a88b7666b108374753902023-03-20 4:22:581 day 3 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7 0x67f2bf6b579820de54dc51270a8811482fed6cf1135.727995612645058733 CRO
0xfab120b28346019088e22fbb879e345f6f09850b3fe50af1edab601123bd7b8f74749942023-03-20 3:45:391 day 4 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70xa5bb3c2912ef2f151982f0bc818c894e3ebd698367.168736006420588805 CRO
0xfab120b28346019088e22fbb879e345f6f09850b3fe50af1edab601123bd7b8f74749942023-03-20 3:45:391 day 4 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7 0x67f2bf6b579820de54dc51270a8811482fed6cf1671.687360064205888052 CRO
0xd9f4f65e035bfe74420eb75a4199d452f863b2a8ec8ed5a7037e54ec800cf79474715932023-03-19 22:25:051 day 9 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70xf99f14bcfb8fc442abb2e46b2bf9fbf2168decda19.356190210154127249 CRO
0xd9f4f65e035bfe74420eb75a4199d452f863b2a8ec8ed5a7037e54ec800cf79474715932023-03-19 22:25:051 day 9 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7 0x67f2bf6b579820de54dc51270a8811482fed6cf1193.561902101541272494 CRO
0x71bf97ff05ca36b0bdcaddc18d92227080782c3f850eafafb461e9b7e6654fcb74715362023-03-19 22:19:421 day 9 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70xf99f14bcfb8fc442abb2e46b2bf9fbf2168decda19.356190210154127249 CRO
0x71bf97ff05ca36b0bdcaddc18d92227080782c3f850eafafb461e9b7e6654fcb74715362023-03-19 22:19:421 day 9 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7 0x67f2bf6b579820de54dc51270a8811482fed6cf1193.561902101541272494 CRO
0x327b857bfb6baa53194097691dcbe8da7e4fef8a6a5ce813788f5ded7410bf2774689432023-03-19 18:15:301 day 13 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70x22683f1a5ac603d0c253a6917c4886816d6f4fa013.768166330556053937 CRO
0x327b857bfb6baa53194097691dcbe8da7e4fef8a6a5ce813788f5ded7410bf2774689432023-03-19 18:15:301 day 13 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7 0x67f2bf6b579820de54dc51270a8811482fed6cf1137.681663305560539378 CRO
0xa2fe3382428ad230812daaf936e655b9247993cc8e205dd36fffcb193ccab28474630392023-03-19 8:59:081 day 23 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70x55bed55db5214f66dc544130c7e8b5e41182ebb413.990955341981812583 CRO
0xa2fe3382428ad230812daaf936e655b9247993cc8e205dd36fffcb193ccab28474630392023-03-19 8:59:081 day 23 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7 0x67f2bf6b579820de54dc51270a8811482fed6cf1139.909553419818125833 CRO
0x51e1f286b049f311a435000fc2704ba6a4eefd618607102db13bd8e7d2ec29c974630122023-03-19 8:56:371 day 23 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70x55bed55db5214f66dc544130c7e8b5e41182ebb413.990955341981812583 CRO
0x51e1f286b049f311a435000fc2704ba6a4eefd618607102db13bd8e7d2ec29c974630122023-03-19 8:56:371 day 23 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7 0x67f2bf6b579820de54dc51270a8811482fed6cf1139.909553419818125833 CRO
0x9d43f887f090ea2ab24b9cbfa007d5c111c03a4616f9303d9c2eab6dff5a355c74629672023-03-19 8:52:221 day 23 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70x55bed55db5214f66dc544130c7e8b5e41182ebb413.990955341981812583 CRO
0x9d43f887f090ea2ab24b9cbfa007d5c111c03a4616f9303d9c2eab6dff5a355c74629672023-03-19 8:52:221 day 23 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d7 0x67f2bf6b579820de54dc51270a8811482fed6cf1139.909553419818125833 CRO
0x78750f473156937690da1cfe26249892e7155a09241c9e0cf43de86deaceb5f974610332023-03-19 5:50:232 days 2 hrs ago 0x0cb56f1c023b7ba29ddd7b9e30283ee3de2187d70x070b561eb2352ca087b52a5b8ee807075e6e6bba13.918177983953789658 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 41 : CRORegistrarController.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import "./BaseRegistrarController.sol";
import "./ICRORegistrarController.sol";

/**
 * @dev A registrar controller for registering and renewing names at fixed cost.
 */
contract CRORegistrarController is BaseRegistrarController {
    constructor(
        IBaseRegistrar _registrar,
        IPriceOracle _priceOracle,
        ReverseRegistrar _reverseRegistrar
    ) BaseRegistrarController(_registrar, _priceOracle, _reverseRegistrar) {
        /* Nothing to do */
    }

    function register(
        string calldata name,
        address owner,
        uint256 duration,
        bytes32 secret,
        address resolver,
        bytes[] calldata data,
        bool reverseRecord
    ) public payable {
        bytes32 label = keccak256(bytes(name));
        IPriceOracle.Price memory price = rentPrice(name, duration);
        uint256 amount = price.base + price.premium;
        require(
            msg.value >= amount,
            "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
        );

        _distributeRevenue(amount);

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

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

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

        _distributeRevenue(amount);

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

        emit NameRenewed(name, label, amount, expires);
    }

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

    function _distributeRevenue(uint256 amount) internal override {
        if (address(revenueDistributor) != address(0)) {
            revenueDistributor.deposit{value: amount}();
        }
    }

    function _heldRevenue() internal view override returns (uint256) {
        return address(this).balance;
    }
}

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

import "./IBaseRegistrar.sol";
import "./IBaseRegistrarController.sol";
import "../oracles/IPriceOracle.sol";
import "../registrars/ReverseRegistrar.sol";
import "../utils/StringUtils.sol";
import "../utils/Blocklist.sol";
import "../tokens/IRevenueDistributor.sol";

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

/**
 * @dev A base registrar controller for registering and renewing names.
 */
abstract contract BaseRegistrarController is Ownable, IBaseRegistrarController {
    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;
    uint256 public constant MIN_COMMITMENT_AGE = 60; // 60 seconds
    uint256 public constant MAX_COMMITMENT_AGE = 24 * 60 * 60; // 24 hours

    IBaseRegistrar public immutable registrar;

    ReverseRegistrar public reverseRegistrar;
    IPriceOracle public priceOracle;
    Blocklist public blocklist;
    IRevenueDistributor public revenueDistributor;
    bool public chanceRequired;

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

    event RevenueDistributorChanged(address indexed revenueDistributor);

    event ChanceRequiredChanged(bool required);

    constructor(
        IBaseRegistrar _registrar,
        IPriceOracle _priceOracle,
        ReverseRegistrar _reverseRegistrar
    ) {
        registrar = _registrar;
        priceOracle = _priceOracle;
        reverseRegistrar = _reverseRegistrar;
        chanceRequired = false;
    }

    function rentPrice(string memory name, uint256 duration)
        public
        view
        virtual
        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
        virtual
        override
        returns (bool)
    {
        if (strLength(name) < 3) {
            return false;
        }

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

        return true;
    }

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

    function strLength(string memory name)
        public
        view
        virtual
        override
        returns (uint256)
    {
        return name.strlen();
    }

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

    function commit(bytes32 commitment) public virtual override {
        require(commitments[commitment] + MAX_COMMITMENT_AGE < block.timestamp, "BaseRegistrarController: invalid commitment");
        commitments[commitment] = block.timestamp;
    }

    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 setRevenueDistributor(address _revenueDistributor)
        external
        onlyOwner
    {
        revenueDistributor = IRevenueDistributor(_revenueDistributor);
        emit RevenueDistributorChanged(_revenueDistributor);
    }

    function setChanceRequired(bool _required) external onlyOwner {
        chanceRequired = _required;
        emit ChanceRequiredChanged(_required);
    }

    function distributeHeldRevenue() external onlyOwner {
        _distributeRevenue(_heldRevenue());
    }

    function minCommitmentAge() public pure returns (uint256) {
        return MIN_COMMITMENT_AGE;
    }

    function maxCommitmentAge() public pure returns (uint256) {
        return MAX_COMMITMENT_AGE;
    }

    function supportsInterface(bytes4 interfaceID)
        external
        pure
        virtual
        returns (bool)
    {
        return
            interfaceID == type(IERC165).interfaceId ||
            interfaceID == type(IBaseRegistrarController).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] + MIN_COMMITMENT_AGE <= block.timestamp,
            "BaseRegistrarController: Commitment is not valid"
        );

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

        require(
            available(name),
            "BaseRegistrarController: Name is unavailable"
        );

        if (chanceRequired && strLength(name) < 5) {
            if (address(blocklist) != address(0)) {
                blocklist.checkChance(name, msg.sender);
            }
        }

        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,
                "BaseRegistrarController: Namehash on record do not match the name being registered"
            );
            resolver.functionCall(
                data[i],
                "BaseRegistrarController: 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)
        );
    }

    function _heldRevenue() internal view virtual returns (uint256) {
        return 0;
    }

    function _distributeRevenue(uint256) internal virtual {
        require(
            false,
            "BaseRegistrarController: unimplemented distributing method"
        );
    }
}

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

import "./IBaseRegistrarController.sol";

interface ICRORegistrarController is IBaseRegistrarController {
    function register(
        string calldata,
        address,
        uint256,
        bytes32,
        address,
        bytes[] calldata,
        bool
    ) external payable;

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

File 4 of 41 : 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 5 of 41 : 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 6 of 41 : IBaseRegistrarController.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

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

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

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

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

    function strLength(string memory) external returns (uint256);

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

    function commit(bytes32) external;
}

File 7 of 41 : 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 8 of 41 : 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 9 of 41 : 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;
    mapping(address => bool) private _checkers;
    mapping(address => uint256) private _chances;

    event EnabledChange(bool enabled);
    event CheckerChange(address checker, 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 result) {
        uint256 length = name.strlen();

        // if all chars are from ASCII
        if (length == bytes(name).length) {
            name = name.toLower();
        }

        bytes32 label = keccak256(bytes(name));
        result = has(label, user);
    }

    function checkChance(string memory, address user) public {
        require(_checkers[msg.sender], "sender is not authorized to check");
        require(_chances[user] > 0, "user has no more chances");

        _chances[user] -= 1;
    }

    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 checker(address _checker) public view returns (bool) {
        return _checkers[_checker];
    }

    function setChecker(address _checker, bool _enabled) external onlyOwner() {
        _checkers[_checker] = _enabled;
        emit CheckerChange(_checker, _enabled);
    }

    function updateChance(address user, uint256 number) external onlyOwner() {
        _chances[user] = number;
    }

    function batchUpdateChance(address[] calldata users, uint256 number) external onlyOwner() {
        for (uint i = 0; i < users.length; i++) {
            _chances[users[i]] = number;
        }
    }

    function batchSyncChance(address[] calldata users, uint256[] calldata numbers) external onlyOwner() {
        for (uint i = 0; i < users.length; i++) {
            _chances[users[i]] = numbers[i];
        }
    }

    function chance(address user) public view returns (uint256) {
        return _chances[user];
    }

    function _authorizeUpgrade(address) internal override onlyOwner {}
}

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

interface IRevenueDistributor {
    function deposit() external payable;

    function depositToken(uint256 tokenAmount) external;

    function setRevenueBeneficiary(address _revenueBeneficiary) external;

    function setStakingDistributor(address _stakingDistributor) external;

    function setTokenSwapRouter(
        address _tokenSwapRouter,
        address[] memory _tokenSwapPaths
    ) external;

    function allocatePendingRevenue() external;

    function allocatePendingStaking() external;

    function allocatePendingBurning() external;

    function allocateAllPendings() external;

    function allocatePendingRevenueToken() external;

    function allocatePendingStakingToken() external;

    function allocateAllPendingTokens() external;

    function getUnlockedStakingAmount() view external returns(uint256);

    function getUnlockedStakingTokenAmount() view external returns(uint256);

    
}

File 11 of 41 : 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 12 of 41 : 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 13 of 41 : 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 14 of 41 : 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 15 of 41 : 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 16 of 41 : 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 17 of 41 : 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 18 of 41 : 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 19 of 41 : 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 20 of 41 : 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 21 of 41 : 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 22 of 41 : 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 23 of 41 : 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 24 of 41 : 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 25 of 41 : 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 26 of 41 : 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 27 of 41 : 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 28 of 41 : 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 29 of 41 : 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 30 of 41 : 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 31 of 41 : 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 32 of 41 : 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 33 of 41 : 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 34 of 41 : 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 35 of 41 : 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 36 of 41 : 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 37 of 41 : 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 38 of 41 : 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 39 of 41 : 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 40 of 41 : 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 41 of 41 : 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"}],"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":"bool","name":"required","type":"bool"}],"name":"ChanceRequiredChanged","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":"revenueDistributor","type":"address"}],"name":"RevenueDistributorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"reverseRegistrar","type":"address"}],"name":"ReverseRegistrarChanged","type":"event"},{"inputs":[],"name":"MAX_COMMITMENT_AGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_COMMITMENT_AGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"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":[],"name":"chanceRequired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"distributeHeldRevenue","outputs":[],"stateMutability":"nonpayable","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":"pure","type":"function"},{"inputs":[],"name":"minCommitmentAge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","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":"revenueDistributor","outputs":[{"internalType":"contract IRevenueDistributor","name":"","type":"address"}],"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":"bool","name":"_required","type":"bool"}],"name":"setChanceRequired","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_priceOracle","type":"address"}],"name":"setPriceOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_revenueDistributor","type":"address"}],"name":"setRevenueDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_reverseRegistrar","type":"address"}],"name":"setReverseRegistrar","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"strLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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"}]

60a06040523480156200001157600080fd5b5060405162002cab38038062002cab8339810160408190526200003491620000f2565b828282620000423362000089565b6001600160a01b03928316608052600280549284166001600160a01b03199384161790556001805491909316911617905550506004805460ff60a01b191690555062000146565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620000ef57600080fd5b50565b6000806000606084860312156200010857600080fd5b83516200011581620000d9565b60208501519093506200012881620000d9565b60408501519092506200013b81620000d9565b809150509250925092565b608051612b2d6200017e600039600081816103000152818161097b01528181610f730152818161123f015261139c0152612b2d6000f3fe6080604052600436106101cd5760003560e01c806383e7f6ff116100f7578063aeb8ce9b11610095578063d64e539611610064578063d64e53961461056c578063eae0a48814610599578063f14fcbc8146105c6578063f2fde38b146105e657600080fd5b8063aeb8ce9b14610501578063aef18ae714610521578063b434947014610541578063ce1e09c01461055657600080fd5b80638d839ffe116100d15780638d839ffe1461048f5780638da5cb5b146104a35780639791c097146104ce578063acf1a841146104ee57600080fd5b806383e7f6ff146104265780638a95b09f146104615780638ccb9ea61461047857600080fd5b80632e4f692a1161016f578063557499ba1161013e578063557499ba14610397578063715018a6146103b757806380869853146103cc578063839df945146103f957600080fd5b80632e4f692a146103225780633d4aa89e146103375780634c87400514610357578063530e784f1461037757600080fd5b806322ecf8b9116101ab57806322ecf8b914610257578063237592e8146102895780632630c12f1461029c5780632b20e397146102ee57600080fd5b806301ffc9a7146101d2578063179f9e65146102075780631f9e051514610229575b600080fd5b3480156101de57600080fd5b506101f26101ed3660046120d8565b610606565b60405190151581526020015b60405180910390f35b34801561021357600080fd5b50610227610222366004612143565b61069f565b005b34801561023557600080fd5b50610249610244366004612238565b61077a565b6040519081526020016101fe565b34801561026357600080fd5b506004546101f29074010000000000000000000000000000000000000000900460ff1681565b610227610297366004612309565b610785565b3480156102a857600080fd5b506002546102c99073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b3480156102fa57600080fd5b506102c97f000000000000000000000000000000000000000000000000000000000000000081565b34801561032e57600080fd5b50610249603c81565b34801561034357600080fd5b506102496103523660046123c3565b610af8565b34801561036357600080fd5b50610227610372366004612475565b610bfb565b34801561038357600080fd5b50610227610392366004612143565b610ce6565b3480156103a357600080fd5b506102276103b2366004612143565b610dbc565b3480156103c357600080fd5b50610227610e92565b3480156103d857600080fd5b506001546102c99073ffffffffffffffffffffffffffffffffffffffff1681565b34801561040557600080fd5b50610249610414366004612492565b60056020526000908152604090205481565b34801561043257600080fd5b506104466104413660046124ab565b610f05565b604080518251815260209283015192810192909252016101fe565b34801561046d57600080fd5b506102496224ea0081565b34801561048457600080fd5b506102496201518081565b34801561049b57600080fd5b50603c610249565b3480156104af57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166102c9565b3480156104da57600080fd5b506101f26104e9366004612238565b611045565b6102276104fc3660046124f0565b61112c565b34801561050d57600080fd5b506101f261051c366004612238565b611353565b34801561052d57600080fd5b5061022761053c366004612143565b611423565b34801561054d57600080fd5b506102276114f9565b34801561056257600080fd5b5062015180610249565b34801561057857600080fd5b506003546102c99073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105a557600080fd5b506004546102c99073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105d257600080fd5b506102276105e1366004612492565b611569565b3480156105f257600080fd5b50610227610601366004612143565b61160e565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000148061069957507fffffffff0000000000000000000000000000000000000000000000000000000082167f8f843aa900000000000000000000000000000000000000000000000000000000145b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461070b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f3c966c98aa061771cf735f36563bd7c89979210fa99ae258a068fbf3088f693490600090a250565b60006106998261170a565b6000898960405161079792919061253c565b6040518091039020905060006107e48b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c9250610f05915050565b90506000816020015182600001516107fc919061257b565b9050803410156108745760405162461bcd60e51b815260206004820152602f60248201527f43524f526567697374726172436f6e74726f6c6c65723a204e6f7420656e6f7560448201527f67682043524f2070726f766964656400000000000000000000000000000000006064820152608401610702565b6109168c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508a6109118f8f8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508e8e8e8e8e8e8e610af8565b611911565b6040517ffee55ef50000000000000000000000000000000000000000000000000000000081526004810184905273ffffffffffffffffffffffffffffffffffffffff8b81166024830152604482018b90528881166064830152600060848301819052917f00000000000000000000000000000000000000000000000000000000000000009091169063fee55ef59060a4016020604051808303816000875af11580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea9190612593565b90506109f888858989611bb3565b8415610a4157610a418d8d8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c9250339150611d989050565b8a73ffffffffffffffffffffffffffffffffffffffff16847f69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf278f8f8760000151886020015187604051610a989594939291906125f5565b60405180910390a3610aa982611e98565b81341115610ae957336108fc610abf8434612626565b6040518115909202916000818181858888f19350505050158015610ae7573d6000803e3d6000fd5b505b50505050505050505050505050565b875160208901206000908315610bb75773ffffffffffffffffffffffffffffffffffffffff8616610bb75760405162461bcd60e51b815260206004820152604360248201527f42617365526567697374726172436f6e74726f6c6c65723a207265736f6c766560448201527f72206973207265717569726564207768656e206461746120697320737570706c60648201527f6965640000000000000000000000000000000000000000000000000000000000608482015260a401610702565b8089898888888c89604051602001610bd698979695949392919061263d565b6040516020818303038152906040528051906020012091505098975050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610c625760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b6004805482151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040517fa1eed71828a0ba7faa98d0aa158723bbd5bc22595af360b3c7ac380164242af890610cdb90831515815260200190565b60405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d4d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fb36d86785c7d32b1ad714bb705e00e93eccc37b8cf47549043e61e10908ad25190600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e235760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f34a80311cdc56a47d7f1767a6501ac19d9b5fcddd4197476b135e4b887c8c45090600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ef95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b610f036000611f35565b565b6040805180820190915260008082526020820152825160208401206002546040517fd6e4fa860000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff918216916350e9a7159187917f0000000000000000000000000000000000000000000000000000000000000000169063d6e4fa8690602401602060405180830381865afa158015610fba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fde9190612593565b866040518463ffffffff1660e01b8152600401610ffd939291906127d6565b6040805180830381865afa158015611019573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103d91906127fb565b949350505050565b600060036110528361077a565b101561106057506000919050565b60035473ffffffffffffffffffffffffffffffffffffffff1615611124576003546040517f7621077800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906376210778906110d6908590339060040161284a565b602060405180830381865afa1580156110f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111179190612882565b1561112457506000919050565b506001919050565b6000838360405161113e92919061253c565b60405180910390209050600061118b85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250879250610f05915050565b8051909150348111156112065760405162461bcd60e51b815260206004820152603b60248201527f43524f526567697374726172436f6e74726f6c6c65723a204e6f7420656e6f7560448201527f67682043524f2070726f766964656420666f722072656e6577616c00000000006064820152608401610702565b6040517fc475abff00000000000000000000000000000000000000000000000000000000815260048101849052602481018590526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063c475abff906044016020604051808303816000875af115801561129d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c19190612593565b90506112cc82611e98565b8134111561130c57336108fc6112e28434612626565b6040518115909202916000818181858888f1935050505015801561130a573d6000803e3d6000fd5b505b837f3da24c024582931cfaf8267d8ed24d13a82a8068d5bd337d30ec45cea4e506ae88888585604051611342949392919061289f565b60405180910390a250505050505050565b8051602082012060009061136683611045565b801561141c57506040517f96e494e8000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906396e494e890602401602060405180830381865afa1580156113f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141c9190612882565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461148a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f03198670e18c03d7739e5db8c31ba442a94bfa7e14b89a7ddf7e85fd3fa7c2d990600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff1633146115605760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b610f0347611e98565b600081815260056020526040902054429061158890620151809061257b565b106115fb5760405162461bcd60e51b815260206004820152602b60248201527f42617365526567697374726172436f6e74726f6c6c65723a20696e76616c696460448201527f20636f6d6d69746d656e740000000000000000000000000000000000000000006064820152608401610702565b6000908152600560205260409020429055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146116755760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610702565b73ffffffffffffffffffffffffffffffffffffffff81166116fe5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610702565b61170781611f35565b50565b8051600090819081905b80821015611908576000858381518110611730576117306128c6565b01602001517fff000000000000000000000000000000000000000000000000000000000000001690507f80000000000000000000000000000000000000000000000000000000000000008110156117935761178c60018461257b565b92506118f5565b7fe0000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821610156117e85761178c60028461257b565b7ff0000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008216101561183d5761178c60038461257b565b7ff8000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821610156118925761178c60048461257b565b7ffc000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821610156118e75761178c60058461257b565b6118f260068461257b565b92505b5082611900816128f5565b935050611714565b50909392505050565b600081815260056020526040902054429061192e90603c9061257b565b11156119a25760405162461bcd60e51b815260206004820152603060248201527f42617365526567697374726172436f6e74726f6c6c65723a20436f6d6d69746d60448201527f656e74206973206e6f742076616c6964000000000000000000000000000000006064820152608401610702565b60008181526005602052604090205442906119c190620151809061257b565b11611a345760405162461bcd60e51b815260206004820152602f60248201527f42617365526567697374726172436f6e74726f6c6c65723a20436f6d6d69746d60448201527f656e7420686173206578706972656400000000000000000000000000000000006064820152608401610702565b611a3d83611353565b611aaf5760405162461bcd60e51b815260206004820152602c60248201527f42617365526567697374726172436f6e74726f6c6c65723a204e616d6520697360448201527f20756e617661696c61626c6500000000000000000000000000000000000000006064820152608401610702565b60045474010000000000000000000000000000000000000000900460ff168015611ae157506005611adf8461077a565b105b15611b8f5760035473ffffffffffffffffffffffffffffffffffffffff1615611b8f576003546040517fbc6f06c900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063bc6f06c990611b5c908690339060040161284a565b600060405180830381600087803b158015611b7657600080fd5b505af1158015611b8a573d6000803e3d6000fd5b505050505b6000818152600560205260408120556224ea00821015611bae57600080fd5b505050565b604080517f5dfacd0a0764eb7c9351dcd36f63cb5e2757014aa2592f976462be5c38ce9ca8602082015290810184905260009060600160405160208183030381529060405280519060200120905060005b82811015611d90576000848483818110611c2057611c206128c6565b9050602002810190611c32919061292d565b611c4191602491600491612992565b611c4a916129bc565b9050828114611ce75760405162461bcd60e51b815260206004820152605260248201527f42617365526567697374726172436f6e74726f6c6c65723a204e616d6568617360448201527f68206f6e207265636f726420646f206e6f74206d6174636820746865206e616d60648201527f65206265696e6720726567697374657265640000000000000000000000000000608482015260a401610702565b611d7b858584818110611cfc57611cfc6128c6565b9050602002810190611d0e919061292d565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805160608101909152602d8082529092509050612acb602083013973ffffffffffffffffffffffffffffffffffffffff8a169190611faa565b50508080611d88906128f5565b915050611c04565b505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637a806d6b338385876040518060400160405280600381526020017f63726f0000000000000000000000000000000000000000000000000000000000815250604051602001611e219291906129f8565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401611e4f9493929190612a50565b6020604051808303816000875af1158015611e6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e929190612593565b50505050565b60045473ffffffffffffffffffffffffffffffffffffffff16156117075760048054604080517fd0e30db0000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169263d0e30db0928592808301926000929182900301818588803b158015611f2157600080fd5b505af1158015611d90573d6000803e3d6000fd5b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606061103d84846000858573ffffffffffffffffffffffffffffffffffffffff85163b6120195760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610702565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516120429190612a9b565b60006040518083038185875af1925050503d806000811461207f576040519150601f19603f3d011682016040523d82523d6000602084013e612084565b606091505b509150915061209482828661209f565b979650505050505050565b606083156120ae57508161141c565b8251156120be5782518084602001fd5b8160405162461bcd60e51b81526004016107029190612ab7565b6000602082840312156120ea57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461141c57600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461213e57600080fd5b919050565b60006020828403121561215557600080fd5b61141c8261211a565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261219e57600080fd5b813567ffffffffffffffff808211156121b9576121b961215e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156121ff576121ff61215e565b8160405283815286602085880101111561221857600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561224a57600080fd5b813567ffffffffffffffff81111561226157600080fd5b61103d8482850161218d565b60008083601f84011261227f57600080fd5b50813567ffffffffffffffff81111561229757600080fd5b6020830191508360208285010111156122af57600080fd5b9250929050565b60008083601f8401126122c857600080fd5b50813567ffffffffffffffff8111156122e057600080fd5b6020830191508360208260051b85010111156122af57600080fd5b801515811461170757600080fd5b600080600080600080600080600060e08a8c03121561232757600080fd5b893567ffffffffffffffff8082111561233f57600080fd5b61234b8d838e0161226d565b909b50995089915061235f60208d0161211a565b985060408c0135975060608c0135965061237b60808d0161211a565b955060a08c013591508082111561239157600080fd5b5061239e8c828d016122b6565b90945092505060c08a01356123b2816122fb565b809150509295985092959850929598565b60008060008060008060008060e0898b0312156123df57600080fd5b883567ffffffffffffffff808211156123f757600080fd5b6124038c838d0161218d565b995061241160208c0161211a565b985060408b0135975060608b0135965061242d60808c0161211a565b955060a08b013591508082111561244357600080fd5b506124508b828c016122b6565b90945092505060c0890135612464816122fb565b809150509295985092959890939650565b60006020828403121561248757600080fd5b813561141c816122fb565b6000602082840312156124a457600080fd5b5035919050565b600080604083850312156124be57600080fd5b823567ffffffffffffffff8111156124d557600080fd5b6124e18582860161218d565b95602094909401359450505050565b60008060006040848603121561250557600080fd5b833567ffffffffffffffff81111561251c57600080fd5b6125288682870161226d565b909790965060209590950135949350505050565b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561258e5761258e61254c565b500190565b6000602082840312156125a557600080fd5b5051919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6080815260006126096080830187896125ac565b602083019590955250604081019290925260609091015292915050565b6000828210156126385761263861254c565b500390565b600060e082018a8352602073ffffffffffffffffffffffffffffffffffffffff808c16828601528a6040860152808a1660608601525060e060808501528187835261010092508285019050828860051b86010192508860005b89811015612740577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0087860301835281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18c36030181126126f757600080fd5b8b01803567ffffffffffffffff81111561271057600080fd5b8036038d131561271f57600080fd5b61272c87828885016125ac565b965050509183019190830190600101612696565b5050505060a08301949094525090151560c0909101529695505050505050565b60005b8381101561277b578181015183820152602001612763565b83811115611e925750506000910152565b600081518084526127a4816020860160208601612760565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6060815260006127e9606083018661278c565b60208301949094525060400152919050565b60006040828403121561280d57600080fd5b6040516040810181811067ffffffffffffffff821117156128305761283061215e565b604052825181526020928301519281019290925250919050565b60408152600061285d604083018561278c565b905073ffffffffffffffffffffffffffffffffffffffff831660208301529392505050565b60006020828403121561289457600080fd5b815161141c816122fb565b6060815260006128b36060830186886125ac565b6020830194909452506040015292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036129265761292661254c565b5060010190565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261296257600080fd5b83018035915067ffffffffffffffff82111561297d57600080fd5b6020019150368190038213156122af57600080fd5b600080858511156129a257600080fd5b838611156129af57600080fd5b5050820193919092039150565b80356020831015610699577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b60008351612a0a818460208801612760565b7f2e000000000000000000000000000000000000000000000000000000000000009083019081528351612a44816001840160208801612760565b01600101949350505050565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015280851660408401525060806060830152612a91608083018461278c565b9695505050505050565b60008251612aad818460208701612760565b9190910192915050565b60208152600061141c602083018461278c56fe42617365526567697374726172436f6e74726f6c6c65723a204661696c656420746f20736574205265636f7264a26469706673582212202c810e4fd28a5672b8b51209860c0e6667a05d2834d79406579270e360efa4e864736f6c634300080d0033000000000000000000000000f884647dfa84696d9373f36ee413ccc48093f924000000000000000000000000905f5280fc0b64fd1d3b0179f728bfb901426e5b00000000000000000000000082b28e5a2444d22af36e1bb40cfd1b3e155d9486

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

000000000000000000000000f884647dfa84696d9373f36ee413ccc48093f924000000000000000000000000905f5280fc0b64fd1d3b0179f728bfb901426e5b00000000000000000000000082b28e5a2444d22af36e1bb40cfd1b3e155d9486

-----Decoded View---------------
Arg [0] : _registrar (address): 0xf884647dfa84696d9373f36ee413ccc48093f924
Arg [1] : _priceOracle (address): 0x905f5280fc0b64fd1d3b0179f728bfb901426e5b
Arg [2] : _reverseRegistrar (address): 0x82b28e5a2444d22af36e1bb40cfd1b3e155d9486

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


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.