{"sources":{"FiatTokenV2_1.sol":{"content":"// File: @openzeppelin/contracts/math/SafeMath.sol\r\n\r\n// SPDX-License-Identifier: MIT\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\r\n * checks.\r\n *\r\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\r\n * in bugs, because programmers usually assume that an overflow raises an\r\n * error, which is the standard behavior in high level programming languages.\r\n * `SafeMath` restores this intuition by reverting the transaction when an\r\n * operation overflows.\r\n *\r\n * Using this library instead of the unchecked operations eliminates an entire\r\n * class of bugs, so it's recommended to use it always.\r\n */\r\nlibrary SafeMath {\r\n    /**\r\n     * @dev Returns the addition of two unsigned integers, reverting on\r\n     * overflow.\r\n     *\r\n     * Counterpart to Solidity's `+` operator.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - Addition cannot overflow.\r\n     */\r\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        uint256 c = a + b;\r\n        require(c >= a, \"SafeMath: addition overflow\");\r\n\r\n        return c;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the subtraction of two unsigned integers, reverting on\r\n     * overflow (when the result is negative).\r\n     *\r\n     * Counterpart to Solidity's `-` operator.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - Subtraction cannot overflow.\r\n     */\r\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        return sub(a, b, \"SafeMath: subtraction overflow\");\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\r\n     * overflow (when the result is negative).\r\n     *\r\n     * Counterpart to Solidity's `-` operator.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - Subtraction cannot overflow.\r\n     */\r\n    function sub(\r\n        uint256 a,\r\n        uint256 b,\r\n        string memory errorMessage\r\n    ) internal pure returns (uint256) {\r\n        require(b <= a, errorMessage);\r\n        uint256 c = a - b;\r\n\r\n        return c;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the multiplication of two unsigned integers, reverting on\r\n     * overflow.\r\n     *\r\n     * Counterpart to Solidity's `*` operator.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - Multiplication cannot overflow.\r\n     */\r\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\r\n        // benefit is lost if 'b' is also tested.\r\n        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\r\n        if (a == 0) {\r\n            return 0;\r\n        }\r\n\r\n        uint256 c = a * b;\r\n        require(c / a == b, \"SafeMath: multiplication overflow\");\r\n\r\n        return c;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the integer division of two unsigned integers. Reverts on\r\n     * division by zero. The result is rounded towards zero.\r\n     *\r\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\r\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\r\n     * uses an invalid opcode to revert (consuming all remaining gas).\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - The divisor cannot be zero.\r\n     */\r\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        return div(a, b, \"SafeMath: division by zero\");\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\r\n     * division by zero. The result is rounded towards zero.\r\n     *\r\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\r\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\r\n     * uses an invalid opcode to revert (consuming all remaining gas).\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - The divisor cannot be zero.\r\n     */\r\n    function div(\r\n        uint256 a,\r\n        uint256 b,\r\n        string memory errorMessage\r\n    ) internal pure returns (uint256) {\r\n        require(b > 0, errorMessage);\r\n        uint256 c = a / b;\r\n        // assert(a == b * c + a % b); // There is no case in which this doesn't hold\r\n\r\n        return c;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\r\n     * Reverts when dividing by zero.\r\n     *\r\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\r\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\r\n     * invalid opcode to revert (consuming all remaining gas).\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - The divisor cannot be zero.\r\n     */\r\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        return mod(a, b, \"SafeMath: modulo by zero\");\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\r\n     * Reverts with custom message when dividing by zero.\r\n     *\r\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\r\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\r\n     * invalid opcode to revert (consuming all remaining gas).\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - The divisor cannot be zero.\r\n     */\r\n    function mod(\r\n        uint256 a,\r\n        uint256 b,\r\n        string memory errorMessage\r\n    ) internal pure returns (uint256) {\r\n        require(b != 0, errorMessage);\r\n        return a % b;\r\n    }\r\n}\r\n\r\n// File: @openzeppelin/contracts/token/ERC20/IERC20.sol\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @dev Interface of the ERC20 standard as defined in the EIP.\r\n */\r\ninterface IERC20 {\r\n    /**\r\n     * @dev Returns the amount of tokens in existence.\r\n     */\r\n    function totalSupply() external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Returns the amount of tokens owned by `account`.\r\n     */\r\n    function balanceOf(address account) external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function transfer(address recipient, uint256 amount)\r\n        external\r\n        returns (bool);\r\n\r\n    /**\r\n     * @dev Returns the remaining number of tokens that `spender` will be\r\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\r\n     * zero by default.\r\n     *\r\n     * This value changes when {approve} or {transferFrom} are called.\r\n     */\r\n    function allowance(address owner, address spender)\r\n        external\r\n        view\r\n        returns (uint256);\r\n\r\n    /**\r\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\r\n     * that someone may use both the old and the new allowance by unfortunate\r\n     * transaction ordering. One possible solution to mitigate this race\r\n     * condition is to first reduce the spender's allowance to 0 and set the\r\n     * desired value afterwards:\r\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\r\n     *\r\n     * Emits an {Approval} event.\r\n     */\r\n    function approve(address spender, uint256 amount) external returns (bool);\r\n\r\n    /**\r\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\r\n     * allowance mechanism. `amount` is then deducted from the caller's\r\n     * allowance.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function transferFrom(\r\n        address sender,\r\n        address recipient,\r\n        uint256 amount\r\n    ) external returns (bool);\r\n\r\n    /**\r\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\r\n     * another (`to`).\r\n     *\r\n     * Note that `value` may be zero.\r\n     */\r\n    event Transfer(address indexed from, address indexed to, uint256 value);\r\n\r\n    /**\r\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\r\n     * a call to {approve}. `value` is the new allowance.\r\n     */\r\n    event Approval(\r\n        address indexed owner,\r\n        address indexed spender,\r\n        uint256 value\r\n    );\r\n}\r\n\r\n// File: contracts/v1/AbstractFiatTokenV1.sol\r\n\r\n/**\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.6.12;\r\n\r\nabstract contract AbstractFiatTokenV1 is IERC20 {\r\n    function _approve(\r\n        address owner,\r\n        address spender,\r\n        uint256 value\r\n    ) internal virtual;\r\n\r\n    function _transfer(\r\n        address from,\r\n        address to,\r\n        uint256 value\r\n    ) internal virtual;\r\n}\r\n\r\n// File: contracts/v1/Ownable.sol\r\n\r\n/**\r\n * Copyright (c) 2018 zOS Global Limited.\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @notice The Ownable contract has an owner address, and provides basic\r\n * authorization control functions\r\n * @dev Forked from https://github.com/OpenZeppelin/openzeppelin-labs/blob/3887ab77b8adafba4a26ace002f3a684c1a3388b/upgradeability_ownership/contracts/ownership/Ownable.sol\r\n * Modifications:\r\n * 1. Consolidate OwnableStorage into this contract (7/13/18)\r\n * 2. Reformat, conform to Solidity 0.6 syntax, and add error messages (5/13/20)\r\n * 3. Make public functions external (5/27/20)\r\n */\r\ncontract Ownable {\r\n    // Owner of the contract\r\n    address private _owner;\r\n\r\n    /**\r\n     * @dev Event to show ownership has been transferred\r\n     * @param previousOwner representing the address of the previous owner\r\n     * @param newOwner representing the address of the new owner\r\n     */\r\n    event OwnershipTransferred(address previousOwner, address newOwner);\r\n\r\n    /**\r\n     * @dev The constructor sets the original owner of the contract to the sender account.\r\n     */\r\n    constructor() public {\r\n        setOwner(msg.sender);\r\n    }\r\n\r\n    /**\r\n     * @dev Tells the address of the owner\r\n     * @return the address of the owner\r\n     */\r\n    function owner() external view returns (address) {\r\n        return _owner;\r\n    }\r\n\r\n    /**\r\n     * @dev Sets a new owner address\r\n     */\r\n    function setOwner(address newOwner) internal {\r\n        _owner = newOwner;\r\n    }\r\n\r\n    /**\r\n     * @dev Throws if called by any account other than the owner.\r\n     */\r\n    modifier onlyOwner() {\r\n        require(msg.sender == _owner, \"Ownable: caller is not the owner\");\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Allows the current owner to transfer control of the contract to a newOwner.\r\n     * @param newOwner The address to transfer ownership to.\r\n     */\r\n    function transferOwnership(address newOwner) external onlyOwner {\r\n        require(\r\n            newOwner != address(0),\r\n            \"Ownable: new owner is the zero address\"\r\n        );\r\n        emit OwnershipTransferred(_owner, newOwner);\r\n        setOwner(newOwner);\r\n    }\r\n}\r\n\r\n// File: contracts/v1/Pausable.sol\r\n\r\n/**\r\n * Copyright (c) 2016 Smart Contract Solutions, Inc.\r\n * Copyright (c) 2018-2020 CENTRE SECZ0\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @notice Base contract which allows children to implement an emergency stop\r\n * mechanism\r\n * @dev Forked from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/feb665136c0dae9912e08397c1a21c4af3651ef3/contracts/lifecycle/Pausable.sol\r\n * Modifications:\r\n * 1. Added pauser role, switched pause/unpause to be onlyPauser (6/14/2018)\r\n * 2. Removed whenNotPause/whenPaused from pause/unpause (6/14/2018)\r\n * 3. Removed whenPaused (6/14/2018)\r\n * 4. Switches ownable library to use ZeppelinOS (7/12/18)\r\n * 5. Remove constructor (7/13/18)\r\n * 6. Reformat, conform to Solidity 0.6 syntax and add error messages (5/13/20)\r\n * 7. Make public functions external (5/27/20)\r\n */\r\ncontract Pausable is Ownable {\r\n    event Pause();\r\n    event Unpause();\r\n    event PauserChanged(address indexed newAddress);\r\n\r\n    address public pauser;\r\n    bool public paused = false;\r\n\r\n    /**\r\n     * @dev Modifier to make a function callable only when the contract is not paused.\r\n     */\r\n    modifier whenNotPaused() {\r\n        require(!paused, \"Pausable: paused\");\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev throws if called by any account other than the pauser\r\n     */\r\n    modifier onlyPauser() {\r\n        require(msg.sender == pauser, \"Pausable: caller is not the pauser\");\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev called by the owner to pause, triggers stopped state\r\n     */\r\n    function pause() external onlyPauser {\r\n        paused = true;\r\n        emit Pause();\r\n    }\r\n\r\n    /**\r\n     * @dev called by the owner to unpause, returns to normal state\r\n     */\r\n    function unpause() external onlyPauser {\r\n        paused = false;\r\n        emit Unpause();\r\n    }\r\n\r\n    /**\r\n     * @dev update the pauser role\r\n     */\r\n    function updatePauser(address _newPauser) external onlyOwner {\r\n        require(\r\n            _newPauser != address(0),\r\n            \"Pausable: new pauser is the zero address\"\r\n        );\r\n        pauser = _newPauser;\r\n        emit PauserChanged(pauser);\r\n    }\r\n}\r\n\r\n// File: contracts/v1/Blacklistable.sol\r\n\r\n/**\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @title Blacklistable Token\r\n * @dev Allows accounts to be blacklisted by a \"blacklister\" role\r\n */\r\ncontract Blacklistable is Ownable {\r\n    address public blacklister;\r\n    mapping(address => bool) internal blacklisted;\r\n\r\n    event Blacklisted(address indexed _account);\r\n    event UnBlacklisted(address indexed _account);\r\n    event BlacklisterChanged(address indexed newBlacklister);\r\n\r\n    /**\r\n     * @dev Throws if called by any account other than the blacklister\r\n     */\r\n    modifier onlyBlacklister() {\r\n        require(\r\n            msg.sender == blacklister,\r\n            \"Blacklistable: caller is not the blacklister\"\r\n        );\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Throws if argument account is blacklisted\r\n     * @param _account The address to check\r\n     */\r\n    modifier notBlacklisted(address _account) {\r\n        require(\r\n            !blacklisted[_account],\r\n            \"Blacklistable: account is blacklisted\"\r\n        );\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Checks if account is blacklisted\r\n     * @param _account The address to check\r\n     */\r\n    function isBlacklisted(address _account) external view returns (bool) {\r\n        return blacklisted[_account];\r\n    }\r\n\r\n    /**\r\n     * @dev Adds account to blacklist\r\n     * @param _account The address to blacklist\r\n     */\r\n    function blacklist(address _account) external onlyBlacklister {\r\n        blacklisted[_account] = true;\r\n        emit Blacklisted(_account);\r\n    }\r\n\r\n    /**\r\n     * @dev Removes account from blacklist\r\n     * @param _account The address to remove from the blacklist\r\n     */\r\n    function unBlacklist(address _account) external onlyBlacklister {\r\n        blacklisted[_account] = false;\r\n        emit UnBlacklisted(_account);\r\n    }\r\n\r\n    function updateBlacklister(address _newBlacklister) external onlyOwner {\r\n        require(\r\n            _newBlacklister != address(0),\r\n            \"Blacklistable: new blacklister is the zero address\"\r\n        );\r\n        blacklister = _newBlacklister;\r\n        emit BlacklisterChanged(blacklister);\r\n    }\r\n}\r\n\r\n// File: contracts/v1/FiatTokenV1.sol\r\n\r\n/**\r\n *\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @title FiatToken\r\n * @dev ERC20 Token backed by fiat reserves\r\n */\r\ncontract FiatTokenV1 is AbstractFiatTokenV1, Ownable, Pausable, Blacklistable {\r\n    using SafeMath for uint256;\r\n\r\n    string public name;\r\n    string public symbol;\r\n    uint8 public decimals;\r\n    string public currency;\r\n    address public masterMinter;\r\n    bool internal initialized;\r\n\r\n    mapping(address => uint256) internal balances;\r\n    mapping(address => mapping(address => uint256)) internal allowed;\r\n    uint256 internal totalSupply_ = 0;\r\n    mapping(address => bool) internal minters;\r\n    mapping(address => uint256) internal minterAllowed;\r\n\r\n    event Mint(address indexed minter, address indexed to, uint256 amount);\r\n    event Burn(address indexed burner, uint256 amount);\r\n    event MinterConfigured(address indexed minter, uint256 minterAllowedAmount);\r\n    event MinterRemoved(address indexed oldMinter);\r\n    event MasterMinterChanged(address indexed newMasterMinter);\r\n\r\n    function initialize(\r\n        string memory tokenName,\r\n        string memory tokenSymbol,\r\n        string memory tokenCurrency,\r\n        uint8 tokenDecimals,\r\n        address newMasterMinter,\r\n        address newPauser,\r\n        address newBlacklister,\r\n        address newOwner\r\n    ) public {\r\n        require(!initialized, \"FiatToken: contract is already initialized\");\r\n        require(\r\n            newMasterMinter != address(0),\r\n            \"FiatToken: new masterMinter is the zero address\"\r\n        );\r\n        require(\r\n            newPauser != address(0),\r\n            \"FiatToken: new pauser is the zero address\"\r\n        );\r\n        require(\r\n            newBlacklister != address(0),\r\n            \"FiatToken: new blacklister is the zero address\"\r\n        );\r\n        require(\r\n            newOwner != address(0),\r\n            \"FiatToken: new owner is the zero address\"\r\n        );\r\n\r\n        name = tokenName;\r\n        symbol = tokenSymbol;\r\n        currency = tokenCurrency;\r\n        decimals = tokenDecimals;\r\n        masterMinter = newMasterMinter;\r\n        pauser = newPauser;\r\n        blacklister = newBlacklister;\r\n        setOwner(newOwner);\r\n        initialized = true;\r\n    }\r\n\r\n    /**\r\n     * @dev Throws if called by any account other than a minter\r\n     */\r\n    modifier onlyMinters() {\r\n        require(minters[msg.sender], \"FiatToken: caller is not a minter\");\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Function to mint tokens\r\n     * @param _to The address that will receive the minted tokens.\r\n     * @param _amount The amount of tokens to mint. Must be less than or equal\r\n     * to the minterAllowance of the caller.\r\n     * @return A boolean that indicates if the operation was successful.\r\n     */\r\n    function mint(address _to, uint256 _amount)\r\n        external\r\n        whenNotPaused\r\n        onlyMinters\r\n        notBlacklisted(msg.sender)\r\n        notBlacklisted(_to)\r\n        returns (bool)\r\n    {\r\n        require(_to != address(0), \"FiatToken: mint to the zero address\");\r\n        require(_amount > 0, \"FiatToken: mint amount not greater than 0\");\r\n\r\n        uint256 mintingAllowedAmount = minterAllowed[msg.sender];\r\n        require(\r\n            _amount <= mintingAllowedAmount,\r\n            \"FiatToken: mint amount exceeds minterAllowance\"\r\n        );\r\n\r\n        totalSupply_ = totalSupply_.add(_amount);\r\n        balances[_to] = balances[_to].add(_amount);\r\n        minterAllowed[msg.sender] = mintingAllowedAmount.sub(_amount);\r\n        emit Mint(msg.sender, _to, _amount);\r\n        emit Transfer(address(0), _to, _amount);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @dev Throws if called by any account other than the masterMinter\r\n     */\r\n    modifier onlyMasterMinter() {\r\n        require(\r\n            msg.sender == masterMinter,\r\n            \"FiatToken: caller is not the masterMinter\"\r\n        );\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Get minter allowance for an account\r\n     * @param minter The address of the minter\r\n     */\r\n    function minterAllowance(address minter) external view returns (uint256) {\r\n        return minterAllowed[minter];\r\n    }\r\n\r\n    /**\r\n     * @dev Checks if account is a minter\r\n     * @param account The address to check\r\n     */\r\n    function isMinter(address account) external view returns (bool) {\r\n        return minters[account];\r\n    }\r\n\r\n    /**\r\n     * @notice Amount of remaining tokens spender is allowed to transfer on\r\n     * behalf of the token owner\r\n     * @param owner     Token owner's address\r\n     * @param spender   Spender's address\r\n     * @return Allowance amount\r\n     */\r\n    function allowance(address owner, address spender)\r\n        external\r\n        override\r\n        view\r\n        returns (uint256)\r\n    {\r\n        return allowed[owner][spender];\r\n    }\r\n\r\n    /**\r\n     * @dev Get totalSupply of token\r\n     */\r\n    function totalSupply() external override view returns (uint256) {\r\n        return totalSupply_;\r\n    }\r\n\r\n    /**\r\n     * @dev Get token balance of an account\r\n     * @param account address The account\r\n     */\r\n    function balanceOf(address account)\r\n        external\r\n        override\r\n        view\r\n        returns (uint256)\r\n    {\r\n        return balances[account];\r\n    }\r\n\r\n    /**\r\n     * @notice Set spender's allowance over the caller's tokens to be a given\r\n     * value.\r\n     * @param spender   Spender's address\r\n     * @param value     Allowance amount\r\n     * @return True if successful\r\n     */\r\n    function approve(address spender, uint256 value)\r\n        external\r\n        override\r\n        whenNotPaused\r\n        notBlacklisted(msg.sender)\r\n        notBlacklisted(spender)\r\n        returns (bool)\r\n    {\r\n        _approve(msg.sender, spender, value);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @dev Internal function to set allowance\r\n     * @param owner     Token owner's address\r\n     * @param spender   Spender's address\r\n     * @param value     Allowance amount\r\n     */\r\n    function _approve(\r\n        address owner,\r\n        address spender,\r\n        uint256 value\r\n    ) internal override {\r\n        require(owner != address(0), \"ERC20: approve from the zero address\");\r\n        require(spender != address(0), \"ERC20: approve to the zero address\");\r\n        allowed[owner][spender] = value;\r\n        emit Approval(owner, spender, value);\r\n    }\r\n\r\n    /**\r\n     * @notice Transfer tokens by spending allowance\r\n     * @param from  Payer's address\r\n     * @param to    Payee's address\r\n     * @param value Transfer amount\r\n     * @return True if successful\r\n     */\r\n    function transferFrom(\r\n        address from,\r\n        address to,\r\n        uint256 value\r\n    )\r\n        external\r\n        override\r\n        whenNotPaused\r\n        notBlacklisted(msg.sender)\r\n        notBlacklisted(from)\r\n        notBlacklisted(to)\r\n        returns (bool)\r\n    {\r\n        require(\r\n            value <= allowed[from][msg.sender],\r\n            \"ERC20: transfer amount exceeds allowance\"\r\n        );\r\n        _transfer(from, to, value);\r\n        allowed[from][msg.sender] = allowed[from][msg.sender].sub(value);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @notice Transfer tokens from the caller\r\n     * @param to    Payee's address\r\n     * @param value Transfer amount\r\n     * @return True if successful\r\n     */\r\n    function transfer(address to, uint256 value)\r\n        external\r\n        override\r\n        whenNotPaused\r\n        notBlacklisted(msg.sender)\r\n        notBlacklisted(to)\r\n        returns (bool)\r\n    {\r\n        _transfer(msg.sender, to, value);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @notice Internal function to process transfers\r\n     * @param from  Payer's address\r\n     * @param to    Payee's address\r\n     * @param value Transfer amount\r\n     */\r\n    function _transfer(\r\n        address from,\r\n        address to,\r\n        uint256 value\r\n    ) internal override {\r\n        require(from != address(0), \"ERC20: transfer from the zero address\");\r\n        require(to != address(0), \"ERC20: transfer to the zero address\");\r\n        require(\r\n            value <= balances[from],\r\n            \"ERC20: transfer amount exceeds balance\"\r\n        );\r\n\r\n        balances[from] = balances[from].sub(value);\r\n        balances[to] = balances[to].add(value);\r\n        emit Transfer(from, to, value);\r\n    }\r\n\r\n    /**\r\n     * @dev Function to add/update a new minter\r\n     * @param minter The address of the minter\r\n     * @param minterAllowedAmount The minting amount allowed for the minter\r\n     * @return True if the operation was successful.\r\n     */\r\n    function configureMinter(address minter, uint256 minterAllowedAmount)\r\n        external\r\n        whenNotPaused\r\n        onlyMasterMinter\r\n        returns (bool)\r\n    {\r\n        minters[minter] = true;\r\n        minterAllowed[minter] = minterAllowedAmount;\r\n        emit MinterConfigured(minter, minterAllowedAmount);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @dev Function to remove a minter\r\n     * @param minter The address of the minter to remove\r\n     * @return True if the operation was successful.\r\n     */\r\n    function removeMinter(address minter)\r\n        external\r\n        onlyMasterMinter\r\n        returns (bool)\r\n    {\r\n        minters[minter] = false;\r\n        minterAllowed[minter] = 0;\r\n        emit MinterRemoved(minter);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @dev allows a minter to burn some of its own tokens\r\n     * Validates that caller is a minter and that sender is not blacklisted\r\n     * amount is less than or equal to the minter's account balance\r\n     * @param _amount uint256 the amount of tokens to be burned\r\n     */\r\n    function burn(uint256 _amount)\r\n        external\r\n        whenNotPaused\r\n        onlyMinters\r\n        notBlacklisted(msg.sender)\r\n    {\r\n        uint256 balance = balances[msg.sender];\r\n        require(_amount > 0, \"FiatToken: burn amount not greater than 0\");\r\n        require(balance >= _amount, \"FiatToken: burn amount exceeds balance\");\r\n\r\n        totalSupply_ = totalSupply_.sub(_amount);\r\n        balances[msg.sender] = balance.sub(_amount);\r\n        emit Burn(msg.sender, _amount);\r\n        emit Transfer(msg.sender, address(0), _amount);\r\n    }\r\n\r\n    function updateMasterMinter(address _newMasterMinter) external onlyOwner {\r\n        require(\r\n            _newMasterMinter != address(0),\r\n            \"FiatToken: new masterMinter is the zero address\"\r\n        );\r\n        masterMinter = _newMasterMinter;\r\n        emit MasterMinterChanged(masterMinter);\r\n    }\r\n}\r\n\r\n// File: @openzeppelin/contracts/utils/Address.sol\r\n\r\npragma solidity ^0.6.2;\r\n\r\n/**\r\n * @dev Collection of functions related to the address type\r\n */\r\nlibrary Address {\r\n    /**\r\n     * @dev Returns true if `account` is a contract.\r\n     *\r\n     * [IMPORTANT]\r\n     * ====\r\n     * It is unsafe to assume that an address for which this function returns\r\n     * false is an externally-owned account (EOA) and not a contract.\r\n     *\r\n     * Among others, `isContract` will return false for the following\r\n     * types of addresses:\r\n     *\r\n     *  - an externally-owned account\r\n     *  - a contract in construction\r\n     *  - an address where a contract will be created\r\n     *  - an address where a contract lived, but was destroyed\r\n     * ====\r\n     */\r\n    function isContract(address account) internal view returns (bool) {\r\n        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\r\n        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\r\n        // for accounts without code, i.e. `keccak256('')`\r\n        bytes32 codehash;\r\n\r\n            bytes32 accountHash\r\n         = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\r\n        // solhint-disable-next-line no-inline-assembly\r\n        assembly {\r\n            codehash := extcodehash(account)\r\n        }\r\n        return (codehash != accountHash && codehash != 0x0);\r\n    }\r\n\r\n    /**\r\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\r\n     * `recipient`, forwarding all available gas and reverting on errors.\r\n     *\r\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\r\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\r\n     * imposed by `transfer`, making them unable to receive funds via\r\n     * `transfer`. {sendValue} removes this limitation.\r\n     *\r\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\r\n     *\r\n     * IMPORTANT: because control is transferred to `recipient`, care must be\r\n     * taken to not create reentrancy vulnerabilities. Consider using\r\n     * {ReentrancyGuard} or the\r\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\r\n     */\r\n    function sendValue(address payable recipient, uint256 amount) internal {\r\n        require(\r\n            address(this).balance >= amount,\r\n            \"Address: insufficient balance\"\r\n        );\r\n\r\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\r\n        (bool success, ) = recipient.call{ value: amount }(\"\");\r\n        require(\r\n            success,\r\n            \"Address: unable to send value, recipient may have reverted\"\r\n        );\r\n    }\r\n\r\n    /**\r\n     * @dev Performs a Solidity function call using a low level `call`. A\r\n     * plain`call` is an unsafe replacement for a function call: use this\r\n     * function instead.\r\n     *\r\n     * If `target` reverts with a revert reason, it is bubbled up by this\r\n     * function (like regular Solidity function calls).\r\n     *\r\n     * Returns the raw returned data. To convert to the expected return value,\r\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `target` must be a contract.\r\n     * - calling `target` with `data` must not revert.\r\n     *\r\n     * _Available since v3.1._\r\n     */\r\n    function functionCall(address target, bytes memory data)\r\n        internal\r\n        returns (bytes memory)\r\n    {\r\n        return functionCall(target, data, \"Address: low-level call failed\");\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\r\n     * `errorMessage` as a fallback revert reason when `target` reverts.\r\n     *\r\n     * _Available since v3.1._\r\n     */\r\n    function functionCall(\r\n        address target,\r\n        bytes memory data,\r\n        string memory errorMessage\r\n    ) internal returns (bytes memory) {\r\n        return _functionCallWithValue(target, data, 0, errorMessage);\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\r\n     * but also transferring `value` wei to `target`.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the calling contract must have an ETH balance of at least `value`.\r\n     * - the called Solidity function must be `payable`.\r\n     *\r\n     * _Available since v3.1._\r\n     */\r\n    function functionCallWithValue(\r\n        address target,\r\n        bytes memory data,\r\n        uint256 value\r\n    ) internal returns (bytes memory) {\r\n        return\r\n            functionCallWithValue(\r\n                target,\r\n                data,\r\n                value,\r\n                \"Address: low-level call with value failed\"\r\n            );\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\r\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\r\n     *\r\n     * _Available since v3.1._\r\n     */\r\n    function functionCallWithValue(\r\n        address target,\r\n        bytes memory data,\r\n        uint256 value,\r\n        string memory errorMessage\r\n    ) internal returns (bytes memory) {\r\n        require(\r\n            address(this).balance >= value,\r\n            \"Address: insufficient balance for call\"\r\n        );\r\n        return _functionCallWithValue(target, data, value, errorMessage);\r\n    }\r\n\r\n    function _functionCallWithValue(\r\n        address target,\r\n        bytes memory data,\r\n        uint256 weiValue,\r\n        string memory errorMessage\r\n    ) private returns (bytes memory) {\r\n        require(isContract(target), \"Address: call to non-contract\");\r\n\r\n        // solhint-disable-next-line avoid-low-level-calls\r\n        (bool success, bytes memory returndata) = target.call{\r\n            value: weiValue\r\n        }(data);\r\n        if (success) {\r\n            return returndata;\r\n        } else {\r\n            // Look for revert reason and bubble it up if present\r\n            if (returndata.length > 0) {\r\n                // The easiest way to bubble the revert reason is using memory via assembly\r\n\r\n                // solhint-disable-next-line no-inline-assembly\r\n                assembly {\r\n                    let returndata_size := mload(returndata)\r\n                    revert(add(32, returndata), returndata_size)\r\n                }\r\n            } else {\r\n                revert(errorMessage);\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\n// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol\r\n\r\npragma solidity ^0.6.0;\r\n\r\n/**\r\n * @title SafeERC20\r\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\r\n * contract returns false). Tokens that return no value (and instead revert or\r\n * throw on failure) are also supported, non-reverting calls are assumed to be\r\n * successful.\r\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\r\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\r\n */\r\nlibrary SafeERC20 {\r\n    using SafeMath for uint256;\r\n    using Address for address;\r\n\r\n    function safeTransfer(\r\n        IERC20 token,\r\n        address to,\r\n        uint256 value\r\n    ) internal {\r\n        _callOptionalReturn(\r\n            token,\r\n            abi.encodeWithSelector(token.transfer.selector, to, value)\r\n        );\r\n    }\r\n\r\n    function safeTransferFrom(\r\n        IERC20 token,\r\n        address from,\r\n        address to,\r\n        uint256 value\r\n    ) internal {\r\n        _callOptionalReturn(\r\n            token,\r\n            abi.encodeWithSelector(token.transferFrom.selector, from, to, value)\r\n        );\r\n    }\r\n\r\n    /**\r\n     * @dev Deprecated. This function has issues similar to the ones found in\r\n     * {IERC20-approve}, and its usage is discouraged.\r\n     *\r\n     * Whenever possible, use {safeIncreaseAllowance} and\r\n     * {safeDecreaseAllowance} instead.\r\n     */\r\n    function safeApprove(\r\n        IERC20 token,\r\n        address spender,\r\n        uint256 value\r\n    ) internal {\r\n        // safeApprove should only be called when setting an initial allowance,\r\n        // or when resetting it to zero. To increase and decrease it, use\r\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\r\n        // solhint-disable-next-line max-line-length\r\n        require(\r\n            (value == 0) || (token.allowance(address(this), spender) == 0),\r\n            \"SafeERC20: approve from non-zero to non-zero allowance\"\r\n        );\r\n        _callOptionalReturn(\r\n            token,\r\n            abi.encodeWithSelector(token.approve.selector, spender, value)\r\n        );\r\n    }\r\n\r\n    function safeIncreaseAllowance(\r\n        IERC20 token,\r\n        address spender,\r\n        uint256 value\r\n    ) internal {\r\n        uint256 newAllowance = token.allowance(address(this), spender).add(\r\n            value\r\n        );\r\n        _callOptionalReturn(\r\n            token,\r\n            abi.encodeWithSelector(\r\n                token.approve.selector,\r\n                spender,\r\n                newAllowance\r\n            )\r\n        );\r\n    }\r\n\r\n    function safeDecreaseAllowance(\r\n        IERC20 token,\r\n        address spender,\r\n        uint256 value\r\n    ) internal {\r\n        uint256 newAllowance = token.allowance(address(this), spender).sub(\r\n            value,\r\n            \"SafeERC20: decreased allowance below zero\"\r\n        );\r\n        _callOptionalReturn(\r\n            token,\r\n            abi.encodeWithSelector(\r\n                token.approve.selector,\r\n                spender,\r\n                newAllowance\r\n            )\r\n        );\r\n    }\r\n\r\n    /**\r\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\r\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\r\n     * @param token The token targeted by the call.\r\n     * @param data The call data (encoded using abi.encode or one of its variants).\r\n     */\r\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\r\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\r\n        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\r\n        // the target address contains contract code and also asserts for success in the low-level call.\r\n\r\n        bytes memory returndata = address(token).functionCall(\r\n            data,\r\n            \"SafeERC20: low-level call failed\"\r\n        );\r\n        if (returndata.length > 0) {\r\n            // Return data is optional\r\n            // solhint-disable-next-line max-line-length\r\n            require(\r\n                abi.decode(returndata, (bool)),\r\n                \"SafeERC20: ERC20 operation did not succeed\"\r\n            );\r\n        }\r\n    }\r\n}\r\n\r\n// File: contracts/v1.1/Rescuable.sol\r\n\r\n/**\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.6.12;\r\n\r\ncontract Rescuable is Ownable {\r\n    using SafeERC20 for IERC20;\r\n\r\n    address private _rescuer;\r\n\r\n    event RescuerChanged(address indexed newRescuer);\r\n\r\n    /**\r\n     * @notice Returns current rescuer\r\n     * @return Rescuer's address\r\n     */\r\n    function rescuer() external view returns (address) {\r\n        return _rescuer;\r\n    }\r\n\r\n    /**\r\n     * @notice Revert if called by any account other than the rescuer.\r\n     */\r\n    modifier onlyRescuer() {\r\n        require(msg.sender == _rescuer, \"Rescuable: caller is not the rescuer\");\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @notice Rescue ERC20 tokens locked up in this contract.\r\n     * @param tokenContract ERC20 token contract address\r\n     * @param to        Recipient address\r\n     * @param amount    Amount to withdraw\r\n     */\r\n    function rescueERC20(\r\n        IERC20 tokenContract,\r\n        address to,\r\n        uint256 amount\r\n    ) external onlyRescuer {\r\n        tokenContract.safeTransfer(to, amount);\r\n    }\r\n\r\n    /**\r\n     * @notice Assign the rescuer role to a given address.\r\n     * @param newRescuer New rescuer's address\r\n     */\r\n    function updateRescuer(address newRescuer) external onlyOwner {\r\n        require(\r\n            newRescuer != address(0),\r\n            \"Rescuable: new rescuer is the zero address\"\r\n        );\r\n        _rescuer = newRescuer;\r\n        emit RescuerChanged(newRescuer);\r\n    }\r\n}\r\n\r\n// File: contracts/v1.1/FiatTokenV1_1.sol\r\n\r\n/**\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @title FiatTokenV1_1\r\n * @dev ERC20 Token backed by fiat reserves\r\n */\r\ncontract FiatTokenV1_1 is FiatTokenV1, Rescuable {\r\n\r\n}\r\n\r\n// File: contracts/v2/AbstractFiatTokenV2.sol\r\n\r\n/**\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.6.12;\r\n\r\nabstract contract AbstractFiatTokenV2 is AbstractFiatTokenV1 {\r\n    function _increaseAllowance(\r\n        address owner,\r\n        address spender,\r\n        uint256 increment\r\n    ) internal virtual;\r\n\r\n    function _decreaseAllowance(\r\n        address owner,\r\n        address spender,\r\n        uint256 decrement\r\n    ) internal virtual;\r\n}\r\n\r\n// File: contracts/util/ECRecover.sol\r\n\r\n/**\r\n * Copyright (c) 2016-2019 zOS Global Limited\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @title ECRecover\r\n * @notice A library that provides a safe ECDSA recovery function\r\n */\r\nlibrary ECRecover {\r\n    /**\r\n     * @notice Recover signer's address from a signed message\r\n     * @dev Adapted from: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/65e4ffde586ec89af3b7e9140bdc9235d1254853/contracts/cryptography/ECDSA.sol\r\n     * Modifications: Accept v, r, and s as separate arguments\r\n     * @param digest    Keccak-256 hash digest of the signed message\r\n     * @param v         v of the signature\r\n     * @param r         r of the signature\r\n     * @param s         s of the signature\r\n     * @return Signer address\r\n     */\r\n    function recover(\r\n        bytes32 digest,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) internal pure returns (address) {\r\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\r\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\r\n        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most\r\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\r\n        //\r\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\r\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\r\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\r\n        // these malleable signatures as well.\r\n        if (\r\n            uint256(s) >\r\n            0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0\r\n        ) {\r\n            revert(\"ECRecover: invalid signature 's' value\");\r\n        }\r\n\r\n        if (v != 27 && v != 28) {\r\n            revert(\"ECRecover: invalid signature 'v' value\");\r\n        }\r\n\r\n        // If the signature is valid (and not malleable), return the signer address\r\n        address signer = ecrecover(digest, v, r, s);\r\n        require(signer != address(0), \"ECRecover: invalid signature\");\r\n\r\n        return signer;\r\n    }\r\n}\r\n\r\n// File: contracts/util/EIP712.sol\r\n\r\n/**\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @title EIP712\r\n * @notice A library that provides EIP712 helper functions\r\n */\r\nlibrary EIP712 {\r\n    /**\r\n     * @notice Make EIP712 domain separator\r\n     * @param name      Contract name\r\n     * @param version   Contract version\r\n     * @return Domain separator\r\n     */\r\n    function makeDomainSeparator(string memory name, string memory version)\r\n        internal\r\n        view\r\n        returns (bytes32)\r\n    {\r\n        uint256 chainId;\r\n        assembly {\r\n            chainId := chainid()\r\n        }\r\n        return\r\n            keccak256(\r\n                abi.encode(\r\n                    // keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")\r\n                    0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f,\r\n                    keccak256(bytes(name)),\r\n                    keccak256(bytes(version)),\r\n                    chainId,\r\n                    address(this)\r\n                )\r\n            );\r\n    }\r\n\r\n    /**\r\n     * @notice Recover signer's address from a EIP712 signature\r\n     * @param domainSeparator   Domain separator\r\n     * @param v                 v of the signature\r\n     * @param r                 r of the signature\r\n     * @param s                 s of the signature\r\n     * @param typeHashAndData   Type hash concatenated with data\r\n     * @return Signer's address\r\n     */\r\n    function recover(\r\n        bytes32 domainSeparator,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s,\r\n        bytes memory typeHashAndData\r\n    ) internal pure returns (address) {\r\n        bytes32 digest = keccak256(\r\n            abi.encodePacked(\r\n                \"\\x19\\x01\",\r\n                domainSeparator,\r\n                keccak256(typeHashAndData)\r\n            )\r\n        );\r\n        return ECRecover.recover(digest, v, r, s);\r\n    }\r\n}\r\n\r\n// File: contracts/v2/EIP712Domain.sol\r\n\r\n/**\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @title EIP712 Domain\r\n */\r\ncontract EIP712Domain {\r\n    /**\r\n     * @dev EIP712 Domain Separator\r\n     */\r\n    bytes32 public DOMAIN_SEPARATOR;\r\n}\r\n\r\n// File: contracts/v2/EIP3009.sol\r\n\r\n/**\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @title EIP-3009\r\n * @notice Provide internal implementation for gas-abstracted transfers\r\n * @dev Contracts that inherit from this must wrap these with publicly\r\n * accessible functions, optionally adding modifiers where necessary\r\n */\r\nabstract contract EIP3009 is AbstractFiatTokenV2, EIP712Domain {\r\n    // keccak256(\"TransferWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)\")\r\n    bytes32\r\n        public constant TRANSFER_WITH_AUTHORIZATION_TYPEHASH = 0x7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267;\r\n\r\n    // keccak256(\"ReceiveWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)\")\r\n    bytes32\r\n        public constant RECEIVE_WITH_AUTHORIZATION_TYPEHASH = 0xd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de8;\r\n\r\n    // keccak256(\"CancelAuthorization(address authorizer,bytes32 nonce)\")\r\n    bytes32\r\n        public constant CANCEL_AUTHORIZATION_TYPEHASH = 0x158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a1597429;\r\n\r\n    /**\r\n     * @dev authorizer address => nonce => bool (true if nonce is used)\r\n     */\r\n    mapping(address => mapping(bytes32 => bool)) private _authorizationStates;\r\n\r\n    event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce);\r\n    event AuthorizationCanceled(\r\n        address indexed authorizer,\r\n        bytes32 indexed nonce\r\n    );\r\n\r\n    /**\r\n     * @notice Returns the state of an authorization\r\n     * @dev Nonces are randomly generated 32-byte data unique to the\r\n     * authorizer's address\r\n     * @param authorizer    Authorizer's address\r\n     * @param nonce         Nonce of the authorization\r\n     * @return True if the nonce is used\r\n     */\r\n    function authorizationState(address authorizer, bytes32 nonce)\r\n        external\r\n        view\r\n        returns (bool)\r\n    {\r\n        return _authorizationStates[authorizer][nonce];\r\n    }\r\n\r\n    /**\r\n     * @notice Execute a transfer with a signed authorization\r\n     * @param from          Payer's address (Authorizer)\r\n     * @param to            Payee's address\r\n     * @param value         Amount to be transferred\r\n     * @param validAfter    The time after which this is valid (unix time)\r\n     * @param validBefore   The time before which this is valid (unix time)\r\n     * @param nonce         Unique nonce\r\n     * @param v             v of the signature\r\n     * @param r             r of the signature\r\n     * @param s             s of the signature\r\n     */\r\n    function _transferWithAuthorization(\r\n        address from,\r\n        address to,\r\n        uint256 value,\r\n        uint256 validAfter,\r\n        uint256 validBefore,\r\n        bytes32 nonce,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) internal {\r\n        _requireValidAuthorization(from, nonce, validAfter, validBefore);\r\n\r\n        bytes memory data = abi.encode(\r\n            TRANSFER_WITH_AUTHORIZATION_TYPEHASH,\r\n            from,\r\n            to,\r\n            value,\r\n            validAfter,\r\n            validBefore,\r\n            nonce\r\n        );\r\n        require(\r\n            EIP712.recover(DOMAIN_SEPARATOR, v, r, s, data) == from,\r\n            \"FiatTokenV2: invalid signature\"\r\n        );\r\n\r\n        _markAuthorizationAsUsed(from, nonce);\r\n        _transfer(from, to, value);\r\n    }\r\n\r\n    /**\r\n     * @notice Receive a transfer with a signed authorization from the payer\r\n     * @dev This has an additional check to ensure that the payee's address\r\n     * matches the caller of this function to prevent front-running attacks.\r\n     * @param from          Payer's address (Authorizer)\r\n     * @param to            Payee's address\r\n     * @param value         Amount to be transferred\r\n     * @param validAfter    The time after which this is valid (unix time)\r\n     * @param validBefore   The time before which this is valid (unix time)\r\n     * @param nonce         Unique nonce\r\n     * @param v             v of the signature\r\n     * @param r             r of the signature\r\n     * @param s             s of the signature\r\n     */\r\n    function _receiveWithAuthorization(\r\n        address from,\r\n        address to,\r\n        uint256 value,\r\n        uint256 validAfter,\r\n        uint256 validBefore,\r\n        bytes32 nonce,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) internal {\r\n        require(to == msg.sender, \"FiatTokenV2: caller must be the payee\");\r\n        _requireValidAuthorization(from, nonce, validAfter, validBefore);\r\n\r\n        bytes memory data = abi.encode(\r\n            RECEIVE_WITH_AUTHORIZATION_TYPEHASH,\r\n            from,\r\n            to,\r\n            value,\r\n            validAfter,\r\n            validBefore,\r\n            nonce\r\n        );\r\n        require(\r\n            EIP712.recover(DOMAIN_SEPARATOR, v, r, s, data) == from,\r\n            \"FiatTokenV2: invalid signature\"\r\n        );\r\n\r\n        _markAuthorizationAsUsed(from, nonce);\r\n        _transfer(from, to, value);\r\n    }\r\n\r\n    /**\r\n     * @notice Attempt to cancel an authorization\r\n     * @param authorizer    Authorizer's address\r\n     * @param nonce         Nonce of the authorization\r\n     * @param v             v of the signature\r\n     * @param r             r of the signature\r\n     * @param s             s of the signature\r\n     */\r\n    function _cancelAuthorization(\r\n        address authorizer,\r\n        bytes32 nonce,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) internal {\r\n        _requireUnusedAuthorization(authorizer, nonce);\r\n\r\n        bytes memory data = abi.encode(\r\n            CANCEL_AUTHORIZATION_TYPEHASH,\r\n            authorizer,\r\n            nonce\r\n        );\r\n        require(\r\n            EIP712.recover(DOMAIN_SEPARATOR, v, r, s, data) == authorizer,\r\n            \"FiatTokenV2: invalid signature\"\r\n        );\r\n\r\n        _authorizationStates[authorizer][nonce] = true;\r\n        emit AuthorizationCanceled(authorizer, nonce);\r\n    }\r\n\r\n    /**\r\n     * @notice Check that an authorization is unused\r\n     * @param authorizer    Authorizer's address\r\n     * @param nonce         Nonce of the authorization\r\n     */\r\n    function _requireUnusedAuthorization(address authorizer, bytes32 nonce)\r\n        private\r\n        view\r\n    {\r\n        require(\r\n            !_authorizationStates[authorizer][nonce],\r\n            \"FiatTokenV2: authorization is used or canceled\"\r\n        );\r\n    }\r\n\r\n    /**\r\n     * @notice Check that authorization is valid\r\n     * @param authorizer    Authorizer's address\r\n     * @param nonce         Nonce of the authorization\r\n     * @param validAfter    The time after which this is valid (unix time)\r\n     * @param validBefore   The time before which this is valid (unix time)\r\n     */\r\n    function _requireValidAuthorization(\r\n        address authorizer,\r\n        bytes32 nonce,\r\n        uint256 validAfter,\r\n        uint256 validBefore\r\n    ) private view {\r\n        require(\r\n            now > validAfter,\r\n            \"FiatTokenV2: authorization is not yet valid\"\r\n        );\r\n        require(now < validBefore, \"FiatTokenV2: authorization is expired\");\r\n        _requireUnusedAuthorization(authorizer, nonce);\r\n    }\r\n\r\n    /**\r\n     * @notice Mark an authorization as used\r\n     * @param authorizer    Authorizer's address\r\n     * @param nonce         Nonce of the authorization\r\n     */\r\n    function _markAuthorizationAsUsed(address authorizer, bytes32 nonce)\r\n        private\r\n    {\r\n        _authorizationStates[authorizer][nonce] = true;\r\n        emit AuthorizationUsed(authorizer, nonce);\r\n    }\r\n}\r\n\r\n// File: contracts/v2/EIP2612.sol\r\n\r\n/**\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @title EIP-2612\r\n * @notice Provide internal implementation for gas-abstracted approvals\r\n */\r\nabstract contract EIP2612 is AbstractFiatTokenV2, EIP712Domain {\r\n    // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\")\r\n    bytes32\r\n        public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\r\n\r\n    mapping(address => uint256) private _permitNonces;\r\n\r\n    /**\r\n     * @notice Nonces for permit\r\n     * @param owner Token owner's address (Authorizer)\r\n     * @return Next nonce\r\n     */\r\n    function nonces(address owner) external view returns (uint256) {\r\n        return _permitNonces[owner];\r\n    }\r\n\r\n    /**\r\n     * @notice Verify a signed approval permit and execute if valid\r\n     * @param owner     Token owner's address (Authorizer)\r\n     * @param spender   Spender's address\r\n     * @param value     Amount of allowance\r\n     * @param deadline  The time at which this expires (unix time)\r\n     * @param v         v of the signature\r\n     * @param r         r of the signature\r\n     * @param s         s of the signature\r\n     */\r\n    function _permit(\r\n        address owner,\r\n        address spender,\r\n        uint256 value,\r\n        uint256 deadline,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) internal {\r\n        require(deadline >= now, \"FiatTokenV2: permit is expired\");\r\n\r\n        bytes memory data = abi.encode(\r\n            PERMIT_TYPEHASH,\r\n            owner,\r\n            spender,\r\n            value,\r\n            _permitNonces[owner]++,\r\n            deadline\r\n        );\r\n        require(\r\n            EIP712.recover(DOMAIN_SEPARATOR, v, r, s, data) == owner,\r\n            \"EIP2612: invalid signature\"\r\n        );\r\n\r\n        _approve(owner, spender, value);\r\n    }\r\n}\r\n\r\n// File: contracts/v2/FiatTokenV2.sol\r\n\r\n/**\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.6.12;\r\n\r\n/**\r\n * @title FiatToken V2\r\n * @notice ERC20 Token backed by fiat reserves, version 2\r\n */\r\ncontract FiatTokenV2 is FiatTokenV1_1, EIP3009, EIP2612 {\r\n    uint8 internal _initializedVersion;\r\n\r\n    /**\r\n     * @notice Initialize v2\r\n     * @param newName   New token name\r\n     */\r\n    function initializeV2(string calldata newName) external {\r\n        // solhint-disable-next-line reason-string\r\n        require(initialized && _initializedVersion == 0);\r\n        name = newName;\r\n        DOMAIN_SEPARATOR = EIP712.makeDomainSeparator(newName, \"2\");\r\n        _initializedVersion = 1;\r\n    }\r\n\r\n    /**\r\n     * @notice Increase the allowance by a given increment\r\n     * @param spender   Spender's address\r\n     * @param increment Amount of increase in allowance\r\n     * @return True if successful\r\n     */\r\n    function increaseAllowance(address spender, uint256 increment)\r\n        external\r\n        whenNotPaused\r\n        notBlacklisted(msg.sender)\r\n        notBlacklisted(spender)\r\n        returns (bool)\r\n    {\r\n        _increaseAllowance(msg.sender, spender, increment);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @notice Decrease the allowance by a given decrement\r\n     * @param spender   Spender's address\r\n     * @param decrement Amount of decrease in allowance\r\n     * @return True if successful\r\n     */\r\n    function decreaseAllowance(address spender, uint256 decrement)\r\n        external\r\n        whenNotPaused\r\n        notBlacklisted(msg.sender)\r\n        notBlacklisted(spender)\r\n        returns (bool)\r\n    {\r\n        _decreaseAllowance(msg.sender, spender, decrement);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @notice Execute a transfer with a signed authorization\r\n     * @param from          Payer's address (Authorizer)\r\n     * @param to            Payee's address\r\n     * @param value         Amount to be transferred\r\n     * @param validAfter    The time after which this is valid (unix time)\r\n     * @param validBefore   The time before which this is valid (unix time)\r\n     * @param nonce         Unique nonce\r\n     * @param v             v of the signature\r\n     * @param r             r of the signature\r\n     * @param s             s of the signature\r\n     */\r\n    function transferWithAuthorization(\r\n        address from,\r\n        address to,\r\n        uint256 value,\r\n        uint256 validAfter,\r\n        uint256 validBefore,\r\n        bytes32 nonce,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) external whenNotPaused notBlacklisted(from) notBlacklisted(to) {\r\n        _transferWithAuthorization(\r\n            from,\r\n            to,\r\n            value,\r\n            validAfter,\r\n            validBefore,\r\n            nonce,\r\n            v,\r\n            r,\r\n            s\r\n        );\r\n    }\r\n\r\n    /**\r\n     * @notice Receive a transfer with a signed authorization from the payer\r\n     * @dev This has an additional check to ensure that the payee's address\r\n     * matches the caller of this function to prevent front-running attacks.\r\n     * @param from          Payer's address (Authorizer)\r\n     * @param to            Payee's address\r\n     * @param value         Amount to be transferred\r\n     * @param validAfter    The time after which this is valid (unix time)\r\n     * @param validBefore   The time before which this is valid (unix time)\r\n     * @param nonce         Unique nonce\r\n     * @param v             v of the signature\r\n     * @param r             r of the signature\r\n     * @param s             s of the signature\r\n     */\r\n    function receiveWithAuthorization(\r\n        address from,\r\n        address to,\r\n        uint256 value,\r\n        uint256 validAfter,\r\n        uint256 validBefore,\r\n        bytes32 nonce,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) external whenNotPaused notBlacklisted(from) notBlacklisted(to) {\r\n        _receiveWithAuthorization(\r\n            from,\r\n            to,\r\n            value,\r\n            validAfter,\r\n            validBefore,\r\n            nonce,\r\n            v,\r\n            r,\r\n            s\r\n        );\r\n    }\r\n\r\n    /**\r\n     * @notice Attempt to cancel an authorization\r\n     * @dev Works only if the authorization is not yet used.\r\n     * @param authorizer    Authorizer's address\r\n     * @param nonce         Nonce of the authorization\r\n     * @param v             v of the signature\r\n     * @param r             r of the signature\r\n     * @param s             s of the signature\r\n     */\r\n    function cancelAuthorization(\r\n        address authorizer,\r\n        bytes32 nonce,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) external whenNotPaused {\r\n        _cancelAuthorization(authorizer, nonce, v, r, s);\r\n    }\r\n\r\n    /**\r\n     * @notice Update allowance with a signed permit\r\n     * @param owner       Token owner's address (Authorizer)\r\n     * @param spender     Spender's address\r\n     * @param value       Amount of allowance\r\n     * @param deadline    Expiration time, seconds since the epoch\r\n     * @param v           v of the signature\r\n     * @param r           r of the signature\r\n     * @param s           s of the signature\r\n     */\r\n    function permit(\r\n        address owner,\r\n        address spender,\r\n        uint256 value,\r\n        uint256 deadline,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) external whenNotPaused notBlacklisted(owner) notBlacklisted(spender) {\r\n        _permit(owner, spender, value, deadline, v, r, s);\r\n    }\r\n\r\n    /**\r\n     * @notice Internal function to increase the allowance by a given increment\r\n     * @param owner     Token owner's address\r\n     * @param spender   Spender's address\r\n     * @param increment Amount of increase\r\n     */\r\n    function _increaseAllowance(\r\n        address owner,\r\n        address spender,\r\n        uint256 increment\r\n    ) internal override {\r\n        _approve(owner, spender, allowed[owner][spender].add(increment));\r\n    }\r\n\r\n    /**\r\n     * @notice Internal function to decrease the allowance by a given decrement\r\n     * @param owner     Token owner's address\r\n     * @param spender   Spender's address\r\n     * @param decrement Amount of decrease\r\n     */\r\n    function _decreaseAllowance(\r\n        address owner,\r\n        address spender,\r\n        uint256 decrement\r\n    ) internal override {\r\n        _approve(\r\n            owner,\r\n            spender,\r\n            allowed[owner][spender].sub(\r\n                decrement,\r\n                \"ERC20: decreased allowance below zero\"\r\n            )\r\n        );\r\n    }\r\n}\r\n\r\n// File: contracts/v2/FiatTokenV2_1.sol\r\n\r\n/**\r\n * Copyright (c) 2018-2020 CENTRE SECZ\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\npragma solidity 0.6.12;\r\n\r\n// solhint-disable func-name-mixedcase\r\n\r\n/**\r\n * @title FiatToken V2.1\r\n * @notice ERC20 Token backed by fiat reserves, version 2.1\r\n */\r\ncontract FiatTokenV2_1 is FiatTokenV2 {\r\n    /**\r\n     * @notice Initialize v2.1\r\n     * @param lostAndFound  The address to which the locked funds are sent\r\n     */\r\n    function initializeV2_1(address lostAndFound) external {\r\n        // solhint-disable-next-line reason-string\r\n        require(_initializedVersion == 1);\r\n\r\n        uint256 lockedAmount = balances[address(this)];\r\n        if (lockedAmount > 0) {\r\n            _transfer(address(this), lostAndFound, lockedAmount);\r\n        }\r\n        blacklisted[address(this)] = true;\r\n\r\n        _initializedVersion = 2;\r\n    }\r\n\r\n    /**\r\n     * @notice Version string for the EIP712 domain separator\r\n     * @return Version string\r\n     */\r\n    function version() external view returns (string memory) {\r\n        return \"2\";\r\n    }\r\n}"}},"matchId":"1720637","creationMatch":"match","runtimeMatch":"match","verifiedAt":"2024-08-08T13:43:31Z","match":"match","chainId":"1","address":"0xa2327a938Febf5FEC13baCFb16Ae10EcBc4cbDCF"}