Contract 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65 6

 
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0x46d5e7b3700376f61fad6e81636bb756c7c714bae70156c81f1c08d38ba06101Deploy Proxy324252452022-08-28 20:51:46285 days 39 mins ago0x1e9f72c28b227cbb56577dc6f693b95237ac0bfe IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.027302683808 34.703478152
0x108408b322bb3994a82762bd2c3bed65b1cc33d9690e63fddf314af7b32c4b9aDeploy Proxy291367882022-06-04 1:53:23370 days 19 hrs ago0x6e50f5d4e0eb58cb38daaf3c5b8d97022e4af1ce IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.031228617635 37.274772033
0x2aa344b4b56d49a125fc2ea0062edfbf8df4ca0e2f191f42db13d246067447feDeploy Proxy291346672022-06-04 0:36:07370 days 20 hrs ago0x6e50f5d4e0eb58cb38daaf3c5b8d97022e4af1ce IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.029124304792 40.093038433
0xb0ec754d5e40a1dfd7932cd095ffac0ab19c467d8d06eae73e7913e4e52cb3bcDeploy Proxy285656542022-05-20 22:59:41384 days 22 hrs ago0xd30e6fe91139dd3f08e9bfd5bb47d309355dc480 IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.001286938598 1.500000115
0x18a1215fb891690789cb0e1986303dbeaac469a12e395c545e1055c003e915c1Deploy Proxy285303782022-05-20 1:46:45385 days 19 hrs ago0x603b50f347c2f303306ec178b1b32a244fadf743 IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.035064762609 46.962532323
0x31bfdf4d0bf9ccb373f5eba87ea4302667599c2f0fddcbd7ae421fcab365436bDeploy Proxy285071262022-05-19 12:02:43386 days 9 hrs ago0x8eff42ac21b14d730de067a3f68db2650c81ee29 IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.043975222291 53.33555968
0xc63566b182f75a19c55bfe33d6001166303bd278d5df3504236d6c2b4b1383dcDeploy Proxy284705192022-05-18 13:51:48387 days 7 hrs ago0xd16eda9cc40b49a0bec9483871e306201259e98b IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.056629995898 67.814344475
0x87922bf168fe370c4e43a8473a0b8acf7e3d9d5c30e85f4e3feb1133099f48d5Deploy Proxy284705082022-05-18 13:51:26387 days 7 hrs ago0xd16eda9cc40b49a0bec9483871e306201259e98b IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.062450822758 71.807811435
0xe2f98d5b7880c28d9332015c0232e5754653646632c621c54f48184c1fb71068Deploy Proxy284324072022-05-17 14:34:21388 days 6 hrs ago0xea2899e9caeb476668a3762f775ba24e661f83fc IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.06608603189 109.778920469
0xc96b08d89ea61cd2ea12b96413c4ad323f2990e2d557f16815dbd16c04dc50fdDeploy Proxy284322972022-05-17 14:30:33388 days 7 hrs ago0xea2899e9caeb476668a3762f775ba24e661f83fc IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.092047150472 146.853911289
0xbe599d14afe1c3adb7df4058c1ab2d6137cfa297700d75a59e52073ba4fcdd38Deploy Proxy284322152022-05-17 14:26:25388 days 7 hrs ago0xea2899e9caeb476668a3762f775ba24e661f83fc IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.09587781465 106.783983207
0x24b3eea80e7107a41622d4bee03d6ca6ccbbe54dd60954e8299639bdd5261ef4Deploy Proxy284321912022-05-17 14:24:45388 days 7 hrs ago0xea2899e9caeb476668a3762f775ba24e661f83fc IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.052679454964 63.092643384
0xf3ae5d9ee7d52fb88431d423fa53f17e3e4983eef4735f4823569aadcedd2dcdDeploy Proxy284321222022-05-17 14:22:23388 days 7 hrs ago0xea2899e9caeb476668a3762f775ba24e661f83fc IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.051323483701 60.204488638
0xb35af738f7898ba71c72e789d2d4b83eb084bcd7b311084af612ada6defdbe18Deploy Proxy284279312022-05-17 11:45:32388 days 9 hrs ago0x98fd17f691686fef33c0882fc5e1fd13af6f014e IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.018906181898 31.406035128
0x58630aebbfd893a60a345c62c5af2b8f9bfd7e235c3cfac59f20636e83385322Deploy Proxy283149952022-05-14 16:57:25391 days 4 hrs ago0xea2899e9caeb476668a3762f775ba24e661f83fc IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.035559081177 57.437474846
0xa189039bea8587b6ce407b4fe79bb29dbc6c0d41f942ecc92592a90aa75b0e09Deploy Proxy283146872022-05-14 16:46:49391 days 4 hrs ago0x98fd17f691686fef33c0882fc5e1fd13af6f014e IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.049140271212 78.399396313
0xfe7b24415a404c93a9ed4718f874e278ae997da662bc9941ab457ecd581ef681Deploy Proxy283143052022-05-14 16:33:43391 days 4 hrs ago0x98fd17f691686fef33c0882fc5e1fd13af6f014e IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.100064645501 111.42026461
0xbd47ddbbe5cb5eaf63f6e37c76ba031c88a77424eb992d4b31927ad11b53fa2aDeploy Proxy283130372022-05-14 15:50:07391 days 5 hrs ago0x98fd17f691686fef33c0882fc5e1fd13af6f014e IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.051048426429 61.124274005
0xf1bcb5049116b687f111c3d627b1f2abc174a3f9b1271310b649b7d725d7dbcfDeploy Proxy283126902022-05-14 15:37:43391 days 5 hrs ago0x98fd17f691686fef33c0882fc5e1fd13af6f014e IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.11900198148 136.815023972
0xe698c5a5b9d4f2272bf5351e415e73cd96fb850c46450489162e7dc252ac32f1Deploy Proxy278509952022-05-02 22:25:56402 days 23 hrs ago0x907c804524e39a87914f70dadba9bf2fd5be9491 IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.027620315265 33.999506712
0x3d2b324a867a87e1c360263d633fbf8b8ffb13a4af38b6ff962337cf61601facDeploy Proxy278509952022-05-02 22:25:56402 days 23 hrs ago0x907c804524e39a87914f70dadba9bf2fd5be9491 IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.025847417888 31.818080739
0xb236c7f765895bea7ef100a9cfda794fa2d0d26cd9f8ad0d2d74a0349edf303cDeploy Proxy278509952022-05-02 22:25:56402 days 23 hrs ago0x907c804524e39a87914f70dadba9bf2fd5be9491 IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.029445702295 36.24755622
0xb8b0e9a00117acf345fe5d43e095df132768c93d288f6e1e26760f5327f5eb3aDeploy Proxy278509952022-05-02 22:25:56402 days 23 hrs ago0x907c804524e39a87914f70dadba9bf2fd5be9491 IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.026749061163 32.928000448
0x7f22592389190093928fdae33a6f68b6ba02bf6570cea6cafaff71d5279766a3Deploy Proxy278509952022-05-02 22:25:56402 days 23 hrs ago0x907c804524e39a87914f70dadba9bf2fd5be9491 IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.026760206244 32.941720003
0x9c75adf025c1d0498120e5664f3e5730e8b443d115553bcf08aafffa1d3bf4e9Deploy Proxy278509952022-05-02 22:25:56402 days 23 hrs ago0x907c804524e39a87914f70dadba9bf2fd5be9491 IN  0x11c34f062cb10a20b9f463e12ff9da62d76fdf650 MATIC0.028547020037 34.416806363
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x46d5e7b3700376f61fad6e81636bb756c7c714bae70156c81f1c08d38ba06101324252452022-08-28 20:51:46285 days 39 mins ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0x108408b322bb3994a82762bd2c3bed65b1cc33d9690e63fddf314af7b32c4b9a291367882022-06-04 1:53:23370 days 19 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0x2aa344b4b56d49a125fc2ea0062edfbf8df4ca0e2f191f42db13d246067447fe291346672022-06-04 0:36:07370 days 20 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0xb0ec754d5e40a1dfd7932cd095ffac0ab19c467d8d06eae73e7913e4e52cb3bc285656542022-05-20 22:59:41384 days 22 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0x18a1215fb891690789cb0e1986303dbeaac469a12e395c545e1055c003e915c1285303782022-05-20 1:46:45385 days 19 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0x31bfdf4d0bf9ccb373f5eba87ea4302667599c2f0fddcbd7ae421fcab365436b285071262022-05-19 12:02:43386 days 9 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0xc63566b182f75a19c55bfe33d6001166303bd278d5df3504236d6c2b4b1383dc284705192022-05-18 13:51:48387 days 7 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0x87922bf168fe370c4e43a8473a0b8acf7e3d9d5c30e85f4e3feb1133099f48d5284705082022-05-18 13:51:26387 days 7 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0xe2f98d5b7880c28d9332015c0232e5754653646632c621c54f48184c1fb71068284324072022-05-17 14:34:21388 days 6 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0xc96b08d89ea61cd2ea12b96413c4ad323f2990e2d557f16815dbd16c04dc50fd284322972022-05-17 14:30:33388 days 7 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0xbe599d14afe1c3adb7df4058c1ab2d6137cfa297700d75a59e52073ba4fcdd38284322152022-05-17 14:26:25388 days 7 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0x24b3eea80e7107a41622d4bee03d6ca6ccbbe54dd60954e8299639bdd5261ef4284321912022-05-17 14:24:45388 days 7 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0xf3ae5d9ee7d52fb88431d423fa53f17e3e4983eef4735f4823569aadcedd2dcd284321222022-05-17 14:22:23388 days 7 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0xb35af738f7898ba71c72e789d2d4b83eb084bcd7b311084af612ada6defdbe18284279312022-05-17 11:45:32388 days 9 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0x58630aebbfd893a60a345c62c5af2b8f9bfd7e235c3cfac59f20636e83385322283149952022-05-14 16:57:25391 days 4 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0xa189039bea8587b6ce407b4fe79bb29dbc6c0d41f942ecc92592a90aa75b0e09283146872022-05-14 16:46:49391 days 4 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0xfe7b24415a404c93a9ed4718f874e278ae997da662bc9941ab457ecd581ef681283143052022-05-14 16:33:43391 days 4 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0xbd47ddbbe5cb5eaf63f6e37c76ba031c88a77424eb992d4b31927ad11b53fa2a283130372022-05-14 15:50:07391 days 5 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0xf1bcb5049116b687f111c3d627b1f2abc174a3f9b1271310b649b7d725d7dbcf283126902022-05-14 15:37:43391 days 5 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0xe698c5a5b9d4f2272bf5351e415e73cd96fb850c46450489162e7dc252ac32f1278509952022-05-02 22:25:56402 days 23 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0x3d2b324a867a87e1c360263d633fbf8b8ffb13a4af38b6ff962337cf61601fac278509952022-05-02 22:25:56402 days 23 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0xb236c7f765895bea7ef100a9cfda794fa2d0d26cd9f8ad0d2d74a0349edf303c278509952022-05-02 22:25:56402 days 23 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0xb8b0e9a00117acf345fe5d43e095df132768c93d288f6e1e26760f5327f5eb3a278509952022-05-02 22:25:56402 days 23 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0x7f22592389190093928fdae33a6f68b6ba02bf6570cea6cafaff71d5279766a3278509952022-05-02 22:25:56402 days 23 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
0x9c75adf025c1d0498120e5664f3e5730e8b443d115553bcf08aafffa1d3bf4e9278509952022-05-02 22:25:56402 days 23 hrs ago 0x11c34f062cb10a20b9f463e12ff9da62d76fdf65  Contract Creation0 MATIC
[ Download CSV Export 
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x26d03F39140486CA9448Ce014353195CacffC36c

Contract Name:
TWFactory

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 17 : TWFactory.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.11;

import "./TWRegistry.sol";
import "./interfaces/IThirdwebContract.sol";

import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/metatx/ERC2771Context.sol";
import "@openzeppelin/contracts/utils/Create2.sol";
import "@openzeppelin/contracts/utils/Multicall.sol";
import "@openzeppelin/contracts/proxy/Clones.sol";

contract TWFactory is Multicall, ERC2771Context, AccessControlEnumerable {
    /// @dev Only FACTORY_ROLE holders can approve/unapprove implementations for proxies to point to.
    bytes32 public constant FACTORY_ROLE = keccak256("FACTORY_ROLE");

    TWRegistry public immutable registry;

    /// @dev Emitted when a proxy is deployed.
    event ProxyDeployed(address indexed implementation, address proxy, address indexed deployer);
    event ImplementationAdded(address implementation, bytes32 indexed contractType, uint256 version);
    event ImplementationApproved(address implementation, bool isApproved);

    /// @dev mapping of implementation address to deployment approval
    mapping(address => bool) public approval;

    /// @dev mapping of implementation address to implementation added version
    mapping(bytes32 => uint256) public currentVersion;

    /// @dev mapping of contract type to module version to implementation address
    mapping(bytes32 => mapping(uint256 => address)) public implementation;

    /// @dev mapping of proxy address to deployer address
    mapping(address => address) public deployer;

    constructor(address _trustedForwarder, address _registry) ERC2771Context(_trustedForwarder) {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _setupRole(FACTORY_ROLE, _msgSender());

        registry = TWRegistry(_registry);
    }

    /// @dev Deploys a proxy that points to the latest version of the given module type.
    function deployProxy(bytes32 _type, bytes memory _data) external returns (address) {
        bytes32 salt = bytes32(registry.count(_msgSender()));
        return deployProxyDeterministic(_type, _data, salt);
    }

    /**
     *  @dev Deploys a proxy at a deterministic address by taking in `salt` as a parameter.
     *       Proxy points to the latest version of the given module type.
     */
    function deployProxyDeterministic(
        bytes32 _type,
        bytes memory _data,
        bytes32 _salt
    ) public returns (address) {
        address _implementation = implementation[_type][currentVersion[_type]];
        return deployProxyByImplementation(_implementation, _data, _salt);
    }

    /// @dev Deploys a proxy that points to the given implementation.
    function deployProxyByImplementation(
        address _implementation,
        bytes memory _data,
        bytes32 _salt
    ) public returns (address deployedProxy) {
        require(approval[_implementation], "implementation not approved");

        bytes32 salthash = keccak256(abi.encodePacked(_msgSender(), _salt));
        deployedProxy = Clones.cloneDeterministic(_implementation, salthash);

        deployer[deployedProxy] = _msgSender();

        emit ProxyDeployed(_implementation, deployedProxy, _msgSender());

        registry.add(_msgSender(), deployedProxy);

        if (_data.length > 0) {
            // slither-disable-next-line unused-return
            Address.functionCall(deployedProxy, _data);
        }
    }

    /// @dev Lets a contract admin set the address of a module type x version.
    function addImplementation(address _implementation) external {
        require(hasRole(FACTORY_ROLE, _msgSender()), "not admin.");

        IThirdwebContract module = IThirdwebContract(_implementation);
        bytes32 ctype = module.contractType();
        uint8 version = module.contractVersion();
        require(ctype.length > 0 && version > 0, "invalid module");

        currentVersion[ctype] += 1;
        require(currentVersion[ctype] == version, "wrong module version");

        implementation[ctype][version] = _implementation;
        approval[_implementation] = true;

        emit ImplementationAdded(_implementation, ctype, version);
    }

    /// @dev Lets a contract admin approve a specific contract for deployment.
    function approveImplementation(address _implementation, bool _toApprove) external {
        require(hasRole(FACTORY_ROLE, _msgSender()), "not admin.");

        approval[_implementation] = _toApprove;

        emit ImplementationApproved(_implementation, _toApprove);
    }

    /// @dev Returns the implementation given a module type and version.
    function getImplementation(bytes32 _type, uint256 _version) external view returns (address) {
        return implementation[_type][_version];
    }

    function _msgSender() internal view virtual override(Context, ERC2771Context) returns (address sender) {
        return ERC2771Context._msgSender();
    }

    function _msgData() internal view virtual override(Context, ERC2771Context) returns (bytes calldata) {
        return ERC2771Context._msgData();
    }
}

File 2 of 17 : TWRegistry.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.11;

import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/utils/Multicall.sol";
import "@openzeppelin/contracts/metatx/ERC2771Context.sol";

contract TWRegistry is Multicall, ERC2771Context, AccessControlEnumerable {
    bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");

    using EnumerableSet for EnumerableSet.AddressSet;

    /// @dev wallet address => [contract addresses]
    mapping(address => EnumerableSet.AddressSet) private deployments;

    event Added(address indexed deployer, address indexed deployment);
    event Deleted(address indexed deployer, address indexed deployment);

    constructor(address _trustedForwarder) ERC2771Context(_trustedForwarder) {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
    }

    // slither-disable-next-line similar-names
    function add(address _deployer, address _deployment) external {
        require(hasRole(OPERATOR_ROLE, _msgSender()) || _deployer == _msgSender(), "not operator or deployer.");

        bool added = deployments[_deployer].add(_deployment);
        require(added, "failed to add");

        emit Added(_deployer, _deployment);
    }

    // slither-disable-next-line similar-names
    function remove(address _deployer, address _deployment) external {
        require(hasRole(OPERATOR_ROLE, _msgSender()) || _deployer == _msgSender(), "not operator or deployer.");

        bool removed = deployments[_deployer].remove(_deployment);
        require(removed, "failed to remove");

        emit Deleted(_deployer, _deployment);
    }

    function getAll(address _deployer) external view returns (address[] memory) {
        return deployments[_deployer].values();
    }

    function count(address _deployer) external view returns (uint256) {
        return deployments[_deployer].length();
    }

    function _msgSender() internal view virtual override(Context, ERC2771Context) returns (address sender) {
        return ERC2771Context._msgSender();
    }

    function _msgData() internal view virtual override(Context, ERC2771Context) returns (bytes calldata) {
        return ERC2771Context._msgData();
    }
}

File 3 of 17 : IThirdwebContract.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.11;

interface IThirdwebContract {
    /// @dev Returns the module type of the contract.
    function contractType() external pure returns (bytes32);

    /// @dev Returns the version of the contract.
    function contractVersion() external pure returns (uint8);

    /// @dev Returns the metadata URI of the contract.
    function contractURI() external view returns (string memory);

    /**
     *  @dev Sets contract URI for the storefront-level metadata of the contract.
     *       Only module admin can call this function.
     */
    function setContractURI(string calldata _uri) external;
}

File 4 of 17 : AccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override {
        super._grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override {
        super._revokeRole(role, account);
        _roleMembers[role].remove(account);
    }
}

File 5 of 17 : ERC2771Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (metatx/ERC2771Context.sol)

pragma solidity ^0.8.9;

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

/**
 * @dev Context variant with ERC2771 support.
 */
abstract contract ERC2771Context is Context {
    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable
    address private immutable _trustedForwarder;

    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor(address trustedForwarder) {
        _trustedForwarder = trustedForwarder;
    }

    function isTrustedForwarder(address forwarder) public view virtual returns (bool) {
        return forwarder == _trustedForwarder;
    }

    function _msgSender() internal view virtual override returns (address sender) {
        if (isTrustedForwarder(msg.sender)) {
            // The assembly code is more direct than the Solidity version using `abi.decode`.
            assembly {
                sender := shr(96, calldataload(sub(calldatasize(), 20)))
            }
        } else {
            return super._msgSender();
        }
    }

    function _msgData() internal view virtual override returns (bytes calldata) {
        if (isTrustedForwarder(msg.sender)) {
            return msg.data[:msg.data.length - 20];
        } else {
            return super._msgData();
        }
    }
}

File 6 of 17 : Create2.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Create2.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at
     * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.
     */
    function computeAddress(
        bytes32 salt,
        bytes32 bytecodeHash,
        address deployer
    ) internal pure returns (address) {
        bytes32 _data = keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash));
        return address(uint160(uint256(_data)));
    }
}

File 7 of 17 : Multicall.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Multicall.sol)

pragma solidity ^0.8.0;

import "./Address.sol";

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

File 8 of 17 : Clones.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/Clones.sol)

pragma solidity ^0.8.0;

/**
 * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
 * deploying minimal proxy contracts, also known as "clones".
 *
 * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
 * > a minimal bytecode implementation that delegates all calls to a known, fixed address.
 *
 * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
 * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
 * deterministic method.
 *
 * _Available since v3.4._
 */
library Clones {
    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create opcode, which should never revert.
     */
    function clone(address implementation) internal returns (address instance) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create(0, ptr, 0x37)
        }
        require(instance != address(0), "ERC1167: create failed");
    }

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create2 opcode and a `salt` to deterministically deploy
     * the clone. Using the same `implementation` and `salt` multiple time will revert, since
     * the clones cannot be deployed twice at the same address.
     */
    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create2(0, ptr, 0x37, salt)
        }
        require(instance != address(0), "ERC1167: create2 failed");
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt,
        address deployer
    ) internal pure returns (address predicted) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)
            mstore(add(ptr, 0x38), shl(0x60, deployer))
            mstore(add(ptr, 0x4c), salt)
            mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))
            predicted := keccak256(add(ptr, 0x37), 0x55)
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(address implementation, bytes32 salt)
        internal
        view
        returns (address predicted)
    {
        return predictDeterministicAddress(implementation, salt, address(this));
    }
}

File 9 of 17 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 10 of 17 : IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

File 11 of 17 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 12 of 17 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 13 of 17 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 14 of 17 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 15 of 17 : 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 16 of 17 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 17 of 17 : 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);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_trustedForwarder","type":"address"},{"internalType":"address","name":"_registry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"implementation","type":"address"},{"indexed":true,"internalType":"bytes32","name":"contractType","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"version","type":"uint256"}],"name":"ImplementationAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"implementation","type":"address"},{"indexed":false,"internalType":"bool","name":"isApproved","type":"bool"}],"name":"ImplementationApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"},{"indexed":false,"internalType":"address","name":"proxy","type":"address"},{"indexed":true,"internalType":"address","name":"deployer","type":"address"}],"name":"ProxyDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FACTORY_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_implementation","type":"address"}],"name":"addImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approval","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_implementation","type":"address"},{"internalType":"bool","name":"_toApprove","type":"bool"}],"name":"approveImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"currentVersion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_type","type":"bytes32"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"deployProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_implementation","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"deployProxyByImplementation","outputs":[{"internalType":"address","name":"deployedProxy","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_type","type":"bytes32"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"deployProxyDeterministic","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"deployer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_type","type":"bytes32"},{"internalType":"uint256","name":"_version","type":"uint256"}],"name":"getImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registry","outputs":[{"internalType":"contract TWRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60c06040523480156200001157600080fd5b5060405162001f8738038062001f87833981016040819052620000349162000276565b6001600160a01b0382166080526200005760006200005162000099565b620000b5565b620000867fdfbefbf47cfe66b701d8cfdbce1de81c821590819cb07e71cb01b6602fb0ee276200005162000099565b6001600160a01b031660a05250620002ae565b6000620000b0620000c560201b62000d411760201c565b905090565b620000c18282620000fe565b5050565b6080516000906001600160a01b0316331415620000e9575060131936013560601c90565b620000b06200014160201b62000d8b1760201c565b6200011582826200014560201b62000d8f1760201c565b60008281526001602090815260409091206200013c91839062000e2e620001e7821b17901c565b505050565b3390565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000c1576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001a362000099565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620001fe836001600160a01b03841662000207565b90505b92915050565b6000818152600183016020526040812054620002505750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000201565b50600062000201565b80516001600160a01b03811681146200027157600080fd5b919050565b600080604083850312156200028a57600080fd5b620002958362000259565b9150620002a56020840162000259565b90509250929050565b60805160a051611c9e620002e9600039600081816102f00152818161060b0152610c8f0152600081816102bb0152610d450152611c9e6000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c80639010d07c116100e3578063c6e2a4001161008c578063dd47595a11610066578063dd47595a14610409578063e92016a41461043d578063ec54d72f1461047157600080fd5b8063c6e2a400146103d0578063ca15c873146103e3578063d547741f146103f657600080fd5b8063a217fddf116100bd578063a217fddf1461037f578063ac9650d814610387578063b9caf9d9146103a757600080fd5b80639010d07c1461031257806391d14854146103255780639430b4961461035c57600080fd5b80632f2ff15d1161014557806356fb09581161011f57806356fb095814610298578063572b6c05146102ab5780637b103999146102eb57600080fd5b80632f2ff15d1461025057806336568abe146102655780633b426d3f1461027857600080fd5b806311b804ab1161017657806311b804ab146101ef5780631e5e1e991461021a578063248a9ca31461022d57600080fd5b806301ffc9a71461019257806304a0fb17146101ba575b600080fd5b6101a56101a03660046116c3565b610484565b60405190151581526020015b60405180910390f35b6101e17fdfbefbf47cfe66b701d8cfdbce1de81c821590819cb07e71cb01b6602fb0ee2781565b6040519081526020016101b1565b6102026101fd3660046117ac565b6104af565b6040516001600160a01b0390911681526020016101b1565b610202610228366004611803565b6106bf565b6101e161023b366004611836565b60009081526020819052604090206001015490565b61026361025e36600461184f565b6106ff565b005b61026361027336600461184f565b610731565b6101e1610286366004611836565b60036020526000908152604090205481565b6102636102a636600461187b565b6107cd565b6101a56102b93660046118b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6102027f000000000000000000000000000000000000000000000000000000000000000081565b6102026103203660046118d2565b610895565b6101a561033336600461184f565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6101a561036a3660046118b7565b60026020526000908152604090205460ff1681565b6101e1600081565b61039a6103953660046118f4565b6108ad565b6040516101b191906119c5565b6102026103b53660046118b7565b6005602052600090815260409020546001600160a01b031681565b6102636103de3660046118b7565b6109a2565b6101e16103f1366004611836565b610c4b565b61026361040436600461184f565b610c62565b6102026104173660046118d2565b60009182526004602090815260408084209284529190529020546001600160a01b031690565b61020261044b3660046118d2565b60046020908152600092835260408084209091529082529020546001600160a01b031681565b61020261047f366004611a27565b610c8a565b60006001600160e01b03198216635a05180f60e01b14806104a957506104a982610e43565b92915050565b6001600160a01b03831660009081526002602052604081205460ff1661051c5760405162461bcd60e51b815260206004820152601b60248201527f696d706c656d656e746174696f6e206e6f7420617070726f766564000000000060448201526064015b60405180910390fd5b6000610526610e78565b8360405160200161055592919060609290921b6bffffffffffffffffffffffff19168252601482015260340190565b6040516020818303038152906040528051906020012090506105778582610e82565b9150610581610e78565b6001600160a01b038381166000908152600560205260409020805473ffffffffffffffffffffffffffffffffffffffff1916929091169190911790556105c5610e78565b6040516001600160a01b038481168252918216918716907f9e0862c4ebff2150fbbfd3f8547483f55bdec0c34fd977d3fccaa55d6c4ce7849060200160405180910390a37f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166352c28fab610640610e78565b6040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529085166024820152604401600060405180830381600087803b15801561068957600080fd5b505af115801561069d573d6000803e3d6000fd5b505050506000845111156106b7576106b58285610f39565b505b509392505050565b6000838152600460209081526040808320600383528184205484529091528120546001600160a01b03166106f48185856104af565b9150505b9392505050565b6000828152602081905260409020600101546107228161071d610e78565b610f7b565b61072c8383610ff9565b505050565b610739610e78565b6001600160a01b0316816001600160a01b0316146107bf5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610513565b6107c9828261101b565b5050565b6107f97fdfbefbf47cfe66b701d8cfdbce1de81c821590819cb07e71cb01b6602fb0ee27610333610e78565b6108325760405162461bcd60e51b815260206004820152600a6024820152693737ba1030b236b4b71760b11b6044820152606401610513565b6001600160a01b038216600081815260026020908152604091829020805460ff19168515159081179091558251938452908301527f46c2f0868ef35772e9324a42eb6fa484490cca8494538a909cf05c897d7d4108910160405180910390a15050565b60008281526001602052604081206106f8908361103d565b60608167ffffffffffffffff8111156108c8576108c8611709565b6040519080825280602002602001820160405280156108fb57816020015b60608152602001906001900390816108e65790505b50905060005b8281101561099b5761096b3085858481811061091f5761091f611a6e565b90506020028101906109319190611a84565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061104992505050565b82828151811061097d5761097d611a6e565b6020026020010181905250808061099390611ae8565b915050610901565b5092915050565b6109ce7fdfbefbf47cfe66b701d8cfdbce1de81c821590819cb07e71cb01b6602fb0ee27610333610e78565b610a075760405162461bcd60e51b815260206004820152600a6024820152693737ba1030b236b4b71760b11b6044820152606401610513565b60008190506000816001600160a01b031663cb2ef6f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a709190611b03565b90506000826001600160a01b031663a0a8e4606040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ab2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad69190611b1c565b905060008160ff1611610b2b5760405162461bcd60e51b815260206004820152600e60248201527f696e76616c6964206d6f64756c650000000000000000000000000000000000006044820152606401610513565b6000828152600360205260408120805460019290610b4a908490611b3f565b909155505060008281526003602052604090205460ff821614610baf5760405162461bcd60e51b815260206004820152601460248201527f77726f6e67206d6f64756c652076657273696f6e0000000000000000000000006044820152606401610513565b600082815260046020908152604080832060ff8516808552908352818420805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038a169081179091558085526002845293829020805460ff1916600117905581519384529183019190915283917fc39db2d47bafbb20367a9c840abffa57a2bc243c1f1e67c939ea0e89e59ed01a910160405180910390a250505050565b60008181526001602052604081206104a99061106e565b600082815260208190526040902060010154610c808161071d610e78565b61072c838361101b565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166305d85eda610cc4610e78565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2c9190611b03565b9050610d398484836106bf565b949350505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316331415610d81575060131936013560601c90565b503390565b905090565b3390565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166107c9576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610dea610e78565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006106f8836001600160a01b038416611078565b60006001600160e01b03198216637965db0b60e01b14806104a957506301ffc9a760e01b6001600160e01b03198316146104a9565b6000610d86610d41565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528360601b60148201527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006028820152826037826000f59150506001600160a01b0381166104a95760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606401610513565b60606106f883836040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c656400008152506110c7565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166107c957610fb7816001600160a01b031660146110d6565b610fc28360206110d6565b604051602001610fd3929190611b57565b60408051601f198184030181529082905262461bcd60e51b825261051391600401611bd8565b6110038282610d8f565b600082815260016020526040902061072c9082610e2e565b611025828261127f565b600082815260016020526040902061072c908261131c565b60006106f88383611331565b60606106f88383604051806060016040528060278152602001611c6b6027913961135b565b60006104a9825490565b60008181526001830160205260408120546110bf575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556104a9565b5060006104a9565b6060610d39848460008561144f565b606060006110e5836002611beb565b6110f0906002611b3f565b67ffffffffffffffff81111561110857611108611709565b6040519080825280601f01601f191660200182016040528015611132576020820181803683370190505b509050600360fc1b8160008151811061114d5761114d611a6e565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061117c5761117c611a6e565b60200101906001600160f81b031916908160001a90535060006111a0846002611beb565b6111ab906001611b3f565b90505b6001811115611230577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106111ec576111ec611a6e565b1a60f81b82828151811061120257611202611a6e565b60200101906001600160f81b031916908160001a90535060049490941c9361122981611c0a565b90506111ae565b5083156106f85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610513565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16156107c9576000828152602081815260408083206001600160a01b03851684529091529020805460ff191690556112d8610e78565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b60006106f8836001600160a01b038416611597565b600082600001828154811061134857611348611a6e565b9060005260206000200154905092915050565b60606001600160a01b0384163b6113da5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610513565b600080856001600160a01b0316856040516113f59190611c21565b600060405180830381855af49150503d8060008114611430576040519150601f19603f3d011682016040523d82523d6000602084013e611435565b606091505b509150915061144582828661168a565b9695505050505050565b6060824710156114c75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610513565b6001600160a01b0385163b61151e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610513565b600080866001600160a01b0316858760405161153a9190611c21565b60006040518083038185875af1925050503d8060008114611577576040519150601f19603f3d011682016040523d82523d6000602084013e61157c565b606091505b509150915061158c82828661168a565b979650505050505050565b600081815260018301602052604081205480156116805760006115bb600183611c3d565b85549091506000906115cf90600190611c3d565b90508181146116345760008660000182815481106115ef576115ef611a6e565b906000526020600020015490508087600001848154811061161257611612611a6e565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061164557611645611c54565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506104a9565b60009150506104a9565b606083156116995750816106f8565b8251156116a95782518084602001fd5b8160405162461bcd60e51b81526004016105139190611bd8565b6000602082840312156116d557600080fd5b81356001600160e01b0319811681146106f857600080fd5b80356001600160a01b038116811461170457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261173057600080fd5b813567ffffffffffffffff8082111561174b5761174b611709565b604051601f8301601f19908116603f0116810190828211818310171561177357611773611709565b8160405283815286602085880101111561178c57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000606084860312156117c157600080fd5b6117ca846116ed565b9250602084013567ffffffffffffffff8111156117e657600080fd5b6117f28682870161171f565b925050604084013590509250925092565b60008060006060848603121561181857600080fd5b83359250602084013567ffffffffffffffff8111156117e657600080fd5b60006020828403121561184857600080fd5b5035919050565b6000806040838503121561186257600080fd5b82359150611872602084016116ed565b90509250929050565b6000806040838503121561188e57600080fd5b611897836116ed565b9150602083013580151581146118ac57600080fd5b809150509250929050565b6000602082840312156118c957600080fd5b6106f8826116ed565b600080604083850312156118e557600080fd5b50508035926020909101359150565b6000806020838503121561190757600080fd5b823567ffffffffffffffff8082111561191f57600080fd5b818501915085601f83011261193357600080fd5b81358181111561194257600080fd5b8660208260051b850101111561195757600080fd5b60209290920196919550909350505050565b60005b8381101561198457818101518382015260200161196c565b83811115611993576000848401525b50505050565b600081518084526119b1816020860160208601611969565b601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611a1a57603f19888603018452611a08858351611999565b945092850192908501906001016119ec565b5092979650505050505050565b60008060408385031215611a3a57600080fd5b82359150602083013567ffffffffffffffff811115611a5857600080fd5b611a648582860161171f565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112611a9b57600080fd5b83018035915067ffffffffffffffff821115611ab657600080fd5b602001915036819003821315611acb57600080fd5b9250929050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415611afc57611afc611ad2565b5060010190565b600060208284031215611b1557600080fd5b5051919050565b600060208284031215611b2e57600080fd5b815160ff811681146106f857600080fd5b60008219821115611b5257611b52611ad2565b500190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611b8f816017850160208801611969565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611bcc816028840160208801611969565b01602801949350505050565b6020815260006106f86020830184611999565b6000816000190483118215151615611c0557611c05611ad2565b500290565b600081611c1957611c19611ad2565b506000190190565b60008251611c33818460208701611969565b9190910192915050565b600082821015611c4f57611c4f611ad2565b500390565b634e487b7160e01b600052603160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c634300080c000a0000000000000000000000008cbc8b5d71702032904750a66aefe8b603ebc5380000000000000000000000007c487845f98938bb955b1d5ad069d9a30e4131fd

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