Contract 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0 12

Contract Overview

Balance:
0 MATIC

Token:
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0xd16438a7416312a39ef0221c62eb5f0541949ae5e5087b3d1d1674d2557889a5Deploy Proxy By ...336819362023-03-28 18:40:113 mins ago0xde8179fb0b408282c830da87f509ff0e6d92ea74 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.003000289152 3.589
0xeb7d3881c13e8a25d40c94c19cb5c4a163fc678abd819ec72654bd997f4b8d39Deploy Proxy By ...336816172023-03-28 18:28:5314 mins ago0x11a48f6cce25b1075ba891f97074a4fe083ef79b IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.003486415613 3.589
0x2d2eb428aa16be47f0ddb73f786ef49c9fbab1013ebc0a42cc0196cd8cf4f64aDeploy Proxy By ...336800482023-03-28 17:33:191 hr 10 mins ago0x48065cf0ec64a03d215492827ed3a6e8a69c602b IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002075715138 2.425000016
0x2d9c5f4b2fd605a21b957771a189fead9b077e53291a6a84b1bc30ca9a521be5Deploy Proxy By ...336799992023-03-28 17:31:331 hr 11 mins ago0x48065cf0ec64a03d215492827ed3a6e8a69c602b IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.029143070849 38.086555908
0x931f70cae45b976da01fe5c81afbbeeb1de0b29a2a10c9a5381ff8cb3db7538eDeploy Proxy By ...336799872023-03-28 17:31:091 hr 12 mins ago0x48065cf0ec64a03d215492827ed3a6e8a69c602b IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002746231019 3.588999999
0xbdf125ff096ec5fe958ae87362a864cff39920d224fab2597d94b70e9a2120e0Deploy Proxy By ...336799742023-03-28 17:30:411 hr 12 mins ago0x48065cf0ec64a03d215492827ed3a6e8a69c602b IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.001855443705 2.424846057
0xf2efe264b4fae01d670c2d5ba10b647a4feeb36b19da52326e198d77809c945dDeploy Proxy By ...336798852023-03-28 17:27:311 hr 15 mins ago0x48065cf0ec64a03d215492827ed3a6e8a69c602b IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002999470864 3.589000005
0xbb65bd75d2e319ca010b126245634baecffc2a6f75e8947082ed8b47dc140c76Deploy Proxy By ...336790732023-03-28 16:58:471 hr 44 mins ago0xc5aa4e5b77a8a70ffce865ce241d00e25daea4c6 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.003020790314 3.52829291
0xfc08b67257760c10c160d06d2c549aca2bb1b9e93bd3dfbd1b943ca1cfb75c29Deploy Proxy By ...336785832023-03-28 16:41:252 hrs 2 mins ago0x429505f06cf1214dc5d03c335cf4632b314ecb6c IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.017535173244 19.609703374
0x2499ed7f8ec8585a2b30bdf85b5f3cf745230189d083122b16c03d65d18c423eDeploy Proxy By ...336784792023-03-28 16:37:432 hrs 5 mins ago0x429505f06cf1214dc5d03c335cf4632b314ecb6c IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.022063392553 24.675959797
0xdd313236f6c7cdd4c5e51a79b380de12718513c3b347089541644cef081ddbebDeploy Proxy By ...336784392023-03-28 16:36:192 hrs 7 mins ago0x429505f06cf1214dc5d03c335cf4632b314ecb6c IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.017482076298 19.552686216
0x1a85e61b127f738c0122b153edc231df8da01ef92573d2459ad08bb9fbb5fea9Deploy Proxy By ...336783782023-03-28 16:34:092 hrs 9 mins ago0x429505f06cf1214dc5d03c335cf4632b314ecb6c IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.011437689119 12.792047107
0x615c554c4ed59ee5da0550799935f924b0b914d6eb8679563c8711d2feb98f7aDeploy Proxy By ...336782292023-03-28 16:28:532 hrs 14 mins ago0x429505f06cf1214dc5d03c335cf4632b314ecb6c IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.017889501223 20.008367314
0xda75c24b38c964fbeb65a5019e7a1a68ef00e859f5d8441d9c83cf95a362f118Deploy Proxy By ...336781812023-03-28 16:27:112 hrs 16 mins ago0x429505f06cf1214dc5d03c335cf4632b314ecb6c IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002235252516 2.500000019
0x255b9e97517f469f6d7c6174d6100b24cadb65a2533113e975603fb5a668aed5Deploy Proxy By ...336778852023-03-28 16:16:412 hrs 26 mins ago0xd1ec14b43e0038b00ae60959c88816cea30e0da0 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002999557001 3.589000007
0x2bf8232d2cb150539e4ce3ea16cba529ee314c07a8a2623c0c3d072290e46055Deploy Proxy By ...336774852023-03-28 16:02:312 hrs 40 mins ago0x323e4f40c6776c2dd297e7448f64c402453daf3e IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002408369679 2.813000045
0x275de989cfc2284c0733379c6480db6bd08ca092143a7003c60f09135b8b4375Deploy Proxy By ...336764352023-03-28 15:25:213 hrs 18 mins ago0x91d7883bc527378a88694d1798eadc64d7c37b0b IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.001309687514 1.500000017
0x9d7853c4edca9cd7d9a0f7a21174bcd21034e4205ab10f8a216f9658a2f6c3d0Deploy Proxy By ...336759352023-03-28 15:07:373 hrs 35 mins ago0xbeb538e4a627646dcf727b8e660281a431924dbf IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002265961239 2.425000016
0x169e53c27940f9137d0bf562f86f8ae0ae1d7c7d9bfbb680fad8bf64d83cb6fbDeploy Proxy By ...336758842023-03-28 15:05:493 hrs 37 mins ago0xb5310ac8625aee8bf2c7b3ab8d10c2ddfb509443 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002197700132 2.352250015
0x8fe8292b433765181f4ede1c702e829466727454262e6cc7aae9e025e08aa1baDeploy Proxy By ...336754082023-03-28 14:48:593 hrs 54 mins ago0x0487c952f3c4f34ed319649867a0802428569df0 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002244594589 2.352250016
0x4f8b00f69b8c3dcf7c70aa806160e478afecda4ca98c8ba6ec23893f653274b6Deploy Proxy By ...336750352023-03-28 14:35:454 hrs 7 mins ago0xc3d1a7c9a13e802f6bba4d4d245206024e2eefed IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.001521827644 1.963737258
0x003006c33ea16af84fa13354525fc32c09b3bc698f8bee171d1d3e18c11f435dDeploy Proxy By ...336748442023-03-28 14:28:594 hrs 14 mins ago0x299f5aedb3abb6ab855cd881f674756c5ef4cc99 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002416369525 2.822700016
0x023af8c38cd78ab41cf9f53b077d79f6f72996913d6afc73e2205f6616a5255dDeploy Proxy By ...336747162023-03-28 14:24:274 hrs 19 mins ago0x75e9ca1b925acf0ec101ce55c56a2bedde8115a2 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.06062787836 117.107119891
0xa502ffa0bdb2d137e505bf541d920078e05bdfa84ac3d9aeb6866827eb4cb973Deploy Proxy By ...336742592023-03-28 14:08:174 hrs 35 mins ago0xd1ec14b43e0038b00ae60959c88816cea30e0da0 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002031520013 2.500000016
0x569b135d30901d1f4e3fd7135e9342790238952b73272c38ef093c4e32b8d150Deploy Proxy By ...336737622023-03-28 13:50:414 hrs 52 mins ago0xdbcdf8ec3442e59fbfcd10acc83170fc98b34091 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.000895002009 1.500000016
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xd16438a7416312a39ef0221c62eb5f0541949ae5e5087b3d1d1674d2557889a5336819362023-03-28 18:40:113 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xeb7d3881c13e8a25d40c94c19cb5c4a163fc678abd819ec72654bd997f4b8d39336816172023-03-28 18:28:5314 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x2d2eb428aa16be47f0ddb73f786ef49c9fbab1013ebc0a42cc0196cd8cf4f64a336800482023-03-28 17:33:191 hr 10 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x2d9c5f4b2fd605a21b957771a189fead9b077e53291a6a84b1bc30ca9a521be5336799992023-03-28 17:31:331 hr 11 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x931f70cae45b976da01fe5c81afbbeeb1de0b29a2a10c9a5381ff8cb3db7538e336799872023-03-28 17:31:091 hr 12 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xbdf125ff096ec5fe958ae87362a864cff39920d224fab2597d94b70e9a2120e0336799742023-03-28 17:30:411 hr 12 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xf2efe264b4fae01d670c2d5ba10b647a4feeb36b19da52326e198d77809c945d336798852023-03-28 17:27:311 hr 15 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xbb65bd75d2e319ca010b126245634baecffc2a6f75e8947082ed8b47dc140c76336790732023-03-28 16:58:471 hr 44 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xfc08b67257760c10c160d06d2c549aca2bb1b9e93bd3dfbd1b943ca1cfb75c29336785832023-03-28 16:41:252 hrs 2 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x60c2a99fba7e2e33012b85b10b92b68e323225fb59aca9ce91d4308b8196eabc336785292023-03-28 16:39:312 hrs 3 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x2499ed7f8ec8585a2b30bdf85b5f3cf745230189d083122b16c03d65d18c423e336784792023-03-28 16:37:432 hrs 5 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xdd313236f6c7cdd4c5e51a79b380de12718513c3b347089541644cef081ddbeb336784392023-03-28 16:36:192 hrs 7 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x1a85e61b127f738c0122b153edc231df8da01ef92573d2459ad08bb9fbb5fea9336783782023-03-28 16:34:092 hrs 9 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x615c554c4ed59ee5da0550799935f924b0b914d6eb8679563c8711d2feb98f7a336782292023-03-28 16:28:532 hrs 14 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xda75c24b38c964fbeb65a5019e7a1a68ef00e859f5d8441d9c83cf95a362f118336781812023-03-28 16:27:112 hrs 16 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x255b9e97517f469f6d7c6174d6100b24cadb65a2533113e975603fb5a668aed5336778852023-03-28 16:16:412 hrs 26 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x2bf8232d2cb150539e4ce3ea16cba529ee314c07a8a2623c0c3d072290e46055336774852023-03-28 16:02:312 hrs 40 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x275de989cfc2284c0733379c6480db6bd08ca092143a7003c60f09135b8b4375336764352023-03-28 15:25:213 hrs 18 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x9d7853c4edca9cd7d9a0f7a21174bcd21034e4205ab10f8a216f9658a2f6c3d0336759352023-03-28 15:07:373 hrs 35 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x169e53c27940f9137d0bf562f86f8ae0ae1d7c7d9bfbb680fad8bf64d83cb6fb336758842023-03-28 15:05:493 hrs 37 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x8fe8292b433765181f4ede1c702e829466727454262e6cc7aae9e025e08aa1ba336754082023-03-28 14:48:593 hrs 54 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x4f8b00f69b8c3dcf7c70aa806160e478afecda4ca98c8ba6ec23893f653274b6336750352023-03-28 14:35:454 hrs 7 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x003006c33ea16af84fa13354525fc32c09b3bc698f8bee171d1d3e18c11f435d336748442023-03-28 14:28:594 hrs 14 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x023af8c38cd78ab41cf9f53b077d79f6f72996913d6afc73e2205f6616a5255d336747162023-03-28 14:24:274 hrs 19 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xa502ffa0bdb2d137e505bf541d920078e05bdfa84ac3d9aeb6866827eb4cb973336742592023-03-28 14:08:174 hrs 35 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  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.

Contract Source Code Verified (Exact Match)

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 contract 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 contract 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 contract type x version.
    function addImplementation(address _implementation) external {
        require(hasRole(FACTORY_ROLE, _msgSender()), "not admin.");

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

        uint8 version = module.contractVersion();
        uint8 currentVersionOfType = uint8(currentVersion[ctype]);
        require(version >= currentVersionOfType, "wrong module version");

        currentVersion[ctype] = 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 contract type and version.
    function getImplementation(bytes32 _type, uint256 _version) external view returns (address) {
        return implementation[_type][_version];
    }

    /// @dev Returns the latest implementation given a contract type.
    function getLatestImplementation(bytes32 _type) external view returns (address) {
        return implementation[_type][currentVersion[_type]];
    }

    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 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":"_type","type":"bytes32"}],"name":"getLatestImplementation","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"}]

60c06040523480156200001157600080fd5b5060405162001f6738038062001f67833981016040819052620000349162000276565b6001600160a01b0382166080526200005760006200005162000099565b620000b5565b620000867fdfbefbf47cfe66b701d8cfdbce1de81c821590819cb07e71cb01b6602fb0ee276200005162000099565b6001600160a01b031660a05250620002ae565b6000620000b0620000c560201b62000d211760201c565b905090565b620000c18282620000fe565b5050565b6080516000906001600160a01b0316331415620000e9575060131936013560601c90565b620000b06200014160201b62000d6b1760201c565b6200011582826200014560201b62000d6f1760201c565b60008281526001602090815260409091206200013c91839062000e0e620001e7821b17901c565b505050565b3390565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000c1576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001a362000099565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620001fe836001600160a01b03841662000207565b90505b92915050565b6000818152600183016020526040812054620002505750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000201565b50600062000201565b80516001600160a01b03811681146200027157600080fd5b919050565b600080604083850312156200028a57600080fd5b620002958362000259565b9150620002a56020840162000259565b90509250929050565b60805160a051611c7e620002e960003960008181610336015281816106510152610c6f0152600081816103010152610d250152611c7e6000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c80639010d07c116100e3578063c6e2a4001161008c578063dd47595a11610066578063dd47595a1461044f578063e92016a414610483578063ec54d72f146104b757600080fd5b8063c6e2a40014610416578063ca15c87314610429578063d547741f1461043c57600080fd5b8063a217fddf116100bd578063a217fddf146103c5578063ac9650d8146103cd578063b9caf9d9146103ed57600080fd5b80639010d07c1461035857806391d148541461036b5780639430b496146103a257600080fd5b806336568abe1161014557806356fb09581161011f57806356fb0958146102de578063572b6c05146102f15780637b1039991461033157600080fd5b806336568abe146102705780633b426d3f1461028357806344ab6680146102a357600080fd5b80631e5e1e99116101765780631e5e1e9914610225578063248a9ca3146102385780632f2ff15d1461025b57600080fd5b806301ffc9a71461019d57806304a0fb17146101c557806311b804ab146101fa575b600080fd5b6101b06101ab3660046116a3565b6104ca565b60405190151581526020015b60405180910390f35b6101ec7fdfbefbf47cfe66b701d8cfdbce1de81c821590819cb07e71cb01b6602fb0ee2781565b6040519081526020016101bc565b61020d61020836600461178c565b6104f5565b6040516001600160a01b0390911681526020016101bc565b61020d6102333660046117e3565b610705565b6101ec610246366004611816565b60009081526020819052604090206001015490565b61026e61026936600461182f565b610745565b005b61026e61027e36600461182f565b610777565b6101ec610291366004611816565b60036020526000908152604090205481565b61020d6102b1366004611816565b6000908152600460209081526040808320600383528184205484529091529020546001600160a01b031690565b61026e6102ec36600461185b565b610813565b6101b06102ff366004611897565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b61020d7f000000000000000000000000000000000000000000000000000000000000000081565b61020d6103663660046118b2565b6108db565b6101b061037936600461182f565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6101b06103b0366004611897565b60026020526000908152604090205460ff1681565b6101ec600081565b6103e06103db3660046118d4565b6108f3565b6040516101bc91906119a5565b61020d6103fb366004611897565b6005602052600090815260409020546001600160a01b031681565b61026e610424366004611897565b6109e8565b6101ec610437366004611816565b610c2b565b61026e61044a36600461182f565b610c42565b61020d61045d3660046118b2565b60009182526004602090815260408084209284529190529020546001600160a01b031690565b61020d6104913660046118b2565b60046020908152600092835260408084209091529082529020546001600160a01b031681565b61020d6104c5366004611a07565b610c6a565b60006001600160e01b03198216635a05180f60e01b14806104ef57506104ef82610e23565b92915050565b6001600160a01b03831660009081526002602052604081205460ff166105625760405162461bcd60e51b815260206004820152601b60248201527f696d706c656d656e746174696f6e206e6f7420617070726f766564000000000060448201526064015b60405180910390fd5b600061056c610e58565b8360405160200161059b92919060609290921b6bffffffffffffffffffffffff19168252601482015260340190565b6040516020818303038152906040528051906020012090506105bd8582610e62565b91506105c7610e58565b6001600160a01b038381166000908152600560205260409020805473ffffffffffffffffffffffffffffffffffffffff19169290911691909117905561060b610e58565b6040516001600160a01b038481168252918216918716907f9e0862c4ebff2150fbbfd3f8547483f55bdec0c34fd977d3fccaa55d6c4ce7849060200160405180910390a37f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166352c28fab610686610e58565b6040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529085166024820152604401600060405180830381600087803b1580156106cf57600080fd5b505af11580156106e3573d6000803e3d6000fd5b505050506000845111156106fd576106fb8285610f19565b505b509392505050565b6000838152600460209081526040808320600383528184205484529091528120546001600160a01b031661073a8185856104f5565b9150505b9392505050565b60008281526020819052604090206001015461076881610763610e58565b610f5b565b6107728383610fd9565b505050565b61077f610e58565b6001600160a01b0316816001600160a01b0316146108055760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610559565b61080f8282610ffb565b5050565b61083f7fdfbefbf47cfe66b701d8cfdbce1de81c821590819cb07e71cb01b6602fb0ee27610379610e58565b6108785760405162461bcd60e51b815260206004820152600a6024820152693737ba1030b236b4b71760b11b6044820152606401610559565b6001600160a01b038216600081815260026020908152604091829020805460ff19168515159081179091558251938452908301527f46c2f0868ef35772e9324a42eb6fa484490cca8494538a909cf05c897d7d4108910160405180910390a15050565b600082815260016020526040812061073e908361101d565b60608167ffffffffffffffff81111561090e5761090e6116e9565b60405190808252806020026020018201604052801561094157816020015b606081526020019060019003908161092c5790505b50905060005b828110156109e1576109b13085858481811061096557610965611a4e565b90506020028101906109779190611a64565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061102992505050565b8282815181106109c3576109c3611a4e565b602002602001018190525080806109d990611ac8565b915050610947565b5092915050565b610a147fdfbefbf47cfe66b701d8cfdbce1de81c821590819cb07e71cb01b6602fb0ee27610379610e58565b610a4d5760405162461bcd60e51b815260206004820152600a6024820152693737ba1030b236b4b71760b11b6044820152606401610559565b60008190506000816001600160a01b031663cb2ef6f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab69190611ae3565b90506000826001600160a01b031663a0a8e4606040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1c9190611afc565b60008381526003602052604090205490915060ff8082169083161015610b845760405162461bcd60e51b815260206004820152601460248201527f77726f6e67206d6f64756c652076657273696f6e0000000000000000000000006044820152606401610559565b600083815260036020908152604080832060ff861690819055600483528184208185528352818420805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038b169081179091558085526002845293829020805460ff1916600117905581519384529183019190915284917fc39db2d47bafbb20367a9c840abffa57a2bc243c1f1e67c939ea0e89e59ed01a910160405180910390a25050505050565b60008181526001602052604081206104ef9061104e565b600082815260208190526040902060010154610c6081610763610e58565b6107728383610ffb565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166305d85eda610ca4610e58565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610ce8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0c9190611ae3565b9050610d19848483610705565b949350505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316331415610d61575060131936013560601c90565b503390565b905090565b3390565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661080f576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610dca610e58565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061073e836001600160a01b038416611058565b60006001600160e01b03198216637965db0b60e01b14806104ef57506301ffc9a760e01b6001600160e01b03198316146104ef565b6000610d66610d21565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528360601b60148201527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006028820152826037826000f59150506001600160a01b0381166104ef5760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606401610559565b606061073e83836040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c656400008152506110a7565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661080f57610f97816001600160a01b031660146110b6565b610fa28360206110b6565b604051602001610fb3929190611b1f565b60408051601f198184030181529082905262461bcd60e51b825261055991600401611ba0565b610fe38282610d6f565b60008281526001602052604090206107729082610e0e565b611005828261125f565b600082815260016020526040902061077290826112fc565b600061073e8383611311565b606061073e8383604051806060016040528060278152602001611c4b6027913961133b565b60006104ef825490565b600081815260018301602052604081205461109f575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556104ef565b5060006104ef565b6060610d19848460008561142f565b606060006110c5836002611bb3565b6110d0906002611bd2565b67ffffffffffffffff8111156110e8576110e86116e9565b6040519080825280601f01601f191660200182016040528015611112576020820181803683370190505b509050600360fc1b8160008151811061112d5761112d611a4e565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061115c5761115c611a4e565b60200101906001600160f81b031916908160001a9053506000611180846002611bb3565b61118b906001611bd2565b90505b6001811115611210577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106111cc576111cc611a4e565b1a60f81b8282815181106111e2576111e2611a4e565b60200101906001600160f81b031916908160001a90535060049490941c9361120981611bea565b905061118e565b50831561073e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610559565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161561080f576000828152602081815260408083206001600160a01b03851684529091529020805460ff191690556112b8610e58565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600061073e836001600160a01b038416611577565b600082600001828154811061132857611328611a4e565b9060005260206000200154905092915050565b60606001600160a01b0384163b6113ba5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610559565b600080856001600160a01b0316856040516113d59190611c01565b600060405180830381855af49150503d8060008114611410576040519150601f19603f3d011682016040523d82523d6000602084013e611415565b606091505b509150915061142582828661166a565b9695505050505050565b6060824710156114a75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610559565b6001600160a01b0385163b6114fe5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610559565b600080866001600160a01b0316858760405161151a9190611c01565b60006040518083038185875af1925050503d8060008114611557576040519150601f19603f3d011682016040523d82523d6000602084013e61155c565b606091505b509150915061156c82828661166a565b979650505050505050565b6000818152600183016020526040812054801561166057600061159b600183611c1d565b85549091506000906115af90600190611c1d565b90508181146116145760008660000182815481106115cf576115cf611a4e565b90600052602060002001549050808760000184815481106115f2576115f2611a4e565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061162557611625611c34565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506104ef565b60009150506104ef565b6060831561167957508161073e565b8251156116895782518084602001fd5b8160405162461bcd60e51b81526004016105599190611ba0565b6000602082840312156116b557600080fd5b81356001600160e01b03198116811461073e57600080fd5b80356001600160a01b03811681146116e457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261171057600080fd5b813567ffffffffffffffff8082111561172b5761172b6116e9565b604051601f8301601f19908116603f01168101908282118183101715611753576117536116e9565b8160405283815286602085880101111561176c57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000606084860312156117a157600080fd5b6117aa846116cd565b9250602084013567ffffffffffffffff8111156117c657600080fd5b6117d2868287016116ff565b925050604084013590509250925092565b6000806000606084860312156117f857600080fd5b83359250602084013567ffffffffffffffff8111156117c657600080fd5b60006020828403121561182857600080fd5b5035919050565b6000806040838503121561184257600080fd5b82359150611852602084016116cd565b90509250929050565b6000806040838503121561186e57600080fd5b611877836116cd565b91506020830135801515811461188c57600080fd5b809150509250929050565b6000602082840312156118a957600080fd5b61073e826116cd565b600080604083850312156118c557600080fd5b50508035926020909101359150565b600080602083850312156118e757600080fd5b823567ffffffffffffffff808211156118ff57600080fd5b818501915085601f83011261191357600080fd5b81358181111561192257600080fd5b8660208260051b850101111561193757600080fd5b60209290920196919550909350505050565b60005b8381101561196457818101518382015260200161194c565b83811115611973576000848401525b50505050565b60008151808452611991816020860160208601611949565b601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156119fa57603f198886030184526119e8858351611979565b945092850192908501906001016119cc565b5092979650505050505050565b60008060408385031215611a1a57600080fd5b82359150602083013567ffffffffffffffff811115611a3857600080fd5b611a44858286016116ff565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112611a7b57600080fd5b83018035915067ffffffffffffffff821115611a9657600080fd5b602001915036819003821315611aab57600080fd5b9250929050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415611adc57611adc611ab2565b5060010190565b600060208284031215611af557600080fd5b5051919050565b600060208284031215611b0e57600080fd5b815160ff8116811461073e57600080fd5b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611b57816017850160208801611949565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611b94816028840160208801611949565b01602801949350505050565b60208152600061073e6020830184611979565b6000816000190483118215151615611bcd57611bcd611ab2565b500290565b60008219821115611be557611be5611ab2565b500190565b600081611bf957611bf9611ab2565b506000190190565b60008251611c13818460208701611949565b9190910192915050565b600082821015611c2f57611c2f611ab2565b500390565b634e487b7160e01b600052603160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c634300080c000a000000000000000000000000c82bbe41f2cf04e3a8efa18f7032bdd7f6d98a810000000000000000000000007c487845f98938bb955b1d5ad069d9a30e4131fd

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

000000000000000000000000c82bbe41f2cf04e3a8efa18f7032bdd7f6d98a810000000000000000000000007c487845f98938bb955b1d5ad069d9a30e4131fd

-----Decoded View---------------
Arg [0] : _trustedForwarder (address): 0xc82bbe41f2cf04e3a8efa18f7032bdd7f6d98a81
Arg [1] : _registry (address): 0x7c487845f98938bb955b1d5ad069d9a30e4131fd

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c82bbe41f2cf04e3a8efa18f7032bdd7f6d98a81
Arg [1] : 0000000000000000000000007c487845f98938bb955b1d5ad069d9a30e4131fd


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading