{
    "Function": "delegateBySig",
    "File": "contracts/openzeppelin-solidity/contracts/token/ERC20/extensions/ERC20Votes.sol",
    "Parent Contracts": [
        "contracts/openzeppelin-solidity/contracts/token/ERC20/extensions/draft-ERC20Permit.sol",
        "contracts/openzeppelin-solidity/contracts/utils/cryptography/draft-EIP712.sol",
        "contracts/openzeppelin-solidity/contracts/token/ERC20/extensions/draft-IERC20Permit.sol",
        "contracts/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
        "contracts/openzeppelin-solidity/contracts/token/ERC20/extensions/IERC20Metadata.sol",
        "contracts/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol",
        "contracts/openzeppelin-solidity/contracts/utils/Context.sol",
        "contracts/openzeppelin-solidity/contracts/governance/utils/IVotes.sol"
    ],
    "High-Level Calls": [
        "ECDSA"
    ],
    "Internal Calls": [
        "abi.encode()",
        "require(bool,string)",
        "require(bool,string)",
        "_useNonce",
        "_hashTypedDataV4",
        "_delegate",
        "keccak256(bytes)"
    ],
    "Library Calls": [
        "recover"
    ],
    "Low-Level Calls": [],
    "Code": "function delegateBySig(\n        address delegatee,\n        uint256 nonce,\n        uint256 expiry,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual override {\n        require(block.timestamp <= expiry, \"ERC20Votes: signature expired\");\n        address signer = ECDSA.recover(\n            _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),\n            v,\n            r,\n            s\n        );\n        require(nonce == _useNonce(signer), \"ERC20Votes: invalid nonce\");\n        _delegate(signer, delegatee);\n    }"
}