Contract 0x2F12Cd9f400312dA163F0e6aD622C9db2e471e44

 
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0x38aece71e2a234d1fdfd82ec0df0ca30188ccd7626d8efa5d500e968e703e76aExecute385236032023-01-25 21:29:132 days 20 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.09306795796595.840429922
0xd938490144d25c62418e815c001847c53fd528e2f897dd9bfb83e64557b6ce19Execute383225182023-01-20 20:32:217 days 21 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.017674369372131.861869278
0x8b5e31fe8f3b32568bd3505f76ae0534e3dcc1874a8186e73f6df18fb32101dbExecute383224602023-01-20 20:30:177 days 21 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.027649855464206.272934201
0x7ace1a488488731a2e038f02479ada104b6ec18d5fcb6d259102d13eb359909aExecute383224262023-01-20 20:29:057 days 21 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.035816499308232.63056259
0x3bdab26354be8cf28dfa7ec45490c4d5f316e1fc7c45399616dd2f52e1de7562Execute382021402023-01-17 18:44:0610 days 23 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.01039254151178.162917504
0x2e3d94456dc4fc1c295e107b30dbc2bfdffb0c8109f223067ff4633943277cdbSet Delegation R...382021122023-01-17 18:43:0810 days 23 hrs ago0x2ce6bd653220436eb8f35e146b0dd1a6013e97a7 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.002018023539 69.150654131
0x6cf8ea49600a2f25bd4610b480327a5ae1ce7c986b28077f6a5bfaaee7a80171Execute382020462023-01-17 18:40:1910 days 23 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00271114610853.155558557
0xeb46ee3aa999b97b5289025292d4ccc1dad7b80cc7a0d92cb448c4e9e9efb7afExecute382018792023-01-17 18:34:2510 days 23 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00389690716176.403951885
0x2cc1b777509352db857bfa60e1c67929093d304953545a203a7d1e70ed3a0300Execute381674972023-01-16 22:14:3011 days 19 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00898600864668.063447906
0xd36d6a4c0ed3b72bae42855fc10c0d9fde7002b47dbf96e0b5ff6458c1fea7e7Execute381109722023-01-15 13:27:4613 days 4 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00760793294357.625378292
0x20ba14f4a320639630c7225783fe506c5b59409e4078179f73925f3603b201baExecute380873912023-01-14 23:52:0713 days 17 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00716894538754.31677618
0x8036d5b65501a1ca2df3cec47fdee3eb9e225fbac8676d12adef6fb9e20c7662Execute380789302023-01-14 19:00:5113 days 22 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00356409774261.634865676
0x0d0af862fc3f29ecf8210fac562d01f7a13ece51512588f9f5348ba0327562fcExecute380784102023-01-14 18:42:5813 days 23 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00666864371151.275960073
0x1a19cada809879ee1326daf206f3d1f6cf7a300744949dce52d679cdc3e08520Execute380737562023-01-14 16:02:4514 days 1 hr ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00995293928375.387348386
0xb06beff31cef4d8ed928253cc4dce4ded41b356993436b26a369194c79ac6047Execute380481982023-01-14 1:13:1214 days 16 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.012632968935216.214296834
0x142d7454100a3b09f7736ab76bb97b6e69cc38df945d457029b4f37e42d30536Execute380481862023-01-14 1:12:4414 days 16 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.02803736896212.385002581
0x39d7df7fd0341f07149aebfbd1fdb853fadfec9261d7ed1141b7cf52ccba496cExecute380338742023-01-13 16:57:5115 days 47 mins ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00688055393152.918382513
0x83ff3d92f633da0f43c23a4b658833951ab3a5d14693c16c6aa0c1440b2d611cExecute380317132023-01-13 15:43:3015 days 2 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00911739840569.092137052
0xefbb58641ef9b02dbe06b123bf3d28a90346607af5c3d37f7d6fa83fa4548b99Execute380005622023-01-12 21:45:4015 days 19 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00614862065346.571991864
0x2f0908aa21dff60b2a158bcb035c9a83bdb9e6d1b8dcd00888d78178141e3cb0Execute380003332023-01-12 21:37:5015 days 20 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00682132860751.675165962
0x1581957ba4d9957ae2cf004ad1ca712b1259ab23f354f850e66b6df68dcc5ab3Execute379995972023-01-12 21:12:3015 days 20 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.0041285453170.723333407
0x50edbdc417d99994101d7394bcd4e90f3e7cb30bd786bcb3c7e4f2af66123a5dExecute379995382023-01-12 21:10:2815 days 20 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00682643440651.726384437
0x4dcac2674c0d8c43227327b31677a4cc629301a10cd94a63519db7d0f8074991Execute379993962023-01-12 21:05:3615 days 20 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.0068227648151.686045956
0xa843332a1ba115fc47f63353f8a102c3f98751ae8d109e7f3639061232d863a7Execute379990312023-01-12 20:53:0215 days 20 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00364481563662.424053507
0xe061d1b1fd3c6f55c7a6a201b5cdb13bffab8d485d3f02789b025b0fa790f60eExecute379987372023-01-12 20:42:5815 days 21 hrs ago0x254f33da56f901bb3bab451a3e3afca05628ab49 IN  0x2f12cd9f400312da163f0e6ad622c9db2e471e440 MATIC0.00844687029254.870116162
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WrasslersForwarder

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 13 : WrasslersForwarder.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

/*
.                                                                                                                                          .
.  .cxxo.                 ;dxxo:cdxxdxxxxxo::dxxc.   .ldxxxdxxxxxo' 'oxxxxxxxxxxxl.   .cdxxl.      .ldxxxxxxo::dxxxxxxxxo:cdxxxxxxxxxd:.   .
.  .OMMX;               .dNMMXkONMMMMMMMMXkONMMM0'  ;0WMMMWMMWMWKc'cKWMMMMMMMMMW0;   ,kWMW0;      ;0WMMMMMMXkONMMMMMMMWXkONMMMMMMMMMNx'    .
.  .OMMX;    .,,,.     ;OWMW0kKWMWXXWMMW0k0WMMMM0'.oXMWXdcccccc:''xNMWWKocccccc:.  .cKWMNx.     .oXMMXxcccldKWMWXXWWMW0k0WMWOlcccccc;.     .
.  .OMMX:   ;ONWWk.  .lXWMNOkXWMN0KNWMNOkXWWMMWM0lkWMMW0occcccc,:0WWWNXOlcccccc.  .xNMWKc.     'kWMW0;   .lXWMNKKNWWXxxXWMMXxcccccc:.      .
.  .OMMX: .oXMMMMO. 'kWMWKk0NMMWNNWMWKk0NMW0ONMM0kXMMMMMMMMMMMWOkWMMMMWMMMMMMMWl.:0WMWk'     .cKWMWk'   'kWMMMNNWMW0:'kMMMMMMMMMMMMX;      .
.  .OMMX:,kWMMMMMO,cKWMNOkKWMMMMMMWXOkKWMNx':XMM0ooxxxxxxONMMMNocdxxxxxxx0WMMMXodXMMXo.     .xNMMMW0kxclKWMMMMMMWXx. .cxxxxxxkKWMMWO'      .
.  .OMMN0KWMNNWMMX0NMWXkONMMKx0WMM0okNMMKl. ;XMM0:',,.  'xNMWKc..','.   ,OWMWKk0WMW0;      ;0WMMWWWWXkONMWKxOWMMO;.'''.     .cKWMNx'       .
.  .OMMMMMWKloNMMMMMW0kKWMWO, lNMMXXWMWO,   ;XMM0kKNNk';0WMWk,  lXNNo..lKWMNOkXMMNd.     .oXMMXd:::cdKWMWO, cNMMx.oNNNo    .dNMMXl.        .
.  .OMMMMWO, :NMMWWXkkXWMXo.  lNMMMMMXo.    ;XMM0kNMMXOXMWXo.   oWMWK0KNMWKkONWMWXdllll;;kWMMWKdlllxXMMXo.  cNMWx'dWMW0ollo0WMWO,          .
.  .OMMMXo.  :NMMWKk0WMW0;    lNMMWW0;      ;XMM0kNMMMMMW0;     oWMMMMMMN0kKWMMMMMMMMNOkXWMMMMMMMMMMMW0;    cNMMx'dWMMMMMMMMWXo.           .
.  .:ooo,    .looc;:oooc.     'ooool.       .looc:loooooc.      ,ooooooo:;coooooooooo:;loooooooooooooc.     'loo;.,oooooooooo;             .
.                                                                                                                                          .*/

import "@0xessential/contracts/fwd/EssentialForwarder.sol";

contract WrasslersForwarder is EssentialForwarder {
    constructor(string[] memory _urls) EssentialForwarder("Wrasslers Forwarder", _urls) {}
}

File 2 of 13 : EssentialForwarder.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./EssentialEIP712Base.sol";
import "./SignedOwnershipProof.sol";
import "./IForwardRequest.sol";
import "./IDelegationRegistry.sol";

/// @title EssentialForwarder
/// @author 0xEssential
/// @notice EIP-2771 based MetaTransaction Forwarding Contract with EIP-3668 OffchainLookup for cross-chain token gating
/// @dev Allows a Relayer to submit meta-transactions that utilize an NFT (i.e. in a game) on behalf of EOAs. Transactions
///      are only executed if the Relayer provides a signature from a trusted signer. The signature must include the current
///      owner of the Layer 1 NFT being used, or a Burner EOA the owner has authorized to use its NFTs.
///
///      EssentialForwarder can be used to build Layer 2 games that use Layer 1 NFTs without bridging and with superior UX.
///      End users can specify a Burner EOA from their primary EOA, and then use that burner address to play games.
///      The Burner EOA can then sign messages for game moves without user interaction without any risk to the NFTs or other
///      assets owned by the primary EOA.
contract EssentialForwarder is EssentialEIP712, AccessControl, SignedOwnershipProof {
    using ECDSA for bytes32;

    event Session(address indexed owner, address indexed authorized, uint256 indexed length);

    error Unauthorized();
    error InvalidSignature();
    error InvalidOwnership();
    error OffchainLookup(address sender, string[] urls, bytes callData, bytes4 callbackFunction, bytes extraData);

    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");

    bytes32 private constant ERC721_TYPEHASH =
        keccak256(
            "ForwardRequest(address to,address from,address authorizer,address nftContract,uint256 nonce,uint256 nftChainId,uint256 nftTokenId,uint256 targetChainId,bytes data)"
        );

    mapping(address => uint256) internal _nonces;

    string[] public urls;
    IDelegationRegistry public DelegationRegistry;

    constructor(string memory name, string[] memory _urls) EssentialEIP712(name, "0.0.1") {
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setupRole(ADMIN_ROLE, msg.sender);
        _setOwnershipSigner(msg.sender);
        urls = _urls;
    }

    /// @notice Change the ownership signer
    function setOwnershipSigner(address newSigner) external onlyRole(ADMIN_ROLE) {
        _setOwnershipSigner(newSigner);
    }

    /// @notice Change the Delegation source
    function setDelegationRegistry(address registry) external onlyRole(ADMIN_ROLE) {
        DelegationRegistry = IDelegationRegistry(registry);
    }

    /// @notice Get current nonce for EOA
    function getNonce(address from) external view returns (uint256) {
        return _nonces[from];
    }

    /// @notice Get current session for Primary EOA
    function isAuthorized(address vault, address delegate) external view returns (bool) {
        return DelegationRegistry.checkDelegateForAll(delegate, vault);
    }

    /// @notice Allow `authorized` to use your NFTs in a game for `length` seconds. Your NFTs
    ///         will not be held in custody or approved for transfer.
    function createSession(address authorized) external {
        DelegationRegistry.delegateForAll(authorized, true);
    }

    /// @notice Submit a meta-tx request and signature to check validity and receive
    /// a response with data useful for fetching a trusted proof per EIP-3668.
    /// @dev Per EIP-3668, a valid signature will cause a revert with useful error params.
    function preflight(IForwardRequest.ERC721ForwardRequest calldata req, bytes calldata signature) public view {
        // If the signature is valid for the request and state, the client will receive
        // the OffchainLookup error with parameters suitable for an https call to a JSON
        // RPC server.

        if (!verify(req, signature)) revert InvalidSignature();

        revert OffchainLookup(
            address(this),
            urls,
            abi.encode(
                req.from,
                req.authorizer,
                _nonces[req.from],
                req.nftChainId,
                req.nftContract,
                req.nftTokenId,
                block.chainid,
                block.timestamp
            ),
            this.executeWithProof.selector,
            abi.encode(block.timestamp, req, signature)
        );
    }

    /// @notice Re-submit a valid meta-tx request with trust-minimized proof to execute the transaction.
    /// @dev The RPC call and re-submission should be handled by your Relayer client
    /// @param response The unaltered bytes reponse from a call made to an RPC url from OffchainLookup::urls
    /// @param extraData The unaltered bytes from OffchainLookup::extraData
    function executeWithProof(bytes calldata response, bytes calldata extraData)
        external
        payable
        returns (bool, bytes memory)
    {
        (uint256 timestamp, IForwardRequest.ERC721ForwardRequest memory req, bytes memory signature) = abi.decode(
            extraData,
            (uint256, IForwardRequest.ERC721ForwardRequest, bytes)
        );

        if (!verifyAuthorization(req)) revert Unauthorized();
        if (!verifyRequest(req, signature)) revert InvalidSignature();
        if (!verifyOwnershipProof(req, response, timestamp)) revert InvalidOwnership();

        ++_nonces[req.from];

        (bool success, bytes memory returndata) = req.to.call{gas: req.gas, value: 0}(
            // Implementation contracts may use EssentialERC2771Context::_msgNFT()
            // to access trusted NFT data. Calldata is compatible with OZ::_msgSender()
            abi.encodePacked(req.data, req.nftChainId, req.nftTokenId, req.nftContract, req.authorizer)
        );

        // Validate that the relayer has sent enough gas for the call.
        // See https://ronan.eth.link/blog/ethereum-gas-dangers/
        assert(gasleft() > req.gas / 63);

        return (success, returndata);
    }

    /// @notice Submit a meta-tx request where a proof of ownership is not required.
    /// @dev Useful for transactions where the signer is not using a specific NFT, but values
    /// are still required in the signature - use the zero address for nftContract and 0 for tokenId
    function verify(IForwardRequest.ERC721ForwardRequest calldata req, bytes calldata signature)
        public
        view
        returns (bool)
    {
        return verifyRequest(req, signature);
    }

    function execute(IForwardRequest.ERC721ForwardRequest calldata req, bytes calldata signature)
        public
        payable
        returns (bool, bytes memory)
    {
        if (!verifyRequest(req, signature)) revert InvalidSignature();
        if ((req.from != req.authorizer) && !verifyAuthorization(req)) revert Unauthorized();

        _nonces[req.from] = req.nonce + 1;

        (bool success, bytes memory returndata) = req.to.call{gas: req.gas, value: req.value}(
            abi.encodePacked(req.data, uint256(0), uint256(0), address(0), req.authorizer)
        );

        // Validate that the relayer has sent enough gas for the call.
        // See https://ronan.eth.link/blog/ethereum-gas-dangers/
        assert(gasleft() > req.gas / 63);

        return (success, returndata);
    }

    function verifyRequest(IForwardRequest.ERC721ForwardRequest memory req, bytes memory signature)
        internal
        view
        returns (bool)
    {
        address signer = _hashTypedDataV4(
            keccak256(
                abi.encode(
                    ERC721_TYPEHASH,
                    req.to,
                    req.from,
                    req.authorizer,
                    req.nftContract,
                    req.nonce,
                    req.nftChainId,
                    req.nftTokenId,
                    req.targetChainId,
                    keccak256(req.data)
                )
            )
        ).recover(signature);
        return _nonces[req.from] == req.nonce && signer == req.from && req.targetChainId == block.chainid;
    }

    function verifyAuthorization(IForwardRequest.ERC721ForwardRequest memory req) internal view returns (bool) {
        if (req.authorizer == req.from) return true;
        return DelegationRegistry.checkDelegateForAll(req.from, req.authorizer);
    }
}

File 3 of 13 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 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 {
        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 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 4 of 13 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 5 of 13 : EssentialEIP712Base.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}). 0xEssential removes the chainId from domainSeparator, instead including chainId as
 * a bytes32 representation as the salt. This allows wallets to sign from any network, while still ensuring signatures
 * can only be used on the target chain.
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EssentialEIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256("EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)");
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() public view returns (bytes32) {
        if (block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, address(this), bytes32(getChainId())));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }

    function getChainId() public view returns (uint256 id) {
        assembly {
            id := chainid()
        }
    }
}

File 6 of 13 : SignedOwnershipProof.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./IForwardRequest.sol";
import "./EssentialEIP712Base.sol" as EssentialEIP712Base;

/// @title SignedOwnershipProof
/// @author Sammy Bauch
/// @dev Based on SignedAllowance by Simon Fremaux (@dievardump)
/// see https://github.com/dievardump/signed-minting

contract SignedOwnershipProof {
    using ECDSA for bytes32;

    // address used to sign proof of ownership
    address private _ownershipSigner;

    /// @notice Construct message that _ownershipSigner must sign as ownership proof
    /// @dev The RPC server uses this view function to create the ownership proof
    /// @param signer the address that currently owns the L1 NFT
    /// @param authorizer the address that currently owns the L1 NFT
    /// @param nonce the meta-transaction nonce for account
    /// @param nftChainId the chainId for the nftContract
    /// @param nftContract the contract address for the NFT being utilized
    /// @param tokenId the tokenId from nftContract for the NFT being utilized
    /// @param timestamp the timestamp from the OffchainLookup error
    /// @return the message _ownershipSigner should sign
    function createMessage(
        address signer,
        address authorizer,
        uint256 nonce,
        uint256 nftChainId,
        address nftContract,
        uint256 tokenId,
        uint256 timestamp
    ) public view returns (bytes32) {
        return
            keccak256(
                abi.encode(signer, authorizer, nonce, nftChainId, nftContract, tokenId, block.chainid, timestamp)
            );
    }

    /// @notice Verify signed OffchainLookup proof against meta-tx request data
    /// @dev Ensures that _ownershipSigner signed a message containing (nftOwner OR authorized address, nonce, nftContract, tokenId)
    /// @param req structured data submitted by EOA making a meta-transaction request
    /// @param signature the signature proof created by the ownership signer EOA
    function verifyOwnershipProof(
        IForwardRequest.ERC721ForwardRequest memory req,
        bytes memory signature,
        uint256 timestamp
    ) public view returns (bool) {
        // TODO: what are the drift requirements here?
        require(block.timestamp - timestamp < 10 minutes, "Stale");

        bytes32 message = createMessage(
            req.from,
            req.authorizer,
            req.nonce,
            req.nftChainId,
            req.nftContract,
            req.nftTokenId,
            timestamp
        ).toEthSignedMessageHash();

        return message.recover(signature) == _ownershipSigner;
    }

    /// @notice Get ownershipSigner address
    /// @return the ownership proof signer address
    function ownershipSigner() public view returns (address) {
        return _ownershipSigner;
    }

    /// @dev This signer should hold no assets and is only used for signing L1 ownership proofs.
    /// @param newSigner the new signer's public address
    function _setOwnershipSigner(address newSigner) internal {
        _ownershipSigner = newSigner;
    }
}

File 7 of 13 : IForwardRequest.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

interface IForwardRequest {
    struct ERC721ForwardRequest {
        address from; // Externally-owned account (EOA) signing the request.
        address authorizer; // Externally-owned account (EOA) that authorized from account in PlaySession.
        address to; // Destination address, normally a smart contract for an nFight game.
        address nftContract; // The address of the NFT contract for the token being used.
        uint256 nftTokenId; // The tokenId of the NFT being used
        uint256 nftChainId; // The chainId of the NFT neing used
        uint256 targetChainId; // The chainId where the Forwarder and implementation contract are deployed.
        uint256 value; // Amount of ether to transfer to the destination.
        uint256 gas; // Amount of gas limit to set for the execution.
        uint256 nonce; // On-chain tracked nonce of a transaction.
        bytes data; // (Call)data to be sent to the destination.
    }

    struct MetaTransaction {
        uint256 nonce;
        address from;
        bytes functionSignature;
    }

    struct PlaySession {
        address authorized; // Burner EOA that is authorized to play with NFTs by owner EOA.
        uint256 expiresAt; // block timestamp when the session is invalidated.
    }

    struct NFT {
        address contractAddress;
        uint256 tokenId;
        uint256 chainId;
    }
}

File 8 of 13 : IDelegationRegistry.sol
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.17;

/**
 * @title An immutable registry contract to be deployed as a standalone primitive
 * @dev See EIP-5639, new project launches can read previous cold wallet -> hot wallet delegations
 * from here and integrate those permissions into their flow
 */
interface IDelegationRegistry {
    /// @notice Delegation type
    enum DelegationType {
        NONE,
        ALL,
        CONTRACT,
        TOKEN
    }

    /// @notice Info about a single delegation, used for onchain enumeration
    struct DelegationInfo {
        DelegationType type_;
        address vault;
        address delegate;
        address contract_;
        uint256 tokenId;
    }

    /// @notice Info about a single contract-level delegation
    struct ContractDelegation {
        address contract_;
        address delegate;
    }

    /// @notice Info about a single token-level delegation
    struct TokenDelegation {
        address contract_;
        uint256 tokenId;
        address delegate;
    }

    /// @notice Emitted when a user delegates their entire wallet
    event DelegateForAll(address vault, address delegate, bool value);

    /// @notice Emitted when a user delegates a specific contract
    event DelegateForContract(address vault, address delegate, address contract_, bool value);

    /// @notice Emitted when a user delegates a specific token
    event DelegateForToken(address vault, address delegate, address contract_, uint256 tokenId, bool value);

    /// @notice Emitted when a user revokes all delegations
    event RevokeAllDelegates(address vault);

    /// @notice Emitted when a user revoes all delegations for a given delegate
    event RevokeDelegate(address vault, address delegate);

    /**
     * -----------  WRITE -----------
     */

    /**
     * @notice Allow the delegate to act on your behalf for all contracts
     * @param delegate The hotwallet to act on your behalf
     * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking
     */
    function delegateForAll(address delegate, bool value) external;

    /**
     * @notice Allow the delegate to act on your behalf for a specific contract
     * @param delegate The hotwallet to act on your behalf
     * @param contract_ The address for the contract you're delegating
     * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking
     */
    function delegateForContract(
        address delegate,
        address contract_,
        bool value
    ) external;

    /**
     * @notice Allow the delegate to act on your behalf for a specific token
     * @param delegate The hotwallet to act on your behalf
     * @param contract_ The address for the contract you're delegating
     * @param tokenId The token id for the token you're delegating
     * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking
     */
    function delegateForToken(
        address delegate,
        address contract_,
        uint256 tokenId,
        bool value
    ) external;

    /**
     * @notice Revoke all delegates
     */
    function revokeAllDelegates() external;

    /**
     * @notice Revoke a specific delegate for all their permissions
     * @param delegate The hotwallet to revoke
     */
    function revokeDelegate(address delegate) external;

    /**
     * @notice Remove yourself as a delegate for a specific vault
     * @param vault The vault which delegated to the msg.sender, and should be removed
     */
    function revokeSelf(address vault) external;

    /**
     * -----------  READ -----------
     */

    /**
     * @notice Returns all active delegations a given delegate is able to claim on behalf of
     * @param delegate The delegate that you would like to retrieve delegations for
     * @return info Array of DelegationInfo structs
     */
    function getDelegationsByDelegate(address delegate) external view returns (DelegationInfo[] memory);

    /**
     * @notice Returns an array of wallet-level delegates for a given vault
     * @param vault The cold wallet who issued the delegation
     * @return addresses Array of wallet-level delegates for a given vault
     */
    function getDelegatesForAll(address vault) external view returns (address[] memory);

    /**
     * @notice Returns an array of contract-level delegates for a given vault and contract
     * @param vault The cold wallet who issued the delegation
     * @param contract_ The address for the contract you're delegating
     * @return addresses Array of contract-level delegates for a given vault and contract
     */
    function getDelegatesForContract(address vault, address contract_) external view returns (address[] memory);

    /**
     * @notice Returns an array of contract-level delegates for a given vault's token
     * @param vault The cold wallet who issued the delegation
     * @param contract_ The address for the contract holding the token
     * @param tokenId The token id for the token you're delegating
     * @return addresses Array of contract-level delegates for a given vault's token
     */
    function getDelegatesForToken(
        address vault,
        address contract_,
        uint256 tokenId
    ) external view returns (address[] memory);

    /**
     * @notice Returns all contract-level delegations for a given vault
     * @param vault The cold wallet who issued the delegations
     * @return delegations Array of ContractDelegation structs
     */
    function getContractLevelDelegations(address vault) external view returns (ContractDelegation[] memory delegations);

    /**
     * @notice Returns all token-level delegations for a given vault
     * @param vault The cold wallet who issued the delegations
     * @return delegations Array of TokenDelegation structs
     */
    function getTokenLevelDelegations(address vault) external view returns (TokenDelegation[] memory delegations);

    /**
     * @notice Returns true if the address is delegated to act on the entire vault
     * @param delegate The hotwallet to act on your behalf
     * @param vault The cold wallet who issued the delegation
     */
    function checkDelegateForAll(address delegate, address vault) external view returns (bool);

    /**
     * @notice Returns true if the address is delegated to act on your behalf for a token contract or an entire vault
     * @param delegate The hotwallet to act on your behalf
     * @param contract_ The address for the contract you're delegating
     * @param vault The cold wallet who issued the delegation
     */
    function checkDelegateForContract(
        address delegate,
        address vault,
        address contract_
    ) external view returns (bool);

    /**
     * @notice Returns true if the address is delegated to act on your behalf for a specific token, the token's contract or an entire vault
     * @param delegate The hotwallet to act on your behalf
     * @param contract_ The address for the contract you're delegating
     * @param tokenId The token id for the token you're delegating
     * @param vault The cold wallet who issued the delegation
     */
    function checkDelegateForToken(
        address delegate,
        address vault,
        address contract_,
        uint256 tokenId
    ) external view returns (bool);
}

File 9 of 13 : 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 10 of 13 : 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 11 of 13 : 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 12 of 13 : 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 13 of 13 : 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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string[]","name":"_urls","type":"string[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidOwnership","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"string[]","name":"urls","type":"string[]"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"bytes4","name":"callbackFunction","type":"bytes4"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"name":"OffchainLookup","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"authorized","type":"address"},{"indexed":true,"internalType":"uint256","name":"length","type":"uint256"}],"name":"Session","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DelegationRegistry","outputs":[{"internalType":"contract IDelegationRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_domainSeparatorV4","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"authorizer","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"nftChainId","type":"uint256"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"createMessage","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"authorized","type":"address"}],"name":"createSession","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"authorizer","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"nftTokenId","type":"uint256"},{"internalType":"uint256","name":"nftChainId","type":"uint256"},{"internalType":"uint256","name":"targetChainId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"gas","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct IForwardRequest.ERC721ForwardRequest","name":"req","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"execute","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"response","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"name":"executeWithProof","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"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":"address","name":"vault","type":"address"},{"internalType":"address","name":"delegate","type":"address"}],"name":"isAuthorized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownershipSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"authorizer","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"nftTokenId","type":"uint256"},{"internalType":"uint256","name":"nftChainId","type":"uint256"},{"internalType":"uint256","name":"targetChainId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"gas","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct IForwardRequest.ERC721ForwardRequest","name":"req","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"preflight","outputs":[],"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":"address","name":"registry","type":"address"}],"name":"setDelegationRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigner","type":"address"}],"name":"setOwnershipSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"urls","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"authorizer","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"nftTokenId","type":"uint256"},{"internalType":"uint256","name":"nftChainId","type":"uint256"},{"internalType":"uint256","name":"targetChainId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"gas","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct IForwardRequest.ERC721ForwardRequest","name":"req","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"authorizer","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"nftTokenId","type":"uint256"},{"internalType":"uint256","name":"nftChainId","type":"uint256"},{"internalType":"uint256","name":"targetChainId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"gas","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct IForwardRequest.ERC721ForwardRequest","name":"req","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"verifyOwnershipProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

6101206040523480156200001257600080fd5b506040516200295338038062002953833981016040819052620000359162000361565b604080518082018252601381527f57726173736c65727320466f72776172646572000000000000000000000000006020808301918252835180850185526005815264302e302e3160d81b90820152825190912060c08181527fae209a0b48f21c054280f2455d32cf309387644879d9acbd8ffc19916381188560e08190524660a081815287517f36c25de3e541d5d970f66e4210d728721220fff5c077cc6cd008b3a0c62adab7818801819052818a019690965260608101939093523060808085019190915283820192909252875180840390910181529190920190955284519490920193909320905261010091909152816200013460003362000191565b620001607fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217753362000191565b600180546001600160a01b0319163317905580516200018790600390602084019062000241565b5050505062000600565b6200019d8282620001a1565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200019d576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001fd3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b8280548282559060005260206000209081019282156200028c579160200282015b828111156200028c57825182906200027b908262000534565b509160200191906001019062000262565b506200029a9291506200029e565b5090565b808211156200029a576000620002b58282620002bf565b506001016200029e565b508054620002cd90620004a5565b6000825580601f10620002de575050565b601f016020900490600052602060002090810190620002fe919062000301565b50565b5b808211156200029a576000815560010162000302565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562000359576200035962000318565b604052919050565b600060208083850312156200037557600080fd5b82516001600160401b03808211156200038d57600080fd5b8185019150601f8681840112620003a357600080fd5b825182811115620003b857620003b862000318565b8060051b620003c98682016200032e565b918252848101860191868101908a841115620003e457600080fd5b87870192505b838310156200049757825186811115620004045760008081fd5b8701603f81018c13620004175760008081fd5b88810151878111156200042e576200042e62000318565b62000441818801601f19168b016200032e565b81815260408e81848601011115620004595760008081fd5b60005b8381101562000479578481018201518382018e01528c016200045c565b505060009181018b01919091528352509187019190870190620003ea565b9a9950505050505050505050565b600181811c90821680620004ba57607f821691505b602082108103620004db57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200052f57600081815260208120601f850160051c810160208610156200050a5750805b601f850160051c820191505b818110156200052b5782815560010162000516565b5050505b505050565b81516001600160401b0381111562000550576200055062000318565b6200056881620005618454620004a5565b84620004e1565b602080601f831160018114620005a05760008415620005875750858301515b600019600386901b1c1916600185901b1785556200052b565b600085815260208120601f198616915b82811015620005d157888601518255948401946001909101908401620005b0565b5085821015620005f05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e0516101005161230e620006456000396000610805015260006108540152600061082f015260006107b4015260006107dc015261230e6000f3fe60806040526004361061014b5760003560e01c8063796676be116100b6578063a217fddf1161006f578063a217fddf146103f6578063d547741f1461040b578063d66df8f01461042b578063dbf0eeef1461044b578063dbf42df71461046c578063f2cde3ef1461047f57600080fd5b8063796676be146103345780637b134b4c1461036157806381902564146103765780638c4a7b1b1461039657806391d14854146103b657806395cb1c2d146103d657600080fd5b806336568abe1161010857806336568abe146102605780634254188c146102805780635c0dfff6146102a057806365e4ad9e146102c057806373aa9e94146102e057806375b238fc1461030057600080fd5b806301ffc9a71461015057806312ce42fd14610185578063248a9ca3146101b75780632d0335ab146101f55780632f2ff15d1461022b5780633408e4701461024d575b600080fd5b34801561015c57600080fd5b5061017061016b3660046117d3565b61049f565b60405190151581526020015b60405180910390f35b34801561019157600080fd5b506001546001600160a01b03165b6040516001600160a01b03909116815260200161017c565b3480156101c357600080fd5b506101e76101d23660046117fd565b60009081526020819052604090206001015490565b60405190815260200161017c565b34801561020157600080fd5b506101e7610210366004611832565b6001600160a01b031660009081526002602052604090205490565b34801561023757600080fd5b5061024b61024636600461184d565b6104d6565b005b34801561025957600080fd5b50466101e7565b34801561026c57600080fd5b5061024b61027b36600461184d565b610501565b34801561028c57600080fd5b5061024b61029b366004611832565b610584565b3480156102ac57600080fd5b506101e76102bb366004611879565b6105ef565b3480156102cc57600080fd5b506101706102db3660046118e3565b610633565b3480156102ec57600080fd5b5061024b6102fb366004611832565b6106b6565b34801561030c57600080fd5b506101e77fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561034057600080fd5b5061035461034f3660046117fd565b610704565b60405161017c919061195d565b34801561036d57600080fd5b506101e76107b0565b34801561038257600080fd5b50610170610391366004611b0c565b6108a2565b3480156103a257600080fd5b506101706103b1366004611bbb565b610992565b3480156103c257600080fd5b506101706103d136600461184d565b6109e4565b3480156103e257600080fd5b5061024b6103f1366004611bbb565b610a0d565b34801561040257600080fd5b506101e7600081565b34801561041757600080fd5b5061024b61042636600461184d565b610b0c565b34801561043757600080fd5b5060045461019f906001600160a01b031681565b61045e610459366004611c2d565b610b32565b60405161017c929190611c99565b61045e61047a366004611bbb565b610cff565b34801561048b57600080fd5b5061024b61049a366004611832565b610f07565b60006001600160e01b03198216637965db0b60e01b14806104d057506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000828152602081905260409020600101546104f28133610f51565b6104fc8383610fb5565b505050565b6001600160a01b03811633146105765760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105808282611039565b5050565b60048054604051630d0bdc7d60e31b81526001600160a01b03848116938201939093526001602482015291169063685ee3e890604401600060405180830381600087803b1580156105d457600080fd5b505af11580156105e8573d6000803e3d6000fd5b5050505050565b60008787878787874688604051602001610610989796959493929190611cb4565b604051602081830303815290604052805190602001209050979650505050505050565b60048054604051634e1cade160e11b81526001600160a01b0384811693820193909352848316602482015260009290911690639c395bc290604401602060405180830381865afa15801561068b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106af9190611cff565b9392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106e18133610f51565b50600480546001600160a01b0319166001600160a01b0392909216919091179055565b6003818154811061071457600080fd5b90600052602060002001600091509050805461072f90611d21565b80601f016020809104026020016040519081016040528092919081815260200182805461075b90611d21565b80156107a85780601f1061077d576101008083540402835291602001916107a8565b820191906000526020600020905b81548152906001019060200180831161078b57829003601f168201915b505050505081565b60007f000000000000000000000000000000000000000000000000000000000000000046036107fe57507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301523060808301524660a0808401919091528351808403909101815260c0909201909252805191012090565b60006102586108b18342611d71565b106108e65760405162461bcd60e51b81526020600482015260056024820152645374616c6560d81b604482015260640161056d565b6000610966610913866000015187602001518861012001518960a001518a606001518b608001518a6105ef565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6001549091506001600160a01b031661097f828661109e565b6001600160a01b03161495945050505050565b60006109dc6109a085611d84565b84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506110c292505050565b949350505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b610a18838383610992565b610a3557604051638baa579f60e01b815260040160405180910390fd5b306003610a456020860186611832565b610a556040870160208801611832565b60026000610a6660208a018a611832565b6001600160a01b0316815260208101919091526040016000205460a0880135610a9560808a0160608b01611832565b89608001354642604051602001610ab3989796959493929190611cb4565b60405160208183030381529060405263dbf0eeef60e01b42878787604051602001610ae19493929190611dff565b60408051601f1981840301815290829052630556f18360e41b825261056d9594939291600401611f04565b600082815260208190526040902060010154610b288133610f51565b6104fc8383611039565b60006060818080610b4586880188612048565b925092509250610b5482611201565b610b70576040516282b42960e81b815260040160405180910390fd5b610b7a82826110c2565b610b9757604051638baa579f60e01b815260040160405180910390fd5b610bd9828a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892506108a2915050565b610bf657604051630f1f82e960e31b815260040160405180910390fd5b81516001600160a01b031660009081526002602052604081208054909190610c1d906120b5565b9190508190555060008083604001516001600160a01b031684610100015160008661014001518760a00151886080015189606001518a60200151604051602001610c6b9594939291906120ce565b60408051601f1981840301815290829052610c859161211b565b600060405180830381858888f193505050503d8060008114610cc3576040519150601f19603f3d011682016040523d82523d6000602084013e610cc8565b606091505b5091509150603f846101000151610cdf9190612137565b5a11610ced57610ced612159565b90955093505050505b94509492505050565b60006060610d4b610d0f86611d84565b85858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506110c292505050565b610d6857604051638baa579f60e01b815260040160405180910390fd5b610d786040860160208701611832565b6001600160a01b0316610d8e6020870187611832565b6001600160a01b031614158015610db35750610db1610dac86611d84565b611201565b155b15610dd0576040516282b42960e81b815260040160405180910390fd5b610de0610120860135600161216f565b60026000610df16020890189611832565b6001600160a01b03166001600160a01b0316815260200190815260200160002081905550600080866040016020810190610e2b9190611832565b6001600160a01b031661010088013560e0890135610e4d6101408b018b612182565b60008060008e6020016020810190610e659190611832565b604051602001610e7a969594939291906121c9565b60408051601f1981840301815290829052610e949161211b565b600060405180830381858888f193505050503d8060008114610ed2576040519150601f19603f3d011682016040523d82523d6000602084013e610ed7565b606091505b509092509050610eed603f610100890135612137565b5a11610efb57610efb612159565b90969095509350505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610f328133610f51565b600180546001600160a01b0319166001600160a01b0384161790555050565b610f5b82826109e4565b61058057610f73816001600160a01b031660146112a9565b610f7e8360206112a9565b604051602001610f8f929190612209565b60408051601f198184030181529082905262461bcd60e51b825261056d9160040161195d565b610fbf82826109e4565b610580576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610ff53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61104382826109e4565b15610580576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060006110ad8585611445565b915091506110ba816114b3565b509392505050565b6000806111af836111a97f43fa348c6c9d3f16a4580fbb7f1b7f0432ed8cdc844564275311b61f50661ea08760400151886000015189602001518a606001518b61012001518c60a001518d608001518e60c001518f61014001518051906020012060405160200161118e9a99989796959493929190998a526001600160a01b0398891660208b015296881660408a0152948716606089015292909516608087015260a086015260c085019390935260e08401929092526101008301919091526101208201526101400190565b6040516020818303038152906040528051906020012061166c565b9061109e565b61012085015185516001600160a01b03166000908152600260205260409020549192501480156111eb575083516001600160a01b038281169116145b80156109dc5750468460c0015114949350505050565b600081600001516001600160a01b031682602001516001600160a01b03160361122c57506001919050565b6004805483516020850151604051634e1cade160e11b81526001600160a01b0392831694810194909452811660248401521690639c395bc290604401602060405180830381865afa158015611285573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d09190611cff565b606060006112b883600261227e565b6112c390600261216f565b67ffffffffffffffff8111156112db576112db611970565b6040519080825280601f01601f191660200182016040528015611305576020820181803683370190505b509050600360fc1b8160008151811061132057611320612295565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061134f5761134f612295565b60200101906001600160f81b031916908160001a905350600061137384600261227e565b61137e90600161216f565b90505b60018111156113f6576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106113b2576113b2612295565b1a60f81b8282815181106113c8576113c8612295565b60200101906001600160f81b031916908160001a90535060049490941c936113ef816122ab565b9050611381565b5083156106af5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161056d565b600080825160410361147b5760208301516040840151606085015160001a61146f878285856116ba565b945094505050506114ac565b82516040036114a457602083015160408401516114998683836117a4565b9350935050506114ac565b506000905060025b9250929050565b60008160048111156114c7576114c76122c2565b036114cf5750565b60018160048111156114e3576114e36122c2565b036115305760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161056d565b6002816004811115611544576115446122c2565b036115915760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161056d565b60038160048111156115a5576115a56122c2565b036115fd5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161056d565b6004816004811115611611576116116122c2565b036116695760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161056d565b50565b60006104d06116796107b0565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156116f15750600090506003610cf6565b8460ff16601b1415801561170957508460ff16601c14155b1561171a5750600090506004610cf6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561176e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661179757600060019250925050610cf6565b9660009650945050505050565b6000806001600160ff1b03831660ff84901c601b016117c5878288856116ba565b935093505050935093915050565b6000602082840312156117e557600080fd5b81356001600160e01b0319811681146106af57600080fd5b60006020828403121561180f57600080fd5b5035919050565b80356001600160a01b038116811461182d57600080fd5b919050565b60006020828403121561184457600080fd5b6106af82611816565b6000806040838503121561186057600080fd5b8235915061187060208401611816565b90509250929050565b600080600080600080600060e0888a03121561189457600080fd5b61189d88611816565b96506118ab60208901611816565b955060408801359450606088013593506118c760808901611816565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156118f657600080fd5b6118ff83611816565b915061187060208401611816565b60005b83811015611928578181015183820152602001611910565b50506000910152565b6000815180845261194981602086016020860161190d565b601f01601f19169290920160200192915050565b6020815260006106af6020830184611931565b634e487b7160e01b600052604160045260246000fd5b604051610160810167ffffffffffffffff811182821017156119aa576119aa611970565b60405290565b600082601f8301126119c157600080fd5b813567ffffffffffffffff808211156119dc576119dc611970565b604051601f8301601f19908116603f01168101908282118183101715611a0457611a04611970565b81604052838152866020858801011115611a1d57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006101608284031215611a5057600080fd5b611a58611986565b9050611a6382611816565b8152611a7160208301611816565b6020820152611a8260408301611816565b6040820152611a9360608301611816565b60608201526080820135608082015260a082013560a082015260c082013560c082015260e082013560e08201526101008083013581830152506101208083013581830152506101408083013567ffffffffffffffff811115611af457600080fd5b611b00858286016119b0565b82840152505092915050565b600080600060608486031215611b2157600080fd5b833567ffffffffffffffff80821115611b3957600080fd5b611b4587838801611a3d565b94506020860135915080821115611b5b57600080fd5b50611b68868287016119b0565b925050604084013590509250925092565b60008083601f840112611b8b57600080fd5b50813567ffffffffffffffff811115611ba357600080fd5b6020830191508360208285010111156114ac57600080fd5b600080600060408486031215611bd057600080fd5b833567ffffffffffffffff80821115611be857600080fd5b908501906101608288031215611bfd57600080fd5b90935060208501359080821115611c1357600080fd5b50611c2086828701611b79565b9497909650939450505050565b60008060008060408587031215611c4357600080fd5b843567ffffffffffffffff80821115611c5b57600080fd5b611c6788838901611b79565b90965094506020870135915080821115611c8057600080fd5b50611c8d87828801611b79565b95989497509550505050565b82151581526040602082015260006109dc6040830184611931565b6001600160a01b0398891681529688166020880152604087019590955260608601939093529416608084015260a083019390935260c082019290925260e08101919091526101000190565b600060208284031215611d1157600080fd5b815180151581146106af57600080fd5b600181811c90821680611d3557607f821691505b602082108103611d5557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104d0576104d0611d5b565b60006104d03683611a3d565b6000808335601e19843603018112611da757600080fd5b830160208101925035905067ffffffffffffffff811115611dc757600080fd5b8036038213156114ac57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b84815260606020820152611e2660608201611e1986611816565b6001600160a01b03169052565b6000611e3460208601611816565b6001600160a01b03166080830152611e4e60408601611816565b6001600160a01b031660a0830152611e6860608601611816565b6001600160a01b03811660c084015250608085013560e083015261010060a08601358184015261012060c08701358185015261014060e088013581860152610160838901358187015282890135610180870152611ec7828a018a611d90565b94509250806101a08701525050611ee36101c085018383611dd6565b9150508281036040840152611ef9818587611dd6565b979650505050505050565b600060a0820160018060a01b0388168352602060a08185015281885480845260c0860191506005935060c081851b87010160008b8152848120815b84811015611ff95789840360bf1901865281548390600181811c9080831680611f6957607f831692505b8b83108103611f8657634e487b7160e01b88526022600452602488fd5b82895260208901818015611fa15760018114611fb657611fe0565b60ff19861682528415158f1b82019650611fe0565b6000898152602090208a5b86811015611fda57815484820152908501908f01611fc1565b83019750505b505050988a019892965050509190910190600101611f3f565b505050868103604088015261200e818b611931565b94505050505061202a60608401866001600160e01b0319169052565b828103608084015261203c8185611931565b98975050505050505050565b60008060006060848603121561205d57600080fd5b83359250602084013567ffffffffffffffff8082111561207c57600080fd5b61208887838801611a3d565b9350604086013591508082111561209e57600080fd5b506120ab868287016119b0565b9150509250925092565b6000600182016120c7576120c7611d5b565b5060010190565b600086516120e0818460208b0161190d565b919091019485525060208401929092526bffffffffffffffffffffffff19606091821b8116604085015291901b166054820152606801919050565b6000825161212d81846020870161190d565b9190910192915050565b60008261215457634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052600160045260246000fd5b808201808211156104d0576104d0611d5b565b6000808335601e1984360301811261219957600080fd5b83018035915067ffffffffffffffff8211156121b457600080fd5b6020019150368190038213156114ac57600080fd5b858782379094019283526020830191909152606090811b6bffffffffffffffffffffffff19908116604084015292901b9091166054820152606801919050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161224181601785016020880161190d565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161227281602884016020880161190d565b01602801949350505050565b80820281158282048414176104d0576104d0611d5b565b634e487b7160e01b600052603260045260246000fd5b6000816122ba576122ba611d5b565b506000190190565b634e487b7160e01b600052602160045260246000fdfea26469706673582212206f4b79e7ca6dabc77b11d33078eb7c28df0ce330ea21c4775d2398dc2023dcfe64736f6c63430008110033000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001e68747470733a2f2f6d6964646c65776172652e6e66696768742e78797a2f0000

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

000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001e68747470733a2f2f6d6964646c65776172652e6e66696768742e78797a2f0000

-----Decoded View---------------
Arg [0] : _urls (string[]): https://middleware.nfight.xyz/

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [3] : 000000000000000000000000000000000000000000000000000000000000001e
Arg [4] : 68747470733a2f2f6d6964646c65776172652e6e66696768742e78797a2f0000


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