{"file_path":null,"creation_status":"success","source_code":"// Sources flattened with hardhat v2.28.0 https://hardhat.org\n\n// SPDX-License-Identifier: MIT\n\n// File contracts/Dependencies/CheckContract.sol\n\n// Original license: SPDX_License_Identifier: MIT\n\npragma solidity 0.7.6;\n\ncontract CheckContract {\n    /**\n     * Check that the account is not the zero address\n     */\n    function checkContract(address _account) internal pure {\n        require(_account != address(0), \"Account cannot be zero address\");\n    }\n}\n\n\n// File contracts/Dependencies/OpenZeppelin/utils/Address.sol\n\n// Original license: SPDX_License_Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\n/**\n * Based on OpenZeppelin's Address:\n * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.2/contracts/utils/Address.sol\n *\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize, which returns 0 for contracts in\n        // construction, since the code is only stored at the end of the\n        // constructor execution.\n\n        uint256 size;\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            size := extcodesize(account)\n        }\n        return size > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain`call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return\n            functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        // solhint-disable-next-line avoid-low-level-calls\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return _verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data\n    ) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        // solhint-disable-next-line avoid-low-level-calls\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return _verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(\n        address target,\n        bytes memory data\n    ) internal returns (bytes memory) {\n        return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(isContract(target), \"Address: delegate call to non-contract\");\n\n        // solhint-disable-next-line avoid-low-level-calls\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return _verifyCallResult(success, returndata, errorMessage);\n    }\n\n    function _verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) private pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length > 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                // solhint-disable-next-line no-inline-assembly\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n\n\n// File contracts/Dependencies/OpenZeppelin/proxy/Initializable.sol\n\n// Original license: SPDX_License_Identifier: MIT\n\n// solhint-disable-next-line compiler-version\npragma solidity >=0.4.24 <0.8.0;\n\n/**\n * Based on the OpenZeppelin Initializable:\n * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.2/contracts/proxy/Initializable.sol\n *\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n */\nabstract contract Initializable {\n    /**\n     * @dev Indicates that the contract has been initialized.\n     */\n    bool private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Modifier to protect an initializer function from being invoked twice.\n     */\n    modifier initializer() {\n        require(\n            _initializing || _isConstructor() || !_initialized,\n            \"Initializable: contract is already initialized\"\n        );\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n    /// @dev Returns true if and only if the function is running in the constructor\n    function _isConstructor() private view returns (bool) {\n        return !Address.isContract(address(this));\n    }\n}\n\n\n// File contracts/Dependencies/OpenZeppelin/utils/ContextUpgradeable.sol\n\n// Original license: SPDX_License_Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/*\n * Based on OpenZeppelin's OwnableUpgradeable contract:\n * https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/v3.4.2/contracts/utils/ContextUpgradeable.sol\n *\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal initializer {\n        __Context_init_unchained();\n    }\n\n    function __Context_init_unchained() internal initializer {}\n    function _msgSender() internal view virtual returns (address payable) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes memory) {\n        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n        return msg.data;\n    }\n    uint256[50] private __gap;\n}\n\n\n// File contracts/Dependencies/OpenZeppelin/access/OwnableUpgradeable.sol\n\n// Original license: SPDX_License_Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n\n/**\n * Based on OpenZeppelin's OwnableUpgradeable contract:\n * https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/v3.4.2/contracts/access/OwnableUpgradeable.sol\n *\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    function __Ownable_init() internal initializer {\n        __Context_init_unchained();\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal initializer {\n        address msgSender = _msgSender();\n        _owner = msgSender;\n        emit OwnershipTransferred(address(0), msgSender);\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        emit OwnershipTransferred(_owner, address(0));\n        _owner = address(0);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        emit OwnershipTransferred(_owner, newOwner);\n        _owner = newOwner;\n    }\n    uint256[49] private __gap;\n}\n\n\n// File contracts/Dependencies/OpenZeppelin/cryptography/ECDSA.sol\n\n// Original license: SPDX_License_Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature`. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {toEthSignedMessageHash} on it.\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        // Check the signature length\n        if (signature.length != 65) {\n            revert(\"ECDSA: invalid signature length\");\n        }\n\n        // Divide the signature in r, s and v variables\n        bytes32 r;\n        bytes32 s;\n        uint8 v;\n\n        // ecrecover takes the signature parameters, and the only way to get them\n        // currently is to use assembly.\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            r := mload(add(signature, 0x20))\n            s := mload(add(signature, 0x40))\n            v := byte(0, mload(add(signature, 0x60)))\n        }\n\n        return recover(hash, v, r, s);\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover-bytes32-bytes-} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n        //\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n        // these malleable signatures as well.\n        require(\n            uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,\n            \"ECDSA: invalid signature 's' value\"\n        );\n        require(v == 27 || v == 28, \"ECDSA: invalid signature 'v' value\");\n\n        // If the signature is valid (and not malleable), return the signer address\n        address signer = ecrecover(hash, v, r, s);\n        require(signer != address(0), \"ECDSA: invalid signature\");\n\n        return signer;\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n     * replicates the behavior of the\n     * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]\n     * JSON-RPC method.\n     *\n     * See {recover}.\n     */\n    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n        // 32 is the length in bytes of hash,\n        // enforced by the type signature above\n        return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n    }\n}\n\n\n// File contracts/Dependencies/OpenZeppelin/math/SafeMath.sol\n\n// Original license: SPDX_License_Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * Based on OpenZeppelin's SafeMath:\n * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.2/contracts/math/SafeMath.sol\n *\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n    /**\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        uint256 c = a + b;\n        if (c < a) return (false, 0);\n        return (true, c);\n    }\n\n    /**\n     * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        if (b > a) return (false, 0);\n        return (true, a - b);\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n        // benefit is lost if 'b' is also tested.\n        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n        if (a == 0) return (true, 0);\n        uint256 c = a * b;\n        if (c / a != b) return (false, 0);\n        return (true, c);\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        if (b == 0) return (false, 0);\n        return (true, a / b);\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        if (b == 0) return (false, 0);\n        return (true, a % b);\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `+` operator.\n     *\n     * Requirements:\n     *\n     * - Addition cannot overflow.\n     */\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        uint256 c = a + b;\n        require(c >= a, \"SafeMath: addition overflow\");\n        return c;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        require(b <= a, \"SafeMath: subtraction overflow\");\n        return a - b;\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `*` operator.\n     *\n     * Requirements:\n     *\n     * - Multiplication cannot overflow.\n     */\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (a == 0) return 0;\n        uint256 c = a * b;\n        require(c / a == b, \"SafeMath: multiplication overflow\");\n        return c;\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        require(b > 0, \"SafeMath: division by zero\");\n        return a / b;\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting when dividing by zero.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n        require(b > 0, \"SafeMath: modulo by zero\");\n        return a % b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n     * overflow (when the result is negative).\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {trySub}.\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        require(b <= a, errorMessage);\n        return a - b;\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n     * division by zero. The result is rounded towards zero.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {tryDiv}.\n     *\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        require(b > 0, errorMessage);\n        return a / b;\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting with custom message when dividing by zero.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {tryMod}.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        require(b > 0, errorMessage);\n        return a % b;\n    }\n}\n\n\n// File contracts/Dependencies/OpenZeppelin/interfaces/IERC2612.sol\n\n// Original license: SPDX_License_Identifier: MIT\n\npragma solidity 0.7.6;\n\n/**\n * @dev Interface of the ERC2612 standard as defined in the EIP.\n *\n * Adds the {permit} method, which can be used to change one's\n * {IERC20-allowance} without having to send a transaction, by signing a\n * message. This allows users to spend tokens without having to hold Ether.\n *\n * See https://eips.ethereum.org/EIPS/eip-2612.\n *\n * Code adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2237/\n */\ninterface IERC2612 {\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over `owner`'s tokens,\n     * given `owner`'s signed approval.\n     *\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n     * ordering also apply here.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     * - `deadline` must be a timestamp in the future.\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n     * over the EIP712-formatted function arguments.\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\n     *\n     * For more information on the signature format, see the\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n     * section].\n     */\n    function permit(\n        address owner,\n        address spender,\n        uint256 amount,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @dev Returns the current ERC2612 nonce for `owner`. This value must be\n     * included whenever a signature is generated for {permit}.\n     *\n     * Every successful call to {permit} increases `owner`'s nonce by one. This\n     * prevents a signature from being used multiple times.\n     *\n     * `owner` can limit the time a Permit is valid for by setting `deadline` to\n     * a value in the near future. The deadline argument can be set to uint(-1) to\n     * create Permits that effectively never expire.\n     */\n    function nonces(address owner) external view returns (uint256);\n\n    function version() external view returns (string memory);\n    function permitTypeHash() external view returns (bytes32);\n    function domainSeparator() external view returns (bytes32);\n}\n\n\n// File contracts/Dependencies/OpenZeppelin/token/ERC20/IERC20.sol\n\n// Original license: SPDX_License_Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * Based on the OpenZeppelin IER20:\n * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.2/contracts/token/ERC20/IERC20.sol\n *\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n// File contracts/Dependencies/OpenZeppelin/token/ERC20/extensions/IERC20Metadata.sol\n\n// Original license: SPDX_License_Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * Based on the OpenZeppelin IERC20Metadata:\n * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.1.0/contracts/token/ERC20/extensions/IERC20Metadata.sol\n *\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n\n\n// File contracts/Interfaces/IERC3009.sol\n\n// Original license: SPDX_License_Identifier: MIT\n\npragma solidity 0.7.6;\n\ninterface IERC3009 {\n    /**\n     * @notice Execute a transfer with a signed authorization\n     * @param from          Payer's address (Authorizer)\n     * @param to            Payee's address\n     * @param value         Amount to be transferred\n     * @param validAfter    The time after which this is valid (unix time)\n     * @param validBefore   The time before which this is valid (unix time)\n     * @param nonce         Unique nonce\n     * @param v             v of the signature\n     * @param r             r of the signature\n     * @param s             s of the signature\n     */\n    function transferWithAuthorization(\n        address from,\n        address to,\n        uint256 value,\n        uint256 validAfter,\n        uint256 validBefore,\n        bytes32 nonce,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @notice Receive a transfer with a signed authorization from the payer\n     * @dev This has an additional check to ensure that the payee's address\n     * matches the caller of this function to prevent front-running attacks.\n     * @param from          Payer's address (Authorizer)\n     * @param to            Payee's address\n     * @param value         Amount to be transferred\n     * @param validAfter    The time after which this is valid (unix time)\n     * @param validBefore   The time before which this is valid (unix time)\n     * @param nonce         Unique nonce\n     * @param v             v of the signature\n     * @param r             r of the signature\n     * @param s             s of the signature\n     */\n    function receiveWithAuthorization(\n        address from,\n        address to,\n        uint256 value,\n        uint256 validAfter,\n        uint256 validBefore,\n        bytes32 nonce,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @notice Attempt to cancel an authorization\n     * @param authorizer    Authorizer's address\n     * @param nonce         Nonce of the authorization\n     * @param v             v of the signature\n     * @param r             r of the signature\n     * @param s             s of the signature\n     */\n    function cancelAuthorization(\n        address authorizer,\n        bytes32 nonce,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @notice Returns the state of an authorization\n     * @dev Nonces are randomly generated 32-byte data unique to the\n     * authorizer's address\n     * @param authorizer    Authorizer's address\n     * @param nonce         Nonce of the authorization\n     * @return true if the nonce is used\n     */\n    function authorizationState(address authorizer, bytes32 nonce) external view returns (bool);\n\n    event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce);\n    event AuthorizationCanceled(address indexed authorizer, bytes32 indexed nonce);\n}\n\n\n// File contracts/Interfaces/IDebtToken.sol\n\n// Original license: SPDX_License_Identifier: MIT\n\npragma solidity 0.7.6;\n\n\n\ninterface IDebtToken is IERC20Metadata, IERC2612, IERC3009 {\n    // --- Events ---\n\n    event TroveManagerAddressChanged(address _troveManagerAddress);\n    event StabilityPoolAddressChanged(address _newStabilityPoolAddress);\n    event BorrowerOperationsAddressChanged(address _newBorrowerOperationsAddress);\n\n    // --- Functions ---\n\n    function mint(address _account, uint256 _amount) external;\n\n    function burn(address _account, uint256 _amount) external;\n\n    function sendToPool(address _sender, address poolAddress, uint256 _amount) external;\n\n    function returnFromPool(address poolAddress, address user, uint256 _amount) external;\n}\n\n\n// File contracts/DebtToken.sol\n\n// Original license: SPDX_License_Identifier: MIT\n\npragma solidity 0.7.6;\n\n\n\n\n\n/**\n *\n * Based upon OpenZeppelin's ERC20 contract:\n * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol\n *\n * and their EIP2612 (ERC20Permit / ERC712) functionality:\n * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/53516bc555a454862470e7860a9b5254db4d00f5/contracts/token/ERC20/ERC20Permit.sol\n *\n *\n * --- Functionality added specific to the DebtToken ---\n *\n * 1) Transfer protection: blacklist of addresses that are invalid recipients (i.e. core contracts) in external\n * transfer() and transferFrom() calls. The purpose is to protect users from losing tokens by mistakenly sending token directly to a\n * core contract, when they should rather call the right function.\n *\n * 2) sendToPool() and returnFromPool(): functions callable only core contracts, which move Debt tokens between pool <-> user.\n */\n\ncontract DebtToken is OwnableUpgradeable, CheckContract, IDebtToken {\n    using SafeMath for uint256;\n\n    uint256 private _totalSupply;\n    string internal constant _NAME = \"USD for Filecoin Community\";\n    string internal constant _SYMBOL = \"USDFC\";\n    string internal constant _VERSION = \"1\";\n    uint8 internal constant _DECIMALS = 18;\n\n    // --- Data for EIP2612 ---\n\n    // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n    bytes32 private constant _PERMIT_TYPEHASH =\n        0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\n    // keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n    bytes32 private constant _TYPE_HASH =\n        0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;\n\n    // --- Data for EIP3009 ---\n\n    // keccak256(\"TransferWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)\");\n    bytes32 public constant TRANSFER_WITH_AUTHORIZATION_TYPEHASH =\n        0x7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267;\n    // keccak256(\"ReceiveWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)\");\n    bytes32 public constant RECEIVE_WITH_AUTHORIZATION_TYPEHASH =\n        0xd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de8;\n    // keccak256(\"CancelAuthorization(address authorizer,bytes32 nonce)\");\n    bytes32 public constant CANCEL_AUTHORIZATION_TYPEHASH =\n        0x158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a1597429;\n\n    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n    // invalidate the cached domain separator if the chain id changes.\n    bytes32 private _CACHED_DOMAIN_SEPARATOR;\n    uint256 private _CACHED_CHAIN_ID;\n\n    bytes32 private _HASHED_NAME;\n    bytes32 private _HASHED_VERSION;\n\n    // Nonces for EIP-2612\n    mapping(address => uint256) private _nonces;\n\n    // User data for Debt token\n    mapping(address => uint256) private _balances;\n    mapping(address => mapping(address => uint256)) private _allowances;\n\n    // --- Addresses ---\n    address public troveManagerAddress;\n    address public stabilityPoolAddress;\n    address public borrowerOperationsAddress;\n\n    // EIP-3009 authorization states\n    mapping(address => mapping(bytes32 => bool)) private _authorizationStates;\n\n    constructor() initializer {}\n\n    function initialize(\n        address _troveManagerAddress,\n        address _stabilityPoolAddress,\n        address _borrowerOperationsAddress\n    ) external initializer {\n        __Ownable_init();\n        _setAddresses(_troveManagerAddress, _stabilityPoolAddress, _borrowerOperationsAddress);\n    }\n\n    function _setAddresses(\n        address _troveManagerAddress,\n        address _stabilityPoolAddress,\n        address _borrowerOperationsAddress\n    ) private {\n        checkContract(_troveManagerAddress);\n        checkContract(_stabilityPoolAddress);\n        checkContract(_borrowerOperationsAddress);\n\n        troveManagerAddress = _troveManagerAddress;\n        emit TroveManagerAddressChanged(_troveManagerAddress);\n\n        stabilityPoolAddress = _stabilityPoolAddress;\n        emit StabilityPoolAddressChanged(_stabilityPoolAddress);\n\n        borrowerOperationsAddress = _borrowerOperationsAddress;\n        emit BorrowerOperationsAddressChanged(_borrowerOperationsAddress);\n\n        bytes32 hashedName = keccak256(bytes(_NAME));\n        bytes32 hashedVersion = keccak256(bytes(_VERSION));\n\n        _HASHED_NAME = hashedName;\n        _HASHED_VERSION = hashedVersion;\n        _CACHED_CHAIN_ID = _chainID();\n        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(_TYPE_HASH, hashedName, hashedVersion);\n    }\n\n    // --- Functions for intra-protocol calls ---\n\n    function mint(address _account, uint256 _amount) external override {\n        _requireCallerIsBorrowerOperations();\n        _mint(_account, _amount);\n    }\n\n    function burn(address _account, uint256 _amount) external override {\n        _requireCallerIsBOorTroveMorSP();\n        _burn(_account, _amount);\n    }\n\n    function sendToPool(address _sender, address _poolAddress, uint256 _amount) external override {\n        _requireCallerIsStabilityPool();\n        _transfer(_sender, _poolAddress, _amount);\n    }\n\n    function returnFromPool(\n        address _poolAddress,\n        address _receiver,\n        uint256 _amount\n    ) external override {\n        _requireCallerIsTroveMorSP();\n        _transfer(_poolAddress, _receiver, _amount);\n    }\n\n    // --- External functions ---\n\n    function totalSupply() external view override returns (uint256) {\n        return _totalSupply;\n    }\n\n    function balanceOf(address _account) external view override returns (uint256) {\n        return _balances[_account];\n    }\n\n    function transfer(address _recipient, uint256 _amount) external override returns (bool) {\n        _requireValidRecipient(_recipient);\n        _transfer(msg.sender, _recipient, _amount);\n        return true;\n    }\n\n    function allowance(address _owner, address _spender) external view override returns (uint256) {\n        return _allowances[_owner][_spender];\n    }\n\n    function approve(address _spender, uint256 _amount) external override returns (bool) {\n        _approve(msg.sender, _spender, _amount);\n        return true;\n    }\n\n    function transferFrom(\n        address _sender,\n        address _recipient,\n        uint256 _amount\n    ) external override returns (bool) {\n        _requireValidRecipient(_recipient);\n        _transfer(_sender, _recipient, _amount);\n        _approve(\n            _sender,\n            msg.sender,\n            _allowances[_sender][msg.sender].sub(\n                _amount,\n                \"ERC20: transfer amount exceeds allowance\"\n            )\n        );\n        return true;\n    }\n\n    // --- EIP-712 Functionality ---\n\n    function domainSeparator() public view override returns (bytes32) {\n        if (_chainID() == _CACHED_CHAIN_ID) {\n            return _CACHED_DOMAIN_SEPARATOR;\n        } else {\n            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\n        }\n    }\n\n    /**\n     * @dev Internal function to recover signer address from a signed message\n     * @param _v Signature v component\n     * @param _r Signature r component\n     * @param _s Signature s component\n     * @param _typeHashAndData The encoded type hash and data for signature verification\n     * @return The recovered address\n     */\n    function _recover(\n        uint8 _v,\n        bytes32 _r,\n        bytes32 _s,\n        bytes memory _typeHashAndData\n    ) internal view returns (address) {\n        bytes32 digest = keccak256(\n            abi.encodePacked(\"\\x19\\x01\", domainSeparator(), keccak256(_typeHashAndData))\n        );\n        return ECDSA.recover(digest, _v, _r, _s);\n    }\n\n    // --- EIP-2612 Functionality ---\n\n    function permit(\n        address _owner,\n        address _spender,\n        uint _amount,\n        uint _deadline,\n        uint8 _v,\n        bytes32 _r,\n        bytes32 _s\n    ) external override {\n        require(_deadline >= block.timestamp, \"EIP2612: expired deadline\");\n        uint256 currentNonce = _nonces[_owner];\n        _nonces[_owner] = currentNonce + 1;\n        address recoveredAddress = _recover(\n            _v,\n            _r,\n            _s,\n            abi.encode(_PERMIT_TYPEHASH, _owner, _spender, _amount, currentNonce, _deadline)\n        );\n\n        require(recoveredAddress == _owner, \"EIP2612: invalid signature\");\n        _approve(_owner, _spender, _amount);\n    }\n\n    function nonces(address _owner) external view override returns (uint256) {\n        return _nonces[_owner];\n    }\n\n    // --- EIP-3009 Functionality ---\n\n    function transferWithAuthorization(\n        address _from,\n        address _to,\n        uint256 _value,\n        uint256 _validAfter,\n        uint256 _validBefore,\n        bytes32 _nonce,\n        uint8 _v,\n        bytes32 _r,\n        bytes32 _s\n    ) external override {\n        require(block.timestamp > _validAfter, \"EIP3009: authorization not yet valid\");\n        require(block.timestamp < _validBefore, \"EIP3009: authorization expired\");\n        require(!_authorizationStates[_from][_nonce], \"EIP3009: authorization already used\");\n        _requireValidRecipient(_to);\n\n        address recoveredAddress = _recover(\n            _v,\n            _r,\n            _s,\n            abi.encode(\n                TRANSFER_WITH_AUTHORIZATION_TYPEHASH,\n                _from,\n                _to,\n                _value,\n                _validAfter,\n                _validBefore,\n                _nonce\n            )\n        );\n        require(recoveredAddress == _from, \"EIP3009: invalid signature\");\n\n        _authorizationStates[_from][_nonce] = true;\n        emit AuthorizationUsed(_from, _nonce);\n\n        _transfer(_from, _to, _value);\n    }\n\n    function receiveWithAuthorization(\n        address _from,\n        address _to,\n        uint256 _value,\n        uint256 _validAfter,\n        uint256 _validBefore,\n        bytes32 _nonce,\n        uint8 _v,\n        bytes32 _r,\n        bytes32 _s\n    ) external override {\n        require(_to == msg.sender, \"EIP3009: caller must be the recipient\");\n        require(block.timestamp > _validAfter, \"EIP3009: authorization not yet valid\");\n        require(block.timestamp < _validBefore, \"EIP3009: authorization expired\");\n        require(!_authorizationStates[_from][_nonce], \"EIP3009: authorization already used\");\n        _requireValidRecipient(_to);\n\n        address recoveredAddress = _recover(\n            _v,\n            _r,\n            _s,\n            abi.encode(\n                RECEIVE_WITH_AUTHORIZATION_TYPEHASH,\n                _from,\n                _to,\n                _value,\n                _validAfter,\n                _validBefore,\n                _nonce\n            )\n        );\n        require(recoveredAddress == _from, \"EIP3009: invalid signature\");\n\n        _authorizationStates[_from][_nonce] = true;\n        emit AuthorizationUsed(_from, _nonce);\n\n        _transfer(_from, _to, _value);\n    }\n\n    function cancelAuthorization(\n        address _authorizer,\n        bytes32 _nonce,\n        uint8 _v,\n        bytes32 _r,\n        bytes32 _s\n    ) external override {\n        require(!_authorizationStates[_authorizer][_nonce], \"EIP3009: authorization already used\");\n\n        address recoveredAddress = _recover(\n            _v,\n            _r,\n            _s,\n            abi.encode(CANCEL_AUTHORIZATION_TYPEHASH, _authorizer, _nonce)\n        );\n        require(recoveredAddress == _authorizer, \"EIP3009: invalid signature\");\n\n        _authorizationStates[_authorizer][_nonce] = true;\n        emit AuthorizationCanceled(_authorizer, _nonce);\n    }\n\n    function authorizationState(\n        address _authorizer,\n        bytes32 _nonce\n    ) external view override returns (bool) {\n        return _authorizationStates[_authorizer][_nonce];\n    }\n\n    // --- Internal operations ---\n\n    function _chainID() private pure returns (uint256 chainID) {\n        assembly {\n            chainID := chainid()\n        }\n    }\n\n    function _buildDomainSeparator(\n        bytes32 _typeHash,\n        bytes32 _name,\n        bytes32 _version\n    ) private view returns (bytes32) {\n        return keccak256(abi.encode(_typeHash, _name, _version, _chainID(), address(this)));\n    }\n\n    // --- Internal operations ---\n    // Warning: sanity checks (for sender and recipient) should have been done before calling these internal functions\n\n    function _transfer(address _sender, address _recipient, uint256 _amount) internal {\n        require(_sender != address(0), \"ERC20: transfer from the zero address\");\n        require(_recipient != address(0), \"ERC20: transfer to the zero address\");\n\n        _balances[_sender] = _balances[_sender].sub(\n            _amount,\n            \"ERC20: transfer amount exceeds balance\"\n        );\n        _balances[_recipient] = _balances[_recipient].add(_amount);\n        emit Transfer(_sender, _recipient, _amount);\n    }\n\n    function _mint(address _account, uint256 _amount) internal {\n        require(_account != address(0), \"ERC20: mint to the zero address\");\n\n        _totalSupply = _totalSupply.add(_amount);\n        _balances[_account] = _balances[_account].add(_amount);\n        emit Transfer(address(0), _account, _amount);\n    }\n\n    function _burn(address _account, uint256 _amount) internal {\n        require(_account != address(0), \"ERC20: burn from the zero address\");\n\n        _balances[_account] = _balances[_account].sub(\n            _amount,\n            \"ERC20: burn amount exceeds balance\"\n        );\n        _totalSupply = _totalSupply.sub(_amount);\n        emit Transfer(_account, address(0), _amount);\n    }\n\n    function _approve(address _owner, address _spender, uint256 _amount) internal {\n        require(_owner != address(0), \"ERC20: approve from the zero address\");\n        require(_spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[_owner][_spender] = _amount;\n        emit Approval(_owner, _spender, _amount);\n    }\n\n    // --- 'require' functions ---\n\n    function _requireValidRecipient(address _recipient) internal view {\n        require(\n            _recipient != address(0) && _recipient != address(this),\n            \"DebtToken: Cannot transfer tokens directly to the Debt token contract or the zero address\"\n        );\n        require(\n            _recipient != stabilityPoolAddress &&\n                _recipient != troveManagerAddress &&\n                _recipient != borrowerOperationsAddress,\n            \"DebtToken: Cannot transfer tokens directly to the StabilityPool, TroveManager or BorrowerOps\"\n        );\n    }\n\n    function _requireCallerIsBorrowerOperations() internal view {\n        require(\n            msg.sender == borrowerOperationsAddress,\n            \"DebtToken: Caller is not BorrowerOperations\"\n        );\n    }\n\n    function _requireCallerIsBOorTroveMorSP() internal view {\n        require(\n            msg.sender == borrowerOperationsAddress ||\n                msg.sender == troveManagerAddress ||\n                msg.sender == stabilityPoolAddress,\n            \"DebtToken: Caller is neither BorrowerOperations nor TroveManager nor StabilityPool\"\n        );\n    }\n\n    function _requireCallerIsStabilityPool() internal view {\n        require(msg.sender == stabilityPoolAddress, \"DebtToken: Caller is not the StabilityPool\");\n    }\n\n    function _requireCallerIsTroveMorSP() internal view {\n        require(\n            msg.sender == troveManagerAddress || msg.sender == stabilityPoolAddress,\n            \"DebtToken: Caller is neither TroveManager nor StabilityPool\"\n        );\n    }\n\n    // --- Optional functions ---\n\n    function name() external pure override returns (string memory) {\n        return _NAME;\n    }\n\n    function symbol() external pure override returns (string memory) {\n        return _SYMBOL;\n    }\n\n    function decimals() external pure override returns (uint8) {\n        return _DECIMALS;\n    }\n\n    function version() external pure override returns (string memory) {\n        return _VERSION;\n    }\n\n    function permitTypeHash() external pure override returns (bytes32) {\n        return _PERMIT_TYPEHASH;\n    }\n}","deployed_bytecode":"0x","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":null,"optimization_runs":100,"sourcify_repo_url":null,"decoded_constructor_args":null,"compiler_version":"v0.7.6+commit.7338295f","is_verified_via_verifier_alliance":false,"verified_at":"2025-12-23T05:37:23.301200Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x60806040523480156200001157600080fd5b50600054610100900460ff16806200002e57506200002e620000c0565b806200003d575060005460ff16155b6200007a5760405162461bcd60e51b815260040180806020018281038252602e81526020018062002687602e913960400191505060405180910390fd5b600054610100900460ff16158015620000a6576000805460ff1961ff0019909116610100171660011790555b8015620000b9576000805461ff00191690555b50620000e4565b6000620000d830620000de60201b620013241760201c565b15905090565b3b151590565b61259380620000f46000396000f3fe608060405234801561001057600080fd5b50600436106101b05760003560e01c80638da5cb5b116100ef578063d505accf11610092578063d505accf14610503578063d916948714610554578063dd62ed3e1461055c578063e3ee160e1461058a578063e94a0102146105e9578063ef55bec614610615578063f2fde38b14610674578063f698da251461069a576101b0565b80638da5cb5b1461041d57806395d89b41146104255780639dc29fac1461042d578063a0cc6a6814610459578063a9059cbb14610461578063b7f8cf9b1461048d578063bb997bac14610495578063c0c53b8b146104cb576101b0565b806340c10f191161015757806340c10f191461034457806354fd4d50146103705780635a049a70146103785780635a4d28bb146103b957806370a08231146103c1578063715018a6146103e75780637ecebe00146103ef5780637f2eecc314610415576101b0565b806306fdde03146101b5578063095ea7b3146102325780630b622ab21461027257806310ce43bd1461029657806318160ddd146102b057806320c582be146102b857806323b872dd146102f0578063313ce56714610326575b600080fd5b6101bd6106a2565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f75781810151838201526020016101df565b50505050905090810190601f1680156102245780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61025e6004803603604081101561024857600080fd5b506001600160a01b0381351690602001356106d7565b604080519115158252519081900360200190f35b61027a6106ed565b604080516001600160a01b039092168252519081900360200190f35b61029e6106fc565b60408051918252519081900360200190f35b61029e610720565b6102ee600480360360608110156102ce57600080fd5b506001600160a01b03813581169160208101359091169060400135610726565b005b61025e6004803603606081101561030657600080fd5b506001600160a01b0381358116916020810135909116906040013561073e565b61032e6107b0565b6040805160ff9092168252519081900360200190f35b6102ee6004803603604081101561035a57600080fd5b506001600160a01b0381351690602001356107b5565b6101bd6107cb565b6102ee600480360360a081101561038e57600080fd5b506001600160a01b038135169060208101359060ff60408201351690606081013590608001356107e6565b61027a610975565b61029e600480360360208110156103d757600080fd5b50356001600160a01b0316610984565b6102ee61099f565b61029e6004803603602081101561040557600080fd5b50356001600160a01b0316610a4b565b61029e610a66565b61027a610a8a565b6101bd610a99565b6102ee6004803603604081101561044357600080fd5b506001600160a01b038135169060200135610ab8565b61029e610aca565b61025e6004803603604081101561047757600080fd5b506001600160a01b038135169060200135610aee565b61027a610b04565b6102ee600480360360608110156104ab57600080fd5b506001600160a01b03813581169160208101359091169060400135610b13565b6102ee600480360360608110156104e157600080fd5b506001600160a01b038135811691602081013582169160409091013516610b1b565b6102ee600480360360e081101561051957600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135610bd3565b61029e610d39565b61029e6004803603604081101561057257600080fd5b506001600160a01b0381358116916020013516610d5d565b6102ee60048036036101208110156105a157600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e0810135906101000135610d88565b61025e600480360360408110156105ff57600080fd5b506001600160a01b038135169060200135610fda565b6102ee600480360361012081101561062c57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e0810135906101000135611005565b6102ee6004803603602081101561068a57600080fd5b50356001600160a01b03166111cc565b61029e6112cf565b60408051808201909152601a81527955534420666f722046696c65636f696e20436f6d6d756e69747960301b60208201525b90565b60006106e433848461132a565b50600192915050565b606e546001600160a01b031681565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c990565b60655490565b61072e611416565b610739838383611476565b505050565b6000610749836115b6565b610754848484611476565b6107a684336107a185604051806060016040528060288152602001612451602891396001600160a01b038a166000908152606c602090815260408083203384529091529020549190611696565b61132a565b5060019392505050565b601290565b6107bd61172d565b6107c78282611776565b5050565b6040805180820190915260018152603160f81b602082015290565b6001600160a01b038516600090815260706020908152604080832087845290915290205460ff16156108495760405162461bcd60e51b815260040180806020018281038252602381526020018061236b6023913960400191505060405180910390fd5b60006108b28484847f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742960001b8a8a60405160200180848152602001836001600160a01b03168152602001828152602001935050505060405160208183030381529060405261184a565b9050856001600160a01b0316816001600160a01b031614610917576040805162461bcd60e51b815260206004820152601a602482015279454950333030393a20696e76616c6964207369676e617475726560301b604482015290519081900360640190fd5b6001600160a01b0386166000818152607060209081526040808320898452909152808220805460ff19166001179055518792917f1cdd46ff242716cdaa72d159d339a485b3438398348d68f09d7c8c0a59353d8191a3505050505050565b606d546001600160a01b031681565b6001600160a01b03166000908152606b602052604090205490565b6109a76118af565b6001600160a01b03166109b8610a8a565b6001600160a01b031614610a13576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6033546040516000916001600160a01b031690600080516020612479833981519152908390a3603380546001600160a01b0319169055565b6001600160a01b03166000908152606a602052604090205490565b7fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de881565b6033546001600160a01b031690565b604080518082019091526005815264555344464360d81b602082015290565b610ac06118b3565b6107c78282611926565b7f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226781565b6000610af9836115b6565b6106e4338484611476565b606f546001600160a01b031681565b61072e611a04565b600054610100900460ff1680610b345750610b34611a4d565b80610b42575060005460ff16155b610b7d5760405162461bcd60e51b815260040180806020018281038252602e81526020018061238e602e913960400191505060405180910390fd5b600054610100900460ff16158015610ba8576000805460ff1961ff0019909116610100171660011790555b610bb0611a5e565b610bbb848484611b0f565b8015610bcd576000805461ff00191690555b50505050565b42841015610c24576040805162461bcd60e51b8152602060048201526019602482015278454950323631323a206578706972656420646561646c696e6560381b604482015290519081900360640190fd5b6001600160a01b038088166000818152606a6020908152604080832080546001810190915581517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c99381019390935282820194909452938a1660608201526080810189905260a0810183905260c08082018990528451808303909101815260e09091019093529091610cbb9086908690869061184a565b9050886001600160a01b0316816001600160a01b031614610d23576040805162461bcd60e51b815260206004820152601a60248201527f454950323631323a20696e76616c6964207369676e6174757265000000000000604482015290519081900360640190fd5b610d2e89898961132a565b505050505050505050565b7f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742981565b6001600160a01b039182166000908152606c6020908152604080832093909416825291909152205490565b854211610dc65760405162461bcd60e51b81526004018080602001828103825260248152602001806124036024913960400191505060405180910390fd5b844210610e1a576040805162461bcd60e51b815260206004820152601e60248201527f454950333030393a20617574686f72697a6174696f6e20657870697265640000604482015290519081900360640190fd5b6001600160a01b038916600090815260706020908152604080832087845290915290205460ff1615610e7d5760405162461bcd60e51b815260040180806020018281038252602381526020018061236b6023913960400191505060405180910390fd5b610e86886115b6565b604080517f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226760208201526001600160a01b03808c16828401528a1660608201526080810189905260a0810188905260c0810187905260e080820187905282518083039091018152610100909101909152600090610f089085908590859061184a565b9050896001600160a01b0316816001600160a01b031614610f6d576040805162461bcd60e51b815260206004820152601a602482015279454950333030393a20696e76616c6964207369676e617475726560301b604482015290519081900360640190fd5b6001600160a01b038a166000818152607060209081526040808320898452909152808220805460ff19166001179055518792917f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a591a3610fce8a8a8a611476565b50505050505050505050565b6001600160a01b03919091166000908152607060209081526040808320938352929052205460ff1690565b6001600160a01b038816331461104c5760405162461bcd60e51b81526004018080602001828103825260258152602001806123de6025913960400191505060405180910390fd5b85421161108a5760405162461bcd60e51b81526004018080602001828103825260248152602001806124036024913960400191505060405180910390fd5b8442106110de576040805162461bcd60e51b815260206004820152601e60248201527f454950333030393a20617574686f72697a6174696f6e20657870697265640000604482015290519081900360640190fd5b6001600160a01b038916600090815260706020908152604080832087845290915290205460ff16156111415760405162461bcd60e51b815260040180806020018281038252602381526020018061236b6023913960400191505060405180910390fd5b61114a886115b6565b604080517fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de860208201526001600160a01b03808c16828401528a1660608201526080810189905260a0810188905260c0810187905260e080820187905282518083039091018152610100909101909152600090610f089085908590859061184a565b6111d46118af565b6001600160a01b03166111e5610a8a565b6001600160a01b031614611240576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166112855760405162461bcd60e51b81526004018080602001828103825260268152602001806121a96026913960400191505060405180910390fd5b6033546040516001600160a01b0380841692169060008051602061247983398151915290600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b60006067546112dc611cee565b14156112eb57506066546106d4565b61131d7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60001b606854606954611cf2565b90506106d4565b3b151590565b6001600160a01b03831661136f5760405162461bcd60e51b81526004018080602001828103825260248152602001806124ff6024913960400191505060405180910390fd5b6001600160a01b0382166113b45760405162461bcd60e51b81526004018080602001828103825260228152602001806121cf6022913960400191505060405180910390fd5b6001600160a01b038084166000818152606c6020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b606d546001600160a01b03163314806114395750606e546001600160a01b031633145b6114745760405162461bcd60e51b815260040180806020018281038252603b815260200180612523603b913960400191505060405180910390fd5b565b6001600160a01b0383166114bb5760405162461bcd60e51b81526004018080602001828103825260258152602001806124da6025913960400191505060405180910390fd5b6001600160a01b0382166115005760405162461bcd60e51b81526004018080602001828103825260238152602001806121646023913960400191505060405180910390fd5b61153d816040518060600160405280602681526020016122ca602691396001600160a01b0386166000908152606b60205260409020549190611696565b6001600160a01b038085166000908152606b6020526040808220939093559084168152205461156c9082611d54565b6001600160a01b038084166000818152606b6020908152604091829020949094558051858152905191939287169260008051602061249983398151915292918290030190a3505050565b6001600160a01b038116158015906115d757506001600160a01b0381163014155b6116125760405162461bcd60e51b81526004018080602001828103825260598152602001806122f06059913960600191505060405180910390fd5b606e546001600160a01b0382811691161480159061163e5750606d546001600160a01b03828116911614155b80156116585750606f546001600160a01b03828116911614155b6116935760405162461bcd60e51b815260040180806020018281038252605c815260200180612243605c913960600191505060405180910390fd5b50565b600081848411156117255760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156116ea5781810151838201526020016116d2565b50505050905090810190601f1680156117175780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b606f546001600160a01b031633146114745760405162461bcd60e51b815260040180806020018281038252602b81526020018061229f602b913960400191505060405180910390fd5b6001600160a01b0382166117d1576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6065546117de9082611d54565b6065556001600160a01b0382166000908152606b60205260409020546118049082611d54565b6001600160a01b0383166000818152606b602090815260408083209490945583518581529351929391926000805160206124998339815191529281900390910190a35050565b6000806118556112cf565b8380519060200120604051602001808061190160f01b815250600201838152602001828152602001925050506040516020818303038152906040528051906020012090506118a581878787611db5565b9695505050505050565b3390565b606f546001600160a01b03163314806118d65750606d546001600160a01b031633145b806118eb5750606e546001600160a01b031633145b6114745760405162461bcd60e51b81526004018080602001828103825260528152602001806121f16052913960600191505060405180910390fd5b6001600160a01b03821661196b5760405162461bcd60e51b81526004018080602001828103825260218152602001806124b96021913960400191505060405180910390fd5b6119a881604051806060016040528060228152602001612187602291396001600160a01b0385166000908152606b60205260409020549190611696565b6001600160a01b0383166000908152606b60205260409020556065546119ce9082611f24565b6065556040805182815290516000916001600160a01b038516916000805160206124998339815191529181900360200190a35050565b606e546001600160a01b031633146114745760405162461bcd60e51b815260040180806020018281038252602a815260200180612427602a913960400191505060405180910390fd5b6000611a5830611324565b15905090565b600054610100900460ff1680611a775750611a77611a4d565b80611a85575060005460ff16155b611ac05760405162461bcd60e51b815260040180806020018281038252602e81526020018061238e602e913960400191505060405180910390fd5b600054610100900460ff16158015611aeb576000805460ff1961ff0019909116610100171660011790555b611af3611f81565b611afb612021565b8015611693576000805461ff001916905550565b611b1883612108565b611b2182612108565b611b2a81612108565b606d80546001600160a01b0385166001600160a01b0319909116811790915560408051918252517f143219c9e69b09e07e095fcc889b43d8f46ca892bba65f08dc3a0050869a56789181900360200190a1606e80546001600160a01b0384166001600160a01b0319909116811790915560408051918252517f82966d27eea39b038ee0fa30cd16532bb24f6e65d31cb58fb227aa5766cdcc7f9181900360200190a1606f80546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f3ca631ffcd2a9b5d9ae18543fc82f58eb4ca33af9e6ab01b7a8e95331e6ed9859181900360200190a1604080518082018252601a81527955534420666f722046696c65636f696e20436f6d6d756e69747960301b602091820152815180830190925260018252603160f81b9101527fc0412597c9d60cbc3de18204991e00bf2f567b025e527ce64b3713f7afab420760688190557fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66069819055611cb6611cee565b606755611ce47f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8383611cf2565b6066555050505050565b4690565b6000838383611cff611cee565b3060405160200180868152602001858152602001848152602001838152602001826001600160a01b03168152602001955050505050506040516020818303038152906040528051906020012090509392505050565b600082820183811015611dae576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60006fa2a8918ca85bafe22016d0b997e4df60600160ff1b03821115611e0c5760405162461bcd60e51b81526004018080602001828103825260228152602001806123496022913960400191505060405180910390fd5b8360ff16601b1480611e2157508360ff16601c145b611e5c5760405162461bcd60e51b81526004018080602001828103825260228152602001806123bc6022913960400191505060405180910390fd5b600060018686868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611eb8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611f1b576040805162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b604482015290519081900360640190fd5b95945050505050565b600082821115611f7b576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600054610100900460ff1680611f9a5750611f9a611a4d565b80611fa8575060005460ff16155b611fe35760405162461bcd60e51b815260040180806020018281038252602e81526020018061238e602e913960400191505060405180910390fd5b600054610100900460ff16158015611afb576000805460ff1961ff0019909116610100171660011790558015611693576000805461ff001916905550565b600054610100900460ff168061203a575061203a611a4d565b80612048575060005460ff16155b6120835760405162461bcd60e51b815260040180806020018281038252602e81526020018061238e602e913960400191505060405180910390fd5b600054610100900460ff161580156120ae576000805460ff1961ff0019909116610100171660011790555b60006120b86118af565b603380546001600160a01b0319166001600160a01b03831690811790915560405191925090600090600080516020612479833981519152908290a3508015611693576000805461ff001916905550565b6001600160a01b038116611693576040805162461bcd60e51b815260206004820152601e60248201527f4163636f756e742063616e6e6f74206265207a65726f20616464726573730000604482015290519081900360640190fdfe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737344656274546f6b656e3a2043616c6c6572206973206e65697468657220426f72726f7765724f7065726174696f6e73206e6f722054726f76654d616e61676572206e6f722053746162696c697479506f6f6c44656274546f6b656e3a2043616e6e6f74207472616e7366657220746f6b656e73206469726563746c7920746f207468652053746162696c697479506f6f6c2c2054726f76654d616e61676572206f7220426f72726f7765724f707344656274546f6b656e3a2043616c6c6572206973206e6f7420426f72726f7765724f7065726174696f6e7345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636544656274546f6b656e3a2043616e6e6f74207472616e7366657220746f6b656e73206469726563746c7920746f20746865204465627420746f6b656e20636f6e7472616374206f7220746865207a65726f206164647265737345434453413a20696e76616c6964207369676e6174757265202773272076616c7565454950333030393a20617574686f72697a6174696f6e20616c72656164792075736564496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a656445434453413a20696e76616c6964207369676e6174757265202776272076616c7565454950333030393a2063616c6c6572206d7573742062652074686520726563697069656e74454950333030393a20617574686f72697a6174696f6e206e6f74207965742076616c696444656274546f6b656e3a2043616c6c6572206973206e6f74207468652053746162696c697479506f6f6c45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63658be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737344656274546f6b656e3a2043616c6c6572206973206e6569746865722054726f76654d616e61676572206e6f722053746162696c697479506f6f6ca264697066735822122065bd2f2a56838ef44de8c5f62a8b5292200e3fbe837db27f4cc903b66b02e39564736f6c63430007060033496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564","name":"DebtToken","is_blueprint":false,"license_type":"none","is_fully_verified":false,"is_verified_via_eth_bytecode_db":false,"language":"solidity","evm_version":"default","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authorizer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"AuthorizationCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authorizer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"AuthorizationUsed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newBorrowerOperationsAddress","type":"address"}],"name":"BorrowerOperationsAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newStabilityPoolAddress","type":"address"}],"name":"StabilityPoolAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_troveManagerAddress","type":"address"}],"name":"TroveManagerAddressChanged","type":"event"},{"inputs":[],"name":"CANCEL_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RECEIVE_WITH_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSFER_WITH_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_authorizer","type":"address"},{"internalType":"bytes32","name":"_nonce","type":"bytes32"}],"name":"authorizationState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrowerOperationsAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_authorizer","type":"address"},{"internalType":"bytes32","name":"_nonce","type":"bytes32"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"cancelAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"domainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_troveManagerAddress","type":"address"},{"internalType":"address","name":"_stabilityPoolAddress","type":"address"},{"internalType":"address","name":"_borrowerOperationsAddress","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"permitTypeHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_validAfter","type":"uint256"},{"internalType":"uint256","name":"_validBefore","type":"uint256"},{"internalType":"bytes32","name":"_nonce","type":"bytes32"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"receiveWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_poolAddress","type":"address"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"returnFromPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"address","name":"_poolAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sendToPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stabilityPoolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_validAfter","type":"uint256"},{"internalType":"uint256","name":"_validBefore","type":"uint256"},{"internalType":"bytes32","name":"_nonce","type":"bytes32"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"transferWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"troveManagerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}],"is_changed_bytecode":true,"is_partially_verified":true,"verified_twin_filecoin_robust_address":null,"constructor_args":null}