Contract 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0 11

Contract Overview

Balance:
0 MATIC

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x49f1924e6ee5a2a79bccf98074561a02e271427dbe8001f8963db93fe20bb2f3Deploy Proxy284356382022-10-04 3:47:0320 mins ago0xef1123c5bc146906c1efbec709eaaec39f22444c IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.001459697234 2.425000015
0x381934ebdf3a48a0397af5ec4efdd37b9488cb9a2900459305e0bccd9c9da528Deploy Proxy284349572022-10-04 2:50:081 hr 17 mins ago0x4a96929e0b9c55187af5c3dc13fed594e81e597d IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002128953587 2.425000014
0x09472247870c7c1ea1c9ef26af8ca20f5b8edbef6f9bc23312177f44ff90845dDeploy Proxy284339892022-10-04 1:29:132 hrs 38 mins ago0x0f9c6cf1d587973c125237d8f97fe9523e5ff19e IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002861550451 3.395000014
0x9a692bcdc311be6868b45f9411fbe43e5a8c51599b918f3aa58cb273b086ac5eDeploy Proxy284338892022-10-04 1:20:512 hrs 46 mins ago0x859f3a2115a555ce175581826fc6a51502b4072b IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002449193196 2.99463258
0x1150470fce6d6f7c4a2c7b6967687edc923e9fd2a1522cd26c19dd09e9e3adf7Deploy Proxy284336272022-10-04 0:58:573 hrs 8 mins ago0xb1c6cff90b645a6b0529236598e78e67db1d625a IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002140254863 2.570500015
0x04b73a9b7c2195ecedb7e2cce3aa724feb6374b4e873b39062e0f4e0f36992beDeploy Proxy284336152022-10-04 0:57:573 hrs 9 mins ago0xaa93ed4f0824d46bebb05987548317b0939a289a IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002016283236 2.425000014
0xe1dc18c4e41b0dbec88fc0e74d8f3378b761232bb6ba0cc5324a276fdf49015dDeploy Proxy284334042022-10-04 0:40:183 hrs 27 mins ago0xb1c6cff90b645a6b0529236598e78e67db1d625a IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002509411414 4.169060004
0xeb0e6ee42a5e1dfb95011cd3dc3668fd22241ddc17a0268745b4a7323954d913Deploy Proxy284333712022-10-04 0:37:333 hrs 30 mins ago0xaa93ed4f0824d46bebb05987548317b0939a289a IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.003812697092 4.169060003
0x6f85b2db2214852d4bd1fc32d9746e653ec47a4a607944bf3f156230823d17b2Deploy Proxy284333352022-10-04 0:34:323 hrs 33 mins ago0x0f9c6cf1d587973c125237d8f97fe9523e5ff19e IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.00328974271 4.169060001
0xaec88284939b597b5deb07bc241d7002f72b2589060d24147079e96a0059e340Deploy Proxy284332792022-10-04 0:29:513 hrs 37 mins ago0xa331943eecd698253752b3f65089e492289048d3 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.00354224183 4.169060002
0x7f650f254944de049e2ad1f77187382abeb46ed7d4529b6c75c66dc79db4964bDeploy Proxy284327622022-10-03 23:46:384 hrs 20 mins ago0x0ef0724f45180dd462c817dc93a52ab73afcd158 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.003750224016 4.312
0x9a420978c158c2e16a8da2c859126762a63edb78158d120157287b510c01ca43Deploy Proxy284325802022-10-03 23:31:264 hrs 36 mins ago0xb1c6cff90b645a6b0529236598e78e67db1d625a IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.003430161725 4.268000002
0x4fe6a1326fa0fe94159849eeaf2752cb359847dc3e6d0a4e5b68a8d72bfceeb1Deploy Proxy284322602022-10-03 23:04:415 hrs 2 mins ago0x314813c1bcec3fc906e95efc6c27a944778abd8d IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.003465778188 4.268000005
0xec448745acd52be2c94408aab2b613daae4108f1e995784773ef395bc8cf4f3cDeploy Proxy284320152022-10-03 22:44:125 hrs 23 mins ago0xcb21751989319a23baee81e2caebfc89638f657f IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.003430571453 4.268000002
0xc037f942b60f5ee56c5b1c7f29a68cf0d57242315a1ab133d861565618496bddDeploy Proxy284319542022-10-03 22:39:065 hrs 28 mins ago0xaa1d06a32f7efb0ab1951f78666dc79078d48e1f IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.00382009474 4.268000001
0x27d35f92f7db2a6316f99be43b103350a770934e0cde72631dbdb75245c02343Deploy Proxy284318692022-10-03 22:31:595 hrs 35 mins ago0x1303efb7660952d633ac77a2da5391d1eb0132e0 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.003649746057 4.268000002
0xc2fca0e8fdc44113c6c99855d32912e0e8fe571e84e86caab4cc5f55bba69696Deploy Proxy284317642022-10-03 22:23:135 hrs 44 mins ago0x1303efb7660952d633ac77a2da5391d1eb0132e0 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.003439978131 4.268000009
0x7bc053407c0a389e2dbccfdfe7e88d9d946bfa060f336c135f980c1cf5b53ab6Deploy Proxy284313082022-10-03 21:45:066 hrs 22 mins ago0x3da2c7673d565813a3221d06061925e0386ed346 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.003343747526 4.267999998
0x118801e89663a833c38eb38d9cbb58152a58867955a42b603507af5845abf7f7Deploy Proxy284308882022-10-03 21:09:596 hrs 57 mins ago0xf3f67975973d67fd6da894d757b3e89dcd667d3d IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002043494654 3.395000032
0xe955d3e1f0cd3842810e222defcc970f15b99af4055b81c7a4e973ea86ca56e3Deploy Proxy284308772022-10-03 21:09:046 hrs 58 mins ago0xf3f67975973d67fd6da894d757b3e89dcd667d3d IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002816312091 3.395000032
0x683d238ea85f573c0a25848b70b0a0f684ffa293c27b668f4dc88b981e68ddc2Deploy Proxy284303092022-10-03 20:21:357 hrs 46 mins ago0x7ea97829001bbf82389c6244e7d1d325ef054bcc IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002735979591 3.395000021
0x1da58c6d45e5f70027ff4ed1eabf32b7b949bf1b6729a52b63f33bf66d7e4b43Deploy Proxy284302922022-10-03 20:20:107 hrs 47 mins ago0x2ea13c05e49226fb00dd32e7687b0db8cba5b3d3 IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.002670198072 3.395000022
0x1a776e78e66a6d71c2fb76db0105b4cb04d2cabedb4a96efd1ba70c78a6f4f9bDeploy Proxy284302022022-10-03 20:12:387 hrs 54 mins ago0x09fcf6dde5256696d536dbe0999f794f31ae339d IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.001685324304 3.322250069
0x486c6d4c76dfe3fb6e44bd57b9d3fb1dca27bb39378be60a8aa7a0876f548b6eDeploy Proxy284299292022-10-03 19:49:498 hrs 17 mins ago0x401da1619a057b0c357ddbdf976713a79f7b4e5e IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.001550970291 3.297607416
0x64c35dad9a5c476bcb3a083b1283e4428eb5f059622dab4a68588f2ee3a0cabbDeploy Proxy284298272022-10-03 19:41:188 hrs 26 mins ago0x889b32e9d8913528dc33fbe204036af1c6f9359a IN  0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a00 MATIC0.001501135633 2.425000014
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x49f1924e6ee5a2a79bccf98074561a02e271427dbe8001f8963db93fe20bb2f3284356382022-10-04 3:47:0320 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x381934ebdf3a48a0397af5ec4efdd37b9488cb9a2900459305e0bccd9c9da528284349572022-10-04 2:50:081 hr 17 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x09472247870c7c1ea1c9ef26af8ca20f5b8edbef6f9bc23312177f44ff90845d284339892022-10-04 1:29:132 hrs 38 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x9a692bcdc311be6868b45f9411fbe43e5a8c51599b918f3aa58cb273b086ac5e284338892022-10-04 1:20:512 hrs 46 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x1150470fce6d6f7c4a2c7b6967687edc923e9fd2a1522cd26c19dd09e9e3adf7284336272022-10-04 0:58:573 hrs 8 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x04b73a9b7c2195ecedb7e2cce3aa724feb6374b4e873b39062e0f4e0f36992be284336152022-10-04 0:57:573 hrs 9 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xe1dc18c4e41b0dbec88fc0e74d8f3378b761232bb6ba0cc5324a276fdf49015d284334042022-10-04 0:40:183 hrs 27 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xeb0e6ee42a5e1dfb95011cd3dc3668fd22241ddc17a0268745b4a7323954d913284333712022-10-04 0:37:333 hrs 30 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x6f85b2db2214852d4bd1fc32d9746e653ec47a4a607944bf3f156230823d17b2284333352022-10-04 0:34:323 hrs 33 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xaec88284939b597b5deb07bc241d7002f72b2589060d24147079e96a0059e340284332792022-10-04 0:29:513 hrs 37 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x7f650f254944de049e2ad1f77187382abeb46ed7d4529b6c75c66dc79db4964b284327622022-10-03 23:46:384 hrs 20 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x9a420978c158c2e16a8da2c859126762a63edb78158d120157287b510c01ca43284325802022-10-03 23:31:264 hrs 36 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x27856881070b088c484a940211a62fcd2fdf0d1ecff5b3accc7a65b3d75664f9284325652022-10-03 23:30:104 hrs 37 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x8bed1cfd342b83e7131c438246bd118b48d153335ccabda90bd663742677b557284325422022-10-03 23:28:154 hrs 39 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x5b338eb5ec598f97ff484ec72a0fc8e56d41e62045b70290525a567fce075e10284325102022-10-03 23:25:344 hrs 42 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x4fe6a1326fa0fe94159849eeaf2752cb359847dc3e6d0a4e5b68a8d72bfceeb1284322602022-10-03 23:04:415 hrs 2 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xec448745acd52be2c94408aab2b613daae4108f1e995784773ef395bc8cf4f3c284320152022-10-03 22:44:125 hrs 23 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xc037f942b60f5ee56c5b1c7f29a68cf0d57242315a1ab133d861565618496bdd284319542022-10-03 22:39:065 hrs 28 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x27d35f92f7db2a6316f99be43b103350a770934e0cde72631dbdb75245c02343284318692022-10-03 22:31:595 hrs 35 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xc2fca0e8fdc44113c6c99855d32912e0e8fe571e84e86caab4cc5f55bba69696284317642022-10-03 22:23:135 hrs 44 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x7bc053407c0a389e2dbccfdfe7e88d9d946bfa060f336c135f980c1cf5b53ab6284313082022-10-03 21:45:066 hrs 22 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x118801e89663a833c38eb38d9cbb58152a58867955a42b603507af5845abf7f7284308882022-10-03 21:09:596 hrs 57 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0xe955d3e1f0cd3842810e222defcc970f15b99af4055b81c7a4e973ea86ca56e3284308772022-10-03 21:09:046 hrs 58 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x683d238ea85f573c0a25848b70b0a0f684ffa293c27b668f4dc88b981e68ddc2284303092022-10-03 20:21:357 hrs 46 mins ago 0x5dbc7b840baa9dabcbe9d2492e45d7244b54a2a0  Contract Creation0 MATIC
0x1da58c6d45e5f70027ff4ed1eabf32b7b949bf1b6729a52b63f33bf66d7e4b43284302922022-10-03 20:20:107 hrs 47 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