From e545147eec3762be2eca2a1a2b91cd09ba2b5bd7 Mon Sep 17 00:00:00 2001 From: DruuuCLT <121195249+DruuuCLT@users.noreply.github.com> Date: Mon, 9 Dec 2024 21:29:20 +0100 Subject: [PATCH] [B2N] Nibiru Testnet --- verification_artifacts/FiatTokenProxy.json | 1 + verification_artifacts/FiatTokenV2_2.json | 1 + verification_artifacts/SignatureChecker.json | 1 + verification_artifacts/input.json | 15 +++++++++++++++ 4 files changed, 18 insertions(+) create mode 100644 verification_artifacts/FiatTokenProxy.json create mode 100644 verification_artifacts/FiatTokenV2_2.json create mode 100644 verification_artifacts/SignatureChecker.json create mode 100644 verification_artifacts/input.json diff --git a/verification_artifacts/FiatTokenProxy.json b/verification_artifacts/FiatTokenProxy.json new file mode 100644 index 000000000..c9a3f8ce0 --- /dev/null +++ b/verification_artifacts/FiatTokenProxy.json @@ -0,0 +1 @@ +{"compiler":{"version":"0.6.12+commit.27d51765"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"implementationContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"changeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}],"devdoc":{"details":"This contract proxies FiatToken calls and enables FiatToken upgrades","kind":"dev","methods":{"admin()":{"returns":{"_0":"The address of the proxy admin."}},"changeAdmin(address)":{"details":"Changes the admin of the proxy. Only the current admin can call this function.","params":{"newAdmin":"Address to transfer proxy administration to."}},"implementation()":{"returns":{"_0":"The address of the implementation."}},"upgradeTo(address)":{"details":"Upgrade the backing implementation of the proxy. Only the admin can call this function.","params":{"newImplementation":"Address of the new implementation."}},"upgradeToAndCall(address,bytes)":{"details":"Upgrade the backing implementation of the proxy and call a function on the new implementation. This is useful to initialize the proxied contract.","params":{"data":"Data to send as msg.data in the low level call. It should include the signature and the parameters of the function to be called, as described in https://solidity.readthedocs.io/en/develop/abi-spec.html#function-selector-and-argument-encoding.","newImplementation":"Address of the new implementation."}}},"title":"FiatTokenProxy","version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"contracts/v1/FiatTokenProxy.sol":"FiatTokenProxy"},"evmVersion":"istanbul","libraries":{},"metadata":{"bytecodeHash":"ipfs","useLiteralContent":true},"optimizer":{"enabled":true,"runs":10000000},"remappings":[]},"sources":{"@openzeppelin/contracts/utils/Address.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\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 { size := extcodesize(account) }\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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(address target, bytes memory data) 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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data) 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(address target, bytes memory data, string memory errorMessage) 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(bool success, bytes memory returndata, string memory errorMessage) 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","keccak256":"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea","license":"MIT"},"contracts/upgradeability/AdminUpgradeabilityProxy.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { UpgradeabilityProxy } from \"./UpgradeabilityProxy.sol\";\n\n/**\n * @notice This contract combines an upgradeability proxy with an authorization\n * mechanism for administrative tasks.\n * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/AdminUpgradeabilityProxy.sol\n * Modifications:\n * 1. Reformat, conform to Solidity 0.6 syntax, and add error messages (5/13/20)\n * 2. Remove ifAdmin modifier from admin() and implementation() (5/13/20)\n */\ncontract AdminUpgradeabilityProxy is UpgradeabilityProxy {\n /**\n * @dev Emitted when the administration has been transferred.\n * @param previousAdmin Address of the previous admin.\n * @param newAdmin Address of the new admin.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"org.zeppelinos.proxy.admin\", and is\n * validated in the constructor.\n */\n bytes32\n private constant ADMIN_SLOT = 0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b;\n\n /**\n * @dev Modifier to check whether the `msg.sender` is the admin.\n * If it is, it will run the function. Otherwise, it will delegate the call\n * to the implementation.\n */\n modifier ifAdmin() {\n if (msg.sender == _admin()) {\n _;\n } else {\n _fallback();\n }\n }\n\n /**\n * @dev Contract constructor.\n * It sets the `msg.sender` as the proxy administrator.\n * @param implementationContract address of the initial implementation.\n */\n constructor(address implementationContract)\n public\n UpgradeabilityProxy(implementationContract)\n {\n assert(ADMIN_SLOT == keccak256(\"org.zeppelinos.proxy.admin\"));\n\n _setAdmin(msg.sender);\n }\n\n /**\n * @return The address of the proxy admin.\n */\n function admin() external view returns (address) {\n return _admin();\n }\n\n /**\n * @return The address of the implementation.\n */\n function implementation() external view returns (address) {\n return _implementation();\n }\n\n /**\n * @dev Changes the admin of the proxy.\n * Only the current admin can call this function.\n * @param newAdmin Address to transfer proxy administration to.\n */\n function changeAdmin(address newAdmin) external ifAdmin {\n require(\n newAdmin != address(0),\n \"Cannot change the admin of a proxy to the zero address\"\n );\n emit AdminChanged(_admin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrade the backing implementation of the proxy.\n * Only the admin can call this function.\n * @param newImplementation Address of the new implementation.\n */\n function upgradeTo(address newImplementation) external ifAdmin {\n _upgradeTo(newImplementation);\n }\n\n /**\n * @dev Upgrade the backing implementation of the proxy and call a function\n * on the new implementation.\n * This is useful to initialize the proxied contract.\n * @param newImplementation Address of the new implementation.\n * @param data Data to send as msg.data in the low level call.\n * It should include the signature and the parameters of the function to be\n * called, as described in\n * https://solidity.readthedocs.io/en/develop/abi-spec.html#function-selector-and-argument-encoding.\n */\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n ifAdmin\n {\n _upgradeTo(newImplementation);\n // prettier-ignore\n // solhint-disable-next-line avoid-low-level-calls\n (bool success,) = address(this).call{value: msg.value}(data);\n // solhint-disable-next-line reason-string\n require(success);\n }\n\n /**\n * @return adm The admin slot.\n */\n function _admin() internal view returns (address adm) {\n bytes32 slot = ADMIN_SLOT;\n\n assembly {\n adm := sload(slot)\n }\n }\n\n /**\n * @dev Sets the address of the proxy admin.\n * @param newAdmin Address of the new proxy admin.\n */\n function _setAdmin(address newAdmin) internal {\n bytes32 slot = ADMIN_SLOT;\n\n assembly {\n sstore(slot, newAdmin)\n }\n }\n\n /**\n * @dev Only fall back when the sender is not the admin.\n */\n function _willFallback() internal override {\n require(\n msg.sender != _admin(),\n \"Cannot call fallback function from the proxy admin\"\n );\n super._willFallback();\n }\n}\n","keccak256":"0x709d23a3d4b34a43861d099ec8c3f964c933f45bf30ee08c98a569433114c599","license":"Apache-2.0"},"contracts/upgradeability/Proxy.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\n/**\n * @notice Implements delegation of calls to other contracts, with proper\n * forwarding of return values and bubbling of failures.\n * It defines a fallback function that delegates all calls to the address\n * returned by the abstract _implementation() internal function.\n * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/Proxy.sol\n * Modifications:\n * 1. Reformat and conform to Solidity 0.6 syntax (5/13/20)\n */\nabstract contract Proxy {\n /**\n * @dev Fallback function.\n * Implemented entirely in `_fallback`.\n */\n fallback() external payable {\n _fallback();\n }\n\n /**\n * @return The Address of the implementation.\n */\n function _implementation() internal virtual view returns (address);\n\n /**\n * @dev Delegates execution to an implementation contract.\n * This is a low level function that doesn't return to its internal call site.\n * It will return to the external caller whatever the implementation returns.\n * @param implementation Address to delegate.\n */\n function _delegate(address implementation) internal {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(\n gas(),\n implementation,\n 0,\n calldatasize(),\n 0,\n 0\n )\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev Function that is run as the first thing in the fallback function.\n * Can be redefined in derived contracts to add functionality.\n * Redefinitions must call super._willFallback().\n */\n function _willFallback() internal virtual {}\n\n /**\n * @dev fallback implementation.\n * Extracted to enable manual triggering.\n */\n function _fallback() internal {\n _willFallback();\n _delegate(_implementation());\n }\n}\n","keccak256":"0x27eb2c0719a143aafc9f7f1fa39ef225baa0ad667bcd5f90cd1e4abcc89f4c20","license":"Apache-2.0"},"contracts/upgradeability/UpgradeabilityProxy.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { Proxy } from \"./Proxy.sol\";\nimport { Address } from \"@openzeppelin/contracts/utils/Address.sol\";\n\n/**\n * @notice This contract implements a proxy that allows to change the\n * implementation address to which it will delegate.\n * Such a change is called an implementation upgrade.\n * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/UpgradeabilityProxy.sol\n * Modifications:\n * 1. Reformat, conform to Solidity 0.6 syntax, and add error messages (5/13/20)\n * 2. Use Address utility library from the latest OpenZeppelin (5/13/20)\n */\ncontract UpgradeabilityProxy is Proxy {\n /**\n * @dev Emitted when the implementation is upgraded.\n * @param implementation Address of the new implementation.\n */\n event Upgraded(address implementation);\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"org.zeppelinos.proxy.implementation\", and is\n * validated in the constructor.\n */\n bytes32\n private constant IMPLEMENTATION_SLOT = 0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3;\n\n /**\n * @dev Contract constructor.\n * @param implementationContract Address of the initial implementation.\n */\n constructor(address implementationContract) public {\n assert(\n IMPLEMENTATION_SLOT ==\n keccak256(\"org.zeppelinos.proxy.implementation\")\n );\n\n _setImplementation(implementationContract);\n }\n\n /**\n * @dev Returns the current implementation.\n * @return impl Address of the current implementation\n */\n function _implementation() internal override view returns (address impl) {\n bytes32 slot = IMPLEMENTATION_SLOT;\n assembly {\n impl := sload(slot)\n }\n }\n\n /**\n * @dev Upgrades the proxy to a new implementation.\n * @param newImplementation Address of the new implementation.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Sets the implementation address of the proxy.\n * @param newImplementation Address of the new implementation.\n */\n function _setImplementation(address newImplementation) private {\n require(\n Address.isContract(newImplementation),\n \"Cannot set a proxy implementation to a non-contract address\"\n );\n\n bytes32 slot = IMPLEMENTATION_SLOT;\n\n assembly {\n sstore(slot, newImplementation)\n }\n }\n}\n","keccak256":"0xa7a9d804acfb476666548a05cd94ce8a5ffa6bd76b038cbc3f1683d6ac708c49","license":"Apache-2.0"},"contracts/v1/FiatTokenProxy.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport {\n AdminUpgradeabilityProxy\n} from \"../upgradeability/AdminUpgradeabilityProxy.sol\";\n\n/**\n * @title FiatTokenProxy\n * @dev This contract proxies FiatToken calls and enables FiatToken upgrades\n */\ncontract FiatTokenProxy is AdminUpgradeabilityProxy {\n constructor(address implementationContract)\n public\n AdminUpgradeabilityProxy(implementationContract)\n {}\n}\n","keccak256":"0x30fc5a64a101f783b2c745624d4c77b03a8f6373315857dc637581a189963f74","license":"Apache-2.0"}},"version":1} \ No newline at end of file diff --git a/verification_artifacts/FiatTokenV2_2.json b/verification_artifacts/FiatTokenV2_2.json new file mode 100644 index 000000000..20685d0eb --- /dev/null +++ b/verification_artifacts/FiatTokenV2_2.json @@ -0,0 +1 @@ +{"compiler":{"version":"0.6.12+commit.27d51765"},"language":"Solidity","output":{"abi":[{"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":true,"internalType":"address","name":"_account","type":"address"}],"name":"Blacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newBlacklister","type":"address"}],"name":"BlacklisterChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"burner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newMasterMinter","type":"address"}],"name":"MasterMinterChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"minterAllowedAmount","type":"uint256"}],"name":"MinterConfigured","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldMinter","type":"address"}],"name":"MinterRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"PauserChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newRescuer","type":"address"}],"name":"RescuerChanged","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":true,"internalType":"address","name":"_account","type":"address"}],"name":"UnBlacklisted","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"inputs":[],"name":"CANCEL_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_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":"value","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":[{"internalType":"address","name":"_account","type":"address"}],"name":"blacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"blacklister","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":[{"internalType":"address","name":"authorizer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"cancelAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"uint256","name":"minterAllowedAmount","type":"uint256"}],"name":"configureMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currency","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"decrement","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"increment","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenName","type":"string"},{"internalType":"string","name":"tokenSymbol","type":"string"},{"internalType":"string","name":"tokenCurrency","type":"string"},{"internalType":"uint8","name":"tokenDecimals","type":"uint8"},{"internalType":"address","name":"newMasterMinter","type":"address"},{"internalType":"address","name":"newPauser","type":"address"},{"internalType":"address","name":"newBlacklister","type":"address"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newName","type":"string"}],"name":"initializeV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"lostAndFound","type":"address"}],"name":"initializeV2_1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accountsToBlacklist","type":"address[]"},{"internalType":"string","name":"newSymbol","type":"string"}],"name":"initializeV2_2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"isBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterMinter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"minterAllowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauser","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":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","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":[{"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":"bytes","name":"signature","type":"bytes"}],"name":"receiveWithAuthorization","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":"receiveWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"removeMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"tokenContract","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rescuer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","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":"bytes","name":"signature","type":"bytes"}],"name":"transferWithAuthorization","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":[{"internalType":"address","name":"_account","type":"address"}],"name":"unBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newBlacklister","type":"address"}],"name":"updateBlacklister","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newMasterMinter","type":"address"}],"name":"updateMasterMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newPauser","type":"address"}],"name":"updatePauser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRescuer","type":"address"}],"name":"updateRescuer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}],"devdoc":{"kind":"dev","methods":{"DOMAIN_SEPARATOR()":{"returns":{"_0":"The bytes32 EIP712 domain separator."}},"allowance(address,address)":{"params":{"owner":"The token owner's address.","spender":"The spender's address."},"returns":{"_0":"The remaining allowance."}},"approve(address,uint256)":{"params":{"spender":"The spender's address.","value":"The allowance amount."},"returns":{"_0":"True if the operation was successful."}},"authorizationState(address,bytes32)":{"details":"Nonces are randomly generated 32-byte data unique to the authorizer's address","params":{"authorizer":"Authorizer's address","nonce":"Nonce of the authorization"},"returns":{"_0":"True if the nonce is used"}},"balanceOf(address)":{"params":{"account":"The address to check."},"returns":{"_0":"balance The fiat token balance of the account."}},"blacklist(address)":{"params":{"_account":"The address to blacklist."}},"burn(uint256)":{"details":"The caller must be a minter, must not be blacklisted, and the amount to burn should be less than or equal to the account's balance.","params":{"_amount":"the amount of tokens to be burned."}},"cancelAuthorization(address,bytes32,bytes)":{"details":"Works only if the authorization is not yet used. EOA wallet signatures should be packed in the order of r, s, v.","params":{"authorizer":"Authorizer's address","nonce":"Nonce of the authorization","signature":"Signature bytes signed by an EOA wallet or a contract wallet"}},"cancelAuthorization(address,bytes32,uint8,bytes32,bytes32)":{"details":"Works only if the authorization is not yet used.","params":{"authorizer":"Authorizer's address","nonce":"Nonce of the authorization","r":"r of the signature","s":"s of the signature","v":"v of the signature"}},"configureMinter(address,uint256)":{"params":{"minter":"The address of the minter.","minterAllowedAmount":"The minting amount allowed for the minter."},"returns":{"_0":"True if the operation was successful."}},"decreaseAllowance(address,uint256)":{"params":{"decrement":"Amount of decrease in allowance","spender":"Spender's address"},"returns":{"_0":"True if successful"}},"increaseAllowance(address,uint256)":{"params":{"increment":"Amount of increase in allowance","spender":"Spender's address"},"returns":{"_0":"True if successful"}},"initialize(string,string,string,uint8,address,address,address,address)":{"params":{"newBlacklister":"The blacklister address for the fiat token.","newMasterMinter":"The masterMinter address for the fiat token.","newOwner":"The owner of the fiat token.","newPauser":"The pauser address for the fiat token.","tokenCurrency":"The fiat currency that the token represents.","tokenDecimals":"The number of decimals that the token uses.","tokenName":"The name of the fiat token.","tokenSymbol":"The symbol of the fiat token."}},"initializeV2(string)":{"params":{"newName":"New token name"}},"initializeV2_1(address)":{"params":{"lostAndFound":"The address to which the locked funds are sent"}},"initializeV2_2(address[],string)":{"params":{"accountsToBlacklist":"A list of accounts to migrate from the old blacklist","newSymbol":"New token symbol data structure to the new blacklist data structure."}},"isBlacklisted(address)":{"params":{"_account":"The address to check."},"returns":{"_0":"True if the account is blacklisted, false if the account is not blacklisted."}},"isMinter(address)":{"params":{"account":"The address to check."},"returns":{"_0":"True if the account is a minter, false if the account is not a minter."}},"mint(address,uint256)":{"params":{"_amount":"The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller.","_to":"The address that will receive the minted tokens."},"returns":{"_0":"True if the operation was successful."}},"minterAllowance(address)":{"params":{"minter":"The address to check."},"returns":{"_0":"The remaining minter allowance for the account."}},"nonces(address)":{"params":{"owner":"Token owner's address (Authorizer)"},"returns":{"_0":"Next nonce"}},"owner()":{"details":"Tells the address of the owner","returns":{"_0":"the address of the owner"}},"pause()":{"details":"called by the owner to pause, triggers stopped state"},"permit(address,address,uint256,uint256,bytes)":{"details":"EOA wallet signatures should be packed in the order of r, s, v.","params":{"deadline":"The time at which the signature expires (unix time), or max uint256 value to signal no expiration","owner":"Token owner's address (Authorizer)","signature":"Signature bytes signed by an EOA wallet or a contract wallet","spender":"Spender's address","value":"Amount of allowance"}},"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)":{"params":{"deadline":"The time at which the signature expires (unix time), or max uint256 value to signal no expiration","owner":"Token owner's address (Authorizer)","r":"r of the signature","s":"s of the signature","spender":"Spender's address","v":"v of the signature","value":"Amount of allowance"}},"receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,bytes)":{"details":"This has an additional check to ensure that the payee's address matches the caller of this function to prevent front-running attacks. EOA wallet signatures should be packed in the order of r, s, v.","params":{"from":"Payer's address (Authorizer)","nonce":"Unique nonce","signature":"Signature bytes signed by an EOA wallet or a contract wallet","to":"Payee's address","validAfter":"The time after which this is valid (unix time)","validBefore":"The time before which this is valid (unix time)","value":"Amount to be transferred"}},"receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)":{"details":"This has an additional check to ensure that the payee's address matches the caller of this function to prevent front-running attacks.","params":{"from":"Payer's address (Authorizer)","nonce":"Unique nonce","r":"r of the signature","s":"s of the signature","to":"Payee's address","v":"v of the signature","validAfter":"The time after which this is valid (unix time)","validBefore":"The time before which this is valid (unix time)","value":"Amount to be transferred"}},"removeMinter(address)":{"params":{"minter":"The address of the minter to remove."},"returns":{"_0":"True if the operation was successful."}},"rescueERC20(address,address,uint256)":{"params":{"amount":"Amount to withdraw","to":"Recipient address","tokenContract":"ERC20 token contract address"}},"rescuer()":{"returns":{"_0":"Rescuer's address"}},"totalSupply()":{"returns":{"_0":"The totalSupply of the fiat token."}},"transfer(address,uint256)":{"params":{"to":"Payee's address.","value":"Transfer amount."},"returns":{"_0":"True if the operation was successful."}},"transferFrom(address,address,uint256)":{"details":"The caller must have some fiat token allowance on the payer's tokens.","params":{"from":"Payer's address.","to":"Payee's address.","value":"Transfer amount."},"returns":{"_0":"True if the operation was successful."}},"transferOwnership(address)":{"details":"Allows the current owner to transfer control of the contract to a newOwner.","params":{"newOwner":"The address to transfer ownership to."}},"transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,bytes)":{"details":"EOA wallet signatures should be packed in the order of r, s, v.","params":{"from":"Payer's address (Authorizer)","nonce":"Unique nonce","signature":"Signature bytes signed by an EOA wallet or a contract wallet","to":"Payee's address","validAfter":"The time after which this is valid (unix time)","validBefore":"The time before which this is valid (unix time)","value":"Amount to be transferred"}},"transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)":{"params":{"from":"Payer's address (Authorizer)","nonce":"Unique nonce","r":"r of the signature","s":"s of the signature","to":"Payee's address","v":"v of the signature","validAfter":"The time after which this is valid (unix time)","validBefore":"The time before which this is valid (unix time)","value":"Amount to be transferred"}},"unBlacklist(address)":{"params":{"_account":"The address to remove from the blacklist."}},"unpause()":{"details":"called by the owner to unpause, returns to normal state"},"updateBlacklister(address)":{"params":{"_newBlacklister":"The address of the new blacklister."}},"updateMasterMinter(address)":{"params":{"_newMasterMinter":"The address of the new master minter."}},"updatePauser(address)":{"params":{"_newPauser":"The address of the new pauser."}},"updateRescuer(address)":{"params":{"newRescuer":"The address of the new rescuer."}},"version()":{"returns":{"_0":"Version string"}}},"title":"FiatToken V2.2","version":1},"userdoc":{"kind":"user","methods":{"DOMAIN_SEPARATOR()":{"notice":"Get the EIP712 Domain Separator."},"allowance(address,address)":{"notice":"Gets the remaining amount of fiat tokens a spender is allowed to transfer on behalf of the token owner."},"approve(address,uint256)":{"notice":"Sets a fiat token allowance for a spender to spend on behalf of the caller."},"authorizationState(address,bytes32)":{"notice":"Returns the state of an authorization"},"balanceOf(address)":{"notice":"Gets the fiat token balance of an account."},"blacklist(address)":{"notice":"Adds account to blacklist."},"burn(uint256)":{"notice":"Allows a minter to burn some of its own tokens."},"cancelAuthorization(address,bytes32,bytes)":{"notice":"Attempt to cancel an authorization"},"cancelAuthorization(address,bytes32,uint8,bytes32,bytes32)":{"notice":"Attempt to cancel an authorization"},"configureMinter(address,uint256)":{"notice":"Adds or updates a new minter with a mint allowance."},"decreaseAllowance(address,uint256)":{"notice":"Decrease the allowance by a given decrement"},"increaseAllowance(address,uint256)":{"notice":"Increase the allowance by a given increment"},"initialize(string,string,string,uint8,address,address,address,address)":{"notice":"Initializes the fiat token contract."},"initializeV2(string)":{"notice":"Initialize v2"},"initializeV2_1(address)":{"notice":"Initialize v2.1"},"initializeV2_2(address[],string)":{"notice":"Initialize v2.2"},"isBlacklisted(address)":{"notice":"Checks if account is blacklisted."},"isMinter(address)":{"notice":"Checks if an account is a minter."},"mint(address,uint256)":{"notice":"Mints fiat tokens to an address."},"minterAllowance(address)":{"notice":"Gets the minter allowance for an account."},"nonces(address)":{"notice":"Nonces for permit"},"permit(address,address,uint256,uint256,bytes)":{"notice":"Update allowance with a signed permit"},"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)":{"notice":"Update allowance with a signed permit"},"receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,bytes)":{"notice":"Receive a transfer with a signed authorization from the payer"},"receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)":{"notice":"Receive a transfer with a signed authorization from the payer"},"removeMinter(address)":{"notice":"Removes a minter."},"rescueERC20(address,address,uint256)":{"notice":"Rescue ERC20 tokens locked up in this contract."},"rescuer()":{"notice":"Returns current rescuer"},"totalSupply()":{"notice":"Gets the totalSupply of the fiat token."},"transfer(address,uint256)":{"notice":"Transfers tokens from the caller."},"transferFrom(address,address,uint256)":{"notice":"Transfers tokens from an address to another by spending the caller's allowance."},"transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,bytes)":{"notice":"Execute a transfer with a signed authorization"},"transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)":{"notice":"Execute a transfer with a signed authorization"},"unBlacklist(address)":{"notice":"Removes account from blacklist."},"updateBlacklister(address)":{"notice":"Updates the blacklister address."},"updateMasterMinter(address)":{"notice":"Updates the master minter address."},"updatePauser(address)":{"notice":"Updates the pauser address."},"updateRescuer(address)":{"notice":"Updates the rescuer address."},"version()":{"notice":"Version string for the EIP712 domain separator"}},"notice":"ERC20 Token backed by fiat reserves, version 2.2","version":1}},"settings":{"compilationTarget":{"contracts/v2/FiatTokenV2_2.sol":"FiatTokenV2_2"},"evmVersion":"istanbul","libraries":{},"metadata":{"bytecodeHash":"ipfs","useLiteralContent":true},"optimizer":{"enabled":true,"runs":10000000},"remappings":[]},"sources":{"@openzeppelin/contracts/math/SafeMath.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\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","keccak256":"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52","license":"MIT"},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\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(address sender, address recipient, uint256 amount) 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","keccak256":"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5","license":"MIT"},"@openzeppelin/contracts/token/ERC20/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n","keccak256":"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc","license":"MIT"},"@openzeppelin/contracts/utils/Address.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\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 { size := extcodesize(account) }\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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return 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(address target, bytes memory data, uint256 value, string memory errorMessage) 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(address target, bytes memory data) 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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data) 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(address target, bytes memory data, string memory errorMessage) 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(bool success, bytes memory returndata, string memory errorMessage) 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","keccak256":"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea","license":"MIT"},"contracts/interface/IERC1271.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with the provided data hash\n * @return magicValue bytes4 magic value 0x1626ba7e when function passes\n */\n function isValidSignature(bytes32 hash, bytes memory signature)\n external\n view\n returns (bytes4 magicValue);\n}\n","keccak256":"0x8accb9f93dcd398e5c84cb80010de808cf5092cebfa823b3d7c4b8e5b2bcf672","license":"Apache-2.0"},"contracts/util/ECRecover.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\n/**\n * @title ECRecover\n * @notice A library that provides a safe ECDSA recovery function\n */\nlibrary ECRecover {\n /**\n * @notice Recover signer's address from a signed message\n * @dev Adapted from: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/65e4ffde586ec89af3b7e9140bdc9235d1254853/contracts/cryptography/ECDSA.sol\n * Modifications: Accept v, r, and s as separate arguments\n * @param digest Keccak-256 hash digest of the signed message\n * @param v v of the signature\n * @param r r of the signature\n * @param s s of the signature\n * @return Signer address\n */\n function recover(\n bytes32 digest,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) 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 \u00f7 2 + 1, and for v in (282): v \u2208 {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 if (\n uint256(s) >\n 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0\n ) {\n revert(\"ECRecover: invalid signature 's' value\");\n }\n\n if (v != 27 && v != 28) {\n revert(\"ECRecover: invalid signature 'v' value\");\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(digest, v, r, s);\n require(signer != address(0), \"ECRecover: invalid signature\");\n\n return signer;\n }\n\n /**\n * @notice Recover signer's address from a signed message\n * @dev Adapted from: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/0053ee040a7ff1dbc39691c9e67a69f564930a88/contracts/utils/cryptography/ECDSA.sol\n * @param digest Keccak-256 hash digest of the signed message\n * @param signature Signature byte array associated with hash\n * @return Signer address\n */\n function recover(bytes32 digest, bytes memory signature)\n internal\n pure\n returns (address)\n {\n require(signature.length == 65, \"ECRecover: invalid signature length\");\n\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 /// @solidity memory-safe-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 return recover(digest, v, r, s);\n }\n}\n","keccak256":"0xedf59af6c5998f9e4b0791cd79122a759a1d80a38453053df77838914dd1294d","license":"Apache-2.0"},"contracts/util/EIP712.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\n/**\n * @title EIP712\n * @notice A library that provides EIP712 helper functions\n */\nlibrary EIP712 {\n /**\n * @notice Make EIP712 domain separator\n * @param name Contract name\n * @param version Contract version\n * @param chainId Blockchain ID\n * @return Domain separator\n */\n function makeDomainSeparator(\n string memory name,\n string memory version,\n uint256 chainId\n ) internal view returns (bytes32) {\n return\n keccak256(\n abi.encode(\n // keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\")\n 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f,\n keccak256(bytes(name)),\n keccak256(bytes(version)),\n chainId,\n address(this)\n )\n );\n }\n\n /**\n * @notice Make EIP712 domain separator\n * @param name Contract name\n * @param version Contract version\n * @return Domain separator\n */\n function makeDomainSeparator(string memory name, string memory version)\n internal\n view\n returns (bytes32)\n {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return makeDomainSeparator(name, version, chainId);\n }\n}\n","keccak256":"0x73c2ae0005076151fddbfc8bd240595fd2e5111eca9be419ad36fe9bff00a776","license":"Apache-2.0"},"contracts/util/MessageHashUtils.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).\n * Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/21bb89ef5bfc789b9333eb05e3ba2b7b284ac77c/contracts/utils/cryptography/MessageHashUtils.sol\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * @param domainSeparator Domain separator\n * @param structHash Hashed EIP-712 data struct\n * @return digest The keccak256 digest of an EIP-712 typed data\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash)\n internal\n pure\n returns (bytes32 digest)\n {\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, \"\\x19\\x01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n","keccak256":"0xd9c683d2661b17f9019573ccac2a6e4561dec22bec83522ab9ad2da194f4ac8a","license":"Apache-2.0"},"contracts/util/SignatureChecker.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { ECRecover } from \"./ECRecover.sol\";\nimport { IERC1271 } from \"../interface/IERC1271.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECRecover.recover` to seamlessly support both ECDSA\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets.\n *\n * Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/21bb89ef5bfc789b9333eb05e3ba2b7b284ac77c/contracts/utils/cryptography/SignatureChecker.sol\n */\nlibrary SignatureChecker {\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECRecover.recover`.\n * @param signer Address of the claimed signer\n * @param digest Keccak-256 hash digest of the signed message\n * @param signature Signature byte array associated with hash\n */\n function isValidSignatureNow(\n address signer,\n bytes32 digest,\n bytes memory signature\n ) external view returns (bool) {\n if (!isContract(signer)) {\n return ECRecover.recover(digest, signature) == signer;\n }\n return isValidERC1271SignatureNow(signer, digest, signature);\n }\n\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\n * against the signer smart contract using ERC1271.\n * @param signer Address of the claimed signer\n * @param digest Keccak-256 hash digest of the signed message\n * @param signature Signature byte array associated with hash\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidERC1271SignatureNow(\n address signer,\n bytes32 digest,\n bytes memory signature\n ) internal view returns (bool) {\n (bool success, bytes memory result) = signer.staticcall(\n abi.encodeWithSelector(\n IERC1271.isValidSignature.selector,\n digest,\n signature\n )\n );\n return (success &&\n result.length >= 32 &&\n abi.decode(result, (bytes32)) ==\n bytes32(IERC1271.isValidSignature.selector));\n }\n\n /**\n * @dev Checks if the input address is a smart contract.\n */\n function isContract(address addr) internal view returns (bool) {\n uint256 size;\n assembly {\n size := extcodesize(addr)\n }\n return size > 0;\n }\n}\n","keccak256":"0x89181a5d7440ce21492c5023ab98357c76e3de81ffc376dfda3983997a70728a","license":"Apache-2.0"},"contracts/v1.1/FiatTokenV1_1.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { FiatTokenV1 } from \"../v1/FiatTokenV1.sol\";\nimport { Rescuable } from \"./Rescuable.sol\";\n\n/**\n * @title FiatTokenV1_1\n * @dev ERC20 Token backed by fiat reserves\n */\ncontract FiatTokenV1_1 is FiatTokenV1, Rescuable {\n\n}\n","keccak256":"0x65b09be4c4d7bb28296cccbae86fea50843be3caf2712ca382de94b386e511f1","license":"Apache-2.0"},"contracts/v1.1/Rescuable.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { Ownable } from \"../v1/Ownable.sol\";\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\n\ncontract Rescuable is Ownable {\n using SafeERC20 for IERC20;\n\n address private _rescuer;\n\n event RescuerChanged(address indexed newRescuer);\n\n /**\n * @notice Returns current rescuer\n * @return Rescuer's address\n */\n function rescuer() external view returns (address) {\n return _rescuer;\n }\n\n /**\n * @notice Revert if called by any account other than the rescuer.\n */\n modifier onlyRescuer() {\n require(msg.sender == _rescuer, \"Rescuable: caller is not the rescuer\");\n _;\n }\n\n /**\n * @notice Rescue ERC20 tokens locked up in this contract.\n * @param tokenContract ERC20 token contract address\n * @param to Recipient address\n * @param amount Amount to withdraw\n */\n function rescueERC20(\n IERC20 tokenContract,\n address to,\n uint256 amount\n ) external onlyRescuer {\n tokenContract.safeTransfer(to, amount);\n }\n\n /**\n * @notice Updates the rescuer address.\n * @param newRescuer The address of the new rescuer.\n */\n function updateRescuer(address newRescuer) external onlyOwner {\n require(\n newRescuer != address(0),\n \"Rescuable: new rescuer is the zero address\"\n );\n _rescuer = newRescuer;\n emit RescuerChanged(newRescuer);\n }\n}\n","keccak256":"0x926082f30e75f0b2110cb87ea4d7dfec19c533168e207622c4cde43fda6af2ad","license":"Apache-2.0"},"contracts/v1/AbstractFiatTokenV1.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\nabstract contract AbstractFiatTokenV1 is IERC20 {\n function _approve(\n address owner,\n address spender,\n uint256 value\n ) internal virtual;\n\n function _transfer(\n address from,\n address to,\n uint256 value\n ) internal virtual;\n}\n","keccak256":"0x0dd17acb4d79cf8d9b5e18db1cb6fdb4e2f4a2c40c1ea232cbf41350a9a13206","license":"Apache-2.0"},"contracts/v1/Blacklistable.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { Ownable } from \"./Ownable.sol\";\n\n/**\n * @title Blacklistable Token\n * @dev Allows accounts to be blacklisted by a \"blacklister\" role\n */\nabstract contract Blacklistable is Ownable {\n address public blacklister;\n mapping(address => bool) internal _deprecatedBlacklisted;\n\n event Blacklisted(address indexed _account);\n event UnBlacklisted(address indexed _account);\n event BlacklisterChanged(address indexed newBlacklister);\n\n /**\n * @dev Throws if called by any account other than the blacklister.\n */\n modifier onlyBlacklister() {\n require(\n msg.sender == blacklister,\n \"Blacklistable: caller is not the blacklister\"\n );\n _;\n }\n\n /**\n * @dev Throws if argument account is blacklisted.\n * @param _account The address to check.\n */\n modifier notBlacklisted(address _account) {\n require(\n !_isBlacklisted(_account),\n \"Blacklistable: account is blacklisted\"\n );\n _;\n }\n\n /**\n * @notice Checks if account is blacklisted.\n * @param _account The address to check.\n * @return True if the account is blacklisted, false if the account is not blacklisted.\n */\n function isBlacklisted(address _account) external view returns (bool) {\n return _isBlacklisted(_account);\n }\n\n /**\n * @notice Adds account to blacklist.\n * @param _account The address to blacklist.\n */\n function blacklist(address _account) external onlyBlacklister {\n _blacklist(_account);\n emit Blacklisted(_account);\n }\n\n /**\n * @notice Removes account from blacklist.\n * @param _account The address to remove from the blacklist.\n */\n function unBlacklist(address _account) external onlyBlacklister {\n _unBlacklist(_account);\n emit UnBlacklisted(_account);\n }\n\n /**\n * @notice Updates the blacklister address.\n * @param _newBlacklister The address of the new blacklister.\n */\n function updateBlacklister(address _newBlacklister) external onlyOwner {\n require(\n _newBlacklister != address(0),\n \"Blacklistable: new blacklister is the zero address\"\n );\n blacklister = _newBlacklister;\n emit BlacklisterChanged(blacklister);\n }\n\n /**\n * @dev Checks if account is blacklisted.\n * @param _account The address to check.\n * @return true if the account is blacklisted, false otherwise.\n */\n function _isBlacklisted(address _account)\n internal\n virtual\n view\n returns (bool);\n\n /**\n * @dev Helper method that blacklists an account.\n * @param _account The address to blacklist.\n */\n function _blacklist(address _account) internal virtual;\n\n /**\n * @dev Helper method that unblacklists an account.\n * @param _account The address to unblacklist.\n */\n function _unBlacklist(address _account) internal virtual;\n}\n","keccak256":"0x9db5bc175ec8d80396819d274ca839bdd3116a9681a256640be29272b8862b38","license":"Apache-2.0"},"contracts/v1/FiatTokenV1.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport { AbstractFiatTokenV1 } from \"./AbstractFiatTokenV1.sol\";\nimport { Ownable } from \"./Ownable.sol\";\nimport { Pausable } from \"./Pausable.sol\";\nimport { Blacklistable } from \"./Blacklistable.sol\";\n\n/**\n * @title FiatToken\n * @dev ERC20 Token backed by fiat reserves\n */\ncontract FiatTokenV1 is AbstractFiatTokenV1, Ownable, Pausable, Blacklistable {\n using SafeMath for uint256;\n\n string public name;\n string public symbol;\n uint8 public decimals;\n string public currency;\n address public masterMinter;\n bool internal initialized;\n\n /// @dev A mapping that stores the balance and blacklist states for a given address.\n /// The first bit defines whether the address is blacklisted (1 if blacklisted, 0 otherwise).\n /// The last 255 bits define the balance for the address.\n mapping(address => uint256) internal balanceAndBlacklistStates;\n mapping(address => mapping(address => uint256)) internal allowed;\n uint256 internal totalSupply_ = 0;\n mapping(address => bool) internal minters;\n mapping(address => uint256) internal minterAllowed;\n\n event Mint(address indexed minter, address indexed to, uint256 amount);\n event Burn(address indexed burner, uint256 amount);\n event MinterConfigured(address indexed minter, uint256 minterAllowedAmount);\n event MinterRemoved(address indexed oldMinter);\n event MasterMinterChanged(address indexed newMasterMinter);\n\n /**\n * @notice Initializes the fiat token contract.\n * @param tokenName The name of the fiat token.\n * @param tokenSymbol The symbol of the fiat token.\n * @param tokenCurrency The fiat currency that the token represents.\n * @param tokenDecimals The number of decimals that the token uses.\n * @param newMasterMinter The masterMinter address for the fiat token.\n * @param newPauser The pauser address for the fiat token.\n * @param newBlacklister The blacklister address for the fiat token.\n * @param newOwner The owner of the fiat token.\n */\n function initialize(\n string memory tokenName,\n string memory tokenSymbol,\n string memory tokenCurrency,\n uint8 tokenDecimals,\n address newMasterMinter,\n address newPauser,\n address newBlacklister,\n address newOwner\n ) public {\n require(!initialized, \"FiatToken: contract is already initialized\");\n require(\n newMasterMinter != address(0),\n \"FiatToken: new masterMinter is the zero address\"\n );\n require(\n newPauser != address(0),\n \"FiatToken: new pauser is the zero address\"\n );\n require(\n newBlacklister != address(0),\n \"FiatToken: new blacklister is the zero address\"\n );\n require(\n newOwner != address(0),\n \"FiatToken: new owner is the zero address\"\n );\n\n name = tokenName;\n symbol = tokenSymbol;\n currency = tokenCurrency;\n decimals = tokenDecimals;\n masterMinter = newMasterMinter;\n pauser = newPauser;\n blacklister = newBlacklister;\n setOwner(newOwner);\n initialized = true;\n }\n\n /**\n * @dev Throws if called by any account other than a minter.\n */\n modifier onlyMinters() {\n require(minters[msg.sender], \"FiatToken: caller is not a minter\");\n _;\n }\n\n /**\n * @notice Mints fiat tokens to an address.\n * @param _to The address that will receive the minted tokens.\n * @param _amount The amount of tokens to mint. Must be less than or equal\n * to the minterAllowance of the caller.\n * @return True if the operation was successful.\n */\n function mint(address _to, uint256 _amount)\n external\n whenNotPaused\n onlyMinters\n notBlacklisted(msg.sender)\n notBlacklisted(_to)\n returns (bool)\n {\n require(_to != address(0), \"FiatToken: mint to the zero address\");\n require(_amount > 0, \"FiatToken: mint amount not greater than 0\");\n\n uint256 mintingAllowedAmount = minterAllowed[msg.sender];\n require(\n _amount <= mintingAllowedAmount,\n \"FiatToken: mint amount exceeds minterAllowance\"\n );\n\n totalSupply_ = totalSupply_.add(_amount);\n _setBalance(_to, _balanceOf(_to).add(_amount));\n minterAllowed[msg.sender] = mintingAllowedAmount.sub(_amount);\n emit Mint(msg.sender, _to, _amount);\n emit Transfer(address(0), _to, _amount);\n return true;\n }\n\n /**\n * @dev Throws if called by any account other than the masterMinter\n */\n modifier onlyMasterMinter() {\n require(\n msg.sender == masterMinter,\n \"FiatToken: caller is not the masterMinter\"\n );\n _;\n }\n\n /**\n * @notice Gets the minter allowance for an account.\n * @param minter The address to check.\n * @return The remaining minter allowance for the account.\n */\n function minterAllowance(address minter) external view returns (uint256) {\n return minterAllowed[minter];\n }\n\n /**\n * @notice Checks if an account is a minter.\n * @param account The address to check.\n * @return True if the account is a minter, false if the account is not a minter.\n */\n function isMinter(address account) external view returns (bool) {\n return minters[account];\n }\n\n /**\n * @notice Gets the remaining amount of fiat tokens a spender is allowed to transfer on\n * behalf of the token owner.\n * @param owner The token owner's address.\n * @param spender The spender's address.\n * @return The remaining allowance.\n */\n function allowance(address owner, address spender)\n external\n override\n view\n returns (uint256)\n {\n return allowed[owner][spender];\n }\n\n /**\n * @notice Gets the totalSupply of the fiat token.\n * @return The totalSupply of the fiat token.\n */\n function totalSupply() external override view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @notice Gets the fiat token balance of an account.\n * @param account The address to check.\n * @return balance The fiat token balance of the account.\n */\n function balanceOf(address account)\n external\n override\n view\n returns (uint256)\n {\n return _balanceOf(account);\n }\n\n /**\n * @notice Sets a fiat token allowance for a spender to spend on behalf of the caller.\n * @param spender The spender's address.\n * @param value The allowance amount.\n * @return True if the operation was successful.\n */\n function approve(address spender, uint256 value)\n external\n virtual\n override\n whenNotPaused\n notBlacklisted(msg.sender)\n notBlacklisted(spender)\n returns (bool)\n {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @dev Internal function to set allowance.\n * @param owner Token owner's address.\n * @param spender Spender's address.\n * @param value Allowance amount.\n */\n function _approve(\n address owner,\n address spender,\n uint256 value\n ) internal override {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n allowed[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n /**\n * @notice Transfers tokens from an address to another by spending the caller's allowance.\n * @dev The caller must have some fiat token allowance on the payer's tokens.\n * @param from Payer's address.\n * @param to Payee's address.\n * @param value Transfer amount.\n * @return True if the operation was successful.\n */\n function transferFrom(\n address from,\n address to,\n uint256 value\n )\n external\n override\n whenNotPaused\n notBlacklisted(msg.sender)\n notBlacklisted(from)\n notBlacklisted(to)\n returns (bool)\n {\n require(\n value <= allowed[from][msg.sender],\n \"ERC20: transfer amount exceeds allowance\"\n );\n _transfer(from, to, value);\n allowed[from][msg.sender] = allowed[from][msg.sender].sub(value);\n return true;\n }\n\n /**\n * @notice Transfers tokens from the caller.\n * @param to Payee's address.\n * @param value Transfer amount.\n * @return True if the operation was successful.\n */\n function transfer(address to, uint256 value)\n external\n override\n whenNotPaused\n notBlacklisted(msg.sender)\n notBlacklisted(to)\n returns (bool)\n {\n _transfer(msg.sender, to, value);\n return true;\n }\n\n /**\n * @dev Internal function to process transfers.\n * @param from Payer's address.\n * @param to Payee's address.\n * @param value Transfer amount.\n */\n function _transfer(\n address from,\n address to,\n uint256 value\n ) internal override {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n require(\n value <= _balanceOf(from),\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _setBalance(from, _balanceOf(from).sub(value));\n _setBalance(to, _balanceOf(to).add(value));\n emit Transfer(from, to, value);\n }\n\n /**\n * @notice Adds or updates a new minter with a mint allowance.\n * @param minter The address of the minter.\n * @param minterAllowedAmount The minting amount allowed for the minter.\n * @return True if the operation was successful.\n */\n function configureMinter(address minter, uint256 minterAllowedAmount)\n external\n whenNotPaused\n onlyMasterMinter\n returns (bool)\n {\n minters[minter] = true;\n minterAllowed[minter] = minterAllowedAmount;\n emit MinterConfigured(minter, minterAllowedAmount);\n return true;\n }\n\n /**\n * @notice Removes a minter.\n * @param minter The address of the minter to remove.\n * @return True if the operation was successful.\n */\n function removeMinter(address minter)\n external\n onlyMasterMinter\n returns (bool)\n {\n minters[minter] = false;\n minterAllowed[minter] = 0;\n emit MinterRemoved(minter);\n return true;\n }\n\n /**\n * @notice Allows a minter to burn some of its own tokens.\n * @dev The caller must be a minter, must not be blacklisted, and the amount to burn\n * should be less than or equal to the account's balance.\n * @param _amount the amount of tokens to be burned.\n */\n function burn(uint256 _amount)\n external\n whenNotPaused\n onlyMinters\n notBlacklisted(msg.sender)\n {\n uint256 balance = _balanceOf(msg.sender);\n require(_amount > 0, \"FiatToken: burn amount not greater than 0\");\n require(balance >= _amount, \"FiatToken: burn amount exceeds balance\");\n\n totalSupply_ = totalSupply_.sub(_amount);\n _setBalance(msg.sender, balance.sub(_amount));\n emit Burn(msg.sender, _amount);\n emit Transfer(msg.sender, address(0), _amount);\n }\n\n /**\n * @notice Updates the master minter address.\n * @param _newMasterMinter The address of the new master minter.\n */\n function updateMasterMinter(address _newMasterMinter) external onlyOwner {\n require(\n _newMasterMinter != address(0),\n \"FiatToken: new masterMinter is the zero address\"\n );\n masterMinter = _newMasterMinter;\n emit MasterMinterChanged(masterMinter);\n }\n\n /**\n * @inheritdoc Blacklistable\n */\n function _blacklist(address _account) internal override {\n _setBlacklistState(_account, true);\n }\n\n /**\n * @inheritdoc Blacklistable\n */\n function _unBlacklist(address _account) internal override {\n _setBlacklistState(_account, false);\n }\n\n /**\n * @dev Helper method that sets the blacklist state of an account.\n * @param _account The address of the account.\n * @param _shouldBlacklist True if the account should be blacklisted, false if the account should be unblacklisted.\n */\n function _setBlacklistState(address _account, bool _shouldBlacklist)\n internal\n virtual\n {\n _deprecatedBlacklisted[_account] = _shouldBlacklist;\n }\n\n /**\n * @dev Helper method that sets the balance of an account.\n * @param _account The address of the account.\n * @param _balance The new fiat token balance of the account.\n */\n function _setBalance(address _account, uint256 _balance) internal virtual {\n balanceAndBlacklistStates[_account] = _balance;\n }\n\n /**\n * @inheritdoc Blacklistable\n */\n function _isBlacklisted(address _account)\n internal\n virtual\n override\n view\n returns (bool)\n {\n return _deprecatedBlacklisted[_account];\n }\n\n /**\n * @dev Helper method to obtain the balance of an account.\n * @param _account The address of the account.\n * @return The fiat token balance of the account.\n */\n function _balanceOf(address _account)\n internal\n virtual\n view\n returns (uint256)\n {\n return balanceAndBlacklistStates[_account];\n }\n}\n","keccak256":"0xa2358c0efe02241715621634243f8ee2b9d3543f4fdcc460fbbf34484e6db02c","license":"Apache-2.0"},"contracts/v1/Ownable.sol":{"content":"/**\n * SPDX-License-Identifier: MIT\n *\n * Copyright (c) 2018 zOS Global Limited.\n * Copyright (c) 2018-2020 CENTRE SECZ\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\npragma solidity 0.6.12;\n\n/**\n * @notice The Ownable contract has an owner address, and provides basic\n * authorization control functions\n * @dev Forked from https://github.com/OpenZeppelin/openzeppelin-labs/blob/3887ab77b8adafba4a26ace002f3a684c1a3388b/upgradeability_ownership/contracts/ownership/Ownable.sol\n * Modifications:\n * 1. Consolidate OwnableStorage into this contract (7/13/18)\n * 2. Reformat, conform to Solidity 0.6 syntax, and add error messages (5/13/20)\n * 3. Make public functions external (5/27/20)\n */\ncontract Ownable {\n // Owner of the contract\n address private _owner;\n\n /**\n * @dev Event to show ownership has been transferred\n * @param previousOwner representing the address of the previous owner\n * @param newOwner representing the address of the new owner\n */\n event OwnershipTransferred(address previousOwner, address newOwner);\n\n /**\n * @dev The constructor sets the original owner of the contract to the sender account.\n */\n constructor() public {\n setOwner(msg.sender);\n }\n\n /**\n * @dev Tells the address of the owner\n * @return the address of the owner\n */\n function owner() external view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Sets a new owner address\n */\n function setOwner(address newOwner) internal {\n _owner = newOwner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == _owner, \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param newOwner The address to transfer ownership to.\n */\n function transferOwnership(address newOwner) external onlyOwner {\n require(\n newOwner != address(0),\n \"Ownable: new owner is the zero address\"\n );\n emit OwnershipTransferred(_owner, newOwner);\n setOwner(newOwner);\n }\n}\n","keccak256":"0xdd51a06c4d6c38ef806c50463ade63123980334bf173c3301794e242228fc9e5","license":"MIT"},"contracts/v1/Pausable.sol":{"content":"/**\n * SPDX-License-Identifier: MIT\n *\n * Copyright (c) 2016 Smart Contract Solutions, Inc.\n * Copyright (c) 2018-2020 CENTRE SECZ\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\npragma solidity 0.6.12;\n\nimport { Ownable } from \"./Ownable.sol\";\n\n/**\n * @notice Base contract which allows children to implement an emergency stop\n * mechanism\n * @dev Forked from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/feb665136c0dae9912e08397c1a21c4af3651ef3/contracts/lifecycle/Pausable.sol\n * Modifications:\n * 1. Added pauser role, switched pause/unpause to be onlyPauser (6/14/2018)\n * 2. Removed whenNotPause/whenPaused from pause/unpause (6/14/2018)\n * 3. Removed whenPaused (6/14/2018)\n * 4. Switches ownable library to use ZeppelinOS (7/12/18)\n * 5. Remove constructor (7/13/18)\n * 6. Reformat, conform to Solidity 0.6 syntax and add error messages (5/13/20)\n * 7. Make public functions external (5/27/20)\n */\ncontract Pausable is Ownable {\n event Pause();\n event Unpause();\n event PauserChanged(address indexed newAddress);\n\n address public pauser;\n bool public paused = false;\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n */\n modifier whenNotPaused() {\n require(!paused, \"Pausable: paused\");\n _;\n }\n\n /**\n * @dev throws if called by any account other than the pauser\n */\n modifier onlyPauser() {\n require(msg.sender == pauser, \"Pausable: caller is not the pauser\");\n _;\n }\n\n /**\n * @dev called by the owner to pause, triggers stopped state\n */\n function pause() external onlyPauser {\n paused = true;\n emit Pause();\n }\n\n /**\n * @dev called by the owner to unpause, returns to normal state\n */\n function unpause() external onlyPauser {\n paused = false;\n emit Unpause();\n }\n\n /**\n * @notice Updates the pauser address.\n * @param _newPauser The address of the new pauser.\n */\n function updatePauser(address _newPauser) external onlyOwner {\n require(\n _newPauser != address(0),\n \"Pausable: new pauser is the zero address\"\n );\n pauser = _newPauser;\n emit PauserChanged(pauser);\n }\n}\n","keccak256":"0xa1112323b001871746d971f9dd2c61d094ea856146071537dc9d92e18e8cc829","license":"MIT"},"contracts/v2/AbstractFiatTokenV2.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { AbstractFiatTokenV1 } from \"../v1/AbstractFiatTokenV1.sol\";\n\nabstract contract AbstractFiatTokenV2 is AbstractFiatTokenV1 {\n function _increaseAllowance(\n address owner,\n address spender,\n uint256 increment\n ) internal virtual;\n\n function _decreaseAllowance(\n address owner,\n address spender,\n uint256 decrement\n ) internal virtual;\n}\n","keccak256":"0x7e1eb0a11b5b8fec8bf8f49686f7b77c5e1bfed5c963ac4ef63f5d0cdd5a6af2","license":"Apache-2.0"},"contracts/v2/EIP2612.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { AbstractFiatTokenV2 } from \"./AbstractFiatTokenV2.sol\";\nimport { EIP712Domain } from \"./EIP712Domain.sol\";\nimport { MessageHashUtils } from \"../util/MessageHashUtils.sol\";\nimport { SignatureChecker } from \"../util/SignatureChecker.sol\";\n\n/**\n * @title EIP-2612\n * @notice Provide internal implementation for gas-abstracted approvals\n */\nabstract contract EIP2612 is AbstractFiatTokenV2, EIP712Domain {\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\")\n bytes32\n public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\n\n mapping(address => uint256) private _permitNonces;\n\n /**\n * @notice Nonces for permit\n * @param owner Token owner's address (Authorizer)\n * @return Next nonce\n */\n function nonces(address owner) external view returns (uint256) {\n return _permitNonces[owner];\n }\n\n /**\n * @notice Verify a signed approval permit and execute if valid\n * @param owner Token owner's address (Authorizer)\n * @param spender Spender's address\n * @param value Amount of allowance\n * @param deadline The time at which the signature expires (unix time), or max uint256 value to signal no expiration\n * @param v v of the signature\n * @param r r of the signature\n * @param s s of the signature\n */\n function _permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n _permit(owner, spender, value, deadline, abi.encodePacked(r, s, v));\n }\n\n /**\n * @notice Verify a signed approval permit and execute if valid\n * @dev EOA wallet signatures should be packed in the order of r, s, v.\n * @param owner Token owner's address (Authorizer)\n * @param spender Spender's address\n * @param value Amount of allowance\n * @param deadline The time at which the signature expires (unix time), or max uint256 value to signal no expiration\n * @param signature Signature byte array signed by an EOA wallet or a contract wallet\n */\n function _permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n bytes memory signature\n ) internal {\n require(\n deadline == type(uint256).max || deadline >= now,\n \"FiatTokenV2: permit is expired\"\n );\n\n bytes32 typedDataHash = MessageHashUtils.toTypedDataHash(\n _domainSeparator(),\n keccak256(\n abi.encode(\n PERMIT_TYPEHASH,\n owner,\n spender,\n value,\n _permitNonces[owner]++,\n deadline\n )\n )\n );\n require(\n SignatureChecker.isValidSignatureNow(\n owner,\n typedDataHash,\n signature\n ),\n \"EIP2612: invalid signature\"\n );\n\n _approve(owner, spender, value);\n }\n}\n","keccak256":"0x9768fbec035e480ff4a7442132e897b6abb69789e07227375b9e759144c89adc","license":"Apache-2.0"},"contracts/v2/EIP3009.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { AbstractFiatTokenV2 } from \"./AbstractFiatTokenV2.sol\";\nimport { EIP712Domain } from \"./EIP712Domain.sol\";\nimport { SignatureChecker } from \"../util/SignatureChecker.sol\";\nimport { MessageHashUtils } from \"../util/MessageHashUtils.sol\";\n\n/**\n * @title EIP-3009\n * @notice Provide internal implementation for gas-abstracted transfers\n * @dev Contracts that inherit from this must wrap these with publicly\n * accessible functions, optionally adding modifiers where necessary\n */\nabstract contract EIP3009 is AbstractFiatTokenV2, EIP712Domain {\n // keccak256(\"TransferWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)\")\n bytes32\n public constant TRANSFER_WITH_AUTHORIZATION_TYPEHASH = 0x7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267;\n\n // keccak256(\"ReceiveWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)\")\n bytes32\n public constant RECEIVE_WITH_AUTHORIZATION_TYPEHASH = 0xd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de8;\n\n // keccak256(\"CancelAuthorization(address authorizer,bytes32 nonce)\")\n bytes32\n public constant CANCEL_AUTHORIZATION_TYPEHASH = 0x158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a1597429;\n\n /**\n * @dev authorizer address => nonce => bool (true if nonce is used)\n */\n mapping(address => mapping(bytes32 => bool)) private _authorizationStates;\n\n event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce);\n event AuthorizationCanceled(\n address indexed authorizer,\n bytes32 indexed nonce\n );\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)\n external\n view\n returns (bool)\n {\n return _authorizationStates[authorizer][nonce];\n }\n\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 ) internal {\n _transferWithAuthorization(\n from,\n to,\n value,\n validAfter,\n validBefore,\n nonce,\n abi.encodePacked(r, s, v)\n );\n }\n\n /**\n * @notice Execute a transfer with a signed authorization\n * @dev EOA wallet signatures should be packed in the order of r, s, v.\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 signature Signature byte array produced by an EOA wallet or a contract wallet\n */\n function _transferWithAuthorization(\n address from,\n address to,\n uint256 value,\n uint256 validAfter,\n uint256 validBefore,\n bytes32 nonce,\n bytes memory signature\n ) internal {\n _requireValidAuthorization(from, nonce, validAfter, validBefore);\n _requireValidSignature(\n from,\n keccak256(\n abi.encode(\n TRANSFER_WITH_AUTHORIZATION_TYPEHASH,\n from,\n to,\n value,\n validAfter,\n validBefore,\n nonce\n )\n ),\n signature\n );\n\n _markAuthorizationAsUsed(from, nonce);\n _transfer(from, to, value);\n }\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 ) internal {\n _receiveWithAuthorization(\n from,\n to,\n value,\n validAfter,\n validBefore,\n nonce,\n abi.encodePacked(r, s, v)\n );\n }\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 * EOA wallet signatures should be packed in the order of r, s, v.\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 signature Signature byte array produced by an EOA wallet or a contract wallet\n */\n function _receiveWithAuthorization(\n address from,\n address to,\n uint256 value,\n uint256 validAfter,\n uint256 validBefore,\n bytes32 nonce,\n bytes memory signature\n ) internal {\n require(to == msg.sender, \"FiatTokenV2: caller must be the payee\");\n _requireValidAuthorization(from, nonce, validAfter, validBefore);\n _requireValidSignature(\n from,\n keccak256(\n abi.encode(\n RECEIVE_WITH_AUTHORIZATION_TYPEHASH,\n from,\n to,\n value,\n validAfter,\n validBefore,\n nonce\n )\n ),\n signature\n );\n\n _markAuthorizationAsUsed(from, nonce);\n _transfer(from, to, value);\n }\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 ) internal {\n _cancelAuthorization(authorizer, nonce, abi.encodePacked(r, s, v));\n }\n\n /**\n * @notice Attempt to cancel an authorization\n * @dev EOA wallet signatures should be packed in the order of r, s, v.\n * @param authorizer Authorizer's address\n * @param nonce Nonce of the authorization\n * @param signature Signature byte array produced by an EOA wallet or a contract wallet\n */\n function _cancelAuthorization(\n address authorizer,\n bytes32 nonce,\n bytes memory signature\n ) internal {\n _requireUnusedAuthorization(authorizer, nonce);\n _requireValidSignature(\n authorizer,\n keccak256(\n abi.encode(CANCEL_AUTHORIZATION_TYPEHASH, authorizer, nonce)\n ),\n signature\n );\n\n _authorizationStates[authorizer][nonce] = true;\n emit AuthorizationCanceled(authorizer, nonce);\n }\n\n /**\n * @notice Validates that signature against input data struct\n * @param signer Signer's address\n * @param dataHash Hash of encoded data struct\n * @param signature Signature byte array produced by an EOA wallet or a contract wallet\n */\n function _requireValidSignature(\n address signer,\n bytes32 dataHash,\n bytes memory signature\n ) private view {\n require(\n SignatureChecker.isValidSignatureNow(\n signer,\n MessageHashUtils.toTypedDataHash(_domainSeparator(), dataHash),\n signature\n ),\n \"FiatTokenV2: invalid signature\"\n );\n }\n\n /**\n * @notice Check that an authorization is unused\n * @param authorizer Authorizer's address\n * @param nonce Nonce of the authorization\n */\n function _requireUnusedAuthorization(address authorizer, bytes32 nonce)\n private\n view\n {\n require(\n !_authorizationStates[authorizer][nonce],\n \"FiatTokenV2: authorization is used or canceled\"\n );\n }\n\n /**\n * @notice Check that authorization is valid\n * @param authorizer Authorizer's address\n * @param nonce Nonce of the authorization\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 */\n function _requireValidAuthorization(\n address authorizer,\n bytes32 nonce,\n uint256 validAfter,\n uint256 validBefore\n ) private view {\n require(\n now > validAfter,\n \"FiatTokenV2: authorization is not yet valid\"\n );\n require(now < validBefore, \"FiatTokenV2: authorization is expired\");\n _requireUnusedAuthorization(authorizer, nonce);\n }\n\n /**\n * @notice Mark an authorization as used\n * @param authorizer Authorizer's address\n * @param nonce Nonce of the authorization\n */\n function _markAuthorizationAsUsed(address authorizer, bytes32 nonce)\n private\n {\n _authorizationStates[authorizer][nonce] = true;\n emit AuthorizationUsed(authorizer, nonce);\n }\n}\n","keccak256":"0x1371920e9153902b440ac34458470e4a4303c220d43ab3239f557f1cfc75f116","license":"Apache-2.0"},"contracts/v2/EIP712Domain.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\n// solhint-disable func-name-mixedcase\n\n/**\n * @title EIP712 Domain\n */\ncontract EIP712Domain {\n // was originally DOMAIN_SEPARATOR\n // but that has been moved to a method so we can override it in V2_2+\n bytes32 internal _DEPRECATED_CACHED_DOMAIN_SEPARATOR;\n\n /**\n * @notice Get the EIP712 Domain Separator.\n * @return The bytes32 EIP712 domain separator.\n */\n function DOMAIN_SEPARATOR() external view returns (bytes32) {\n return _domainSeparator();\n }\n\n /**\n * @dev Internal method to get the EIP712 Domain Separator.\n * @return The bytes32 EIP712 domain separator.\n */\n function _domainSeparator() internal virtual view returns (bytes32) {\n return _DEPRECATED_CACHED_DOMAIN_SEPARATOR;\n }\n}\n","keccak256":"0x28f2aef6d4a18c01ebeffa3ceeae5fa4a1d9907229bca3dae8090fdf577cc509","license":"Apache-2.0"},"contracts/v2/FiatTokenV2.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { FiatTokenV1_1 } from \"../v1.1/FiatTokenV1_1.sol\";\nimport { EIP712 } from \"../util/EIP712.sol\";\nimport { EIP3009 } from \"./EIP3009.sol\";\nimport { EIP2612 } from \"./EIP2612.sol\";\n\n/**\n * @title FiatToken V2\n * @notice ERC20 Token backed by fiat reserves, version 2\n */\ncontract FiatTokenV2 is FiatTokenV1_1, EIP3009, EIP2612 {\n uint8 internal _initializedVersion;\n\n /**\n * @notice Initialize v2\n * @param newName New token name\n */\n function initializeV2(string calldata newName) external {\n // solhint-disable-next-line reason-string\n require(initialized && _initializedVersion == 0);\n name = newName;\n _DEPRECATED_CACHED_DOMAIN_SEPARATOR = EIP712.makeDomainSeparator(\n newName,\n \"2\"\n );\n _initializedVersion = 1;\n }\n\n /**\n * @notice Increase the allowance by a given increment\n * @param spender Spender's address\n * @param increment Amount of increase in allowance\n * @return True if successful\n */\n function increaseAllowance(address spender, uint256 increment)\n external\n virtual\n whenNotPaused\n notBlacklisted(msg.sender)\n notBlacklisted(spender)\n returns (bool)\n {\n _increaseAllowance(msg.sender, spender, increment);\n return true;\n }\n\n /**\n * @notice Decrease the allowance by a given decrement\n * @param spender Spender's address\n * @param decrement Amount of decrease in allowance\n * @return True if successful\n */\n function decreaseAllowance(address spender, uint256 decrement)\n external\n virtual\n whenNotPaused\n notBlacklisted(msg.sender)\n notBlacklisted(spender)\n returns (bool)\n {\n _decreaseAllowance(msg.sender, spender, decrement);\n return true;\n }\n\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 whenNotPaused notBlacklisted(from) notBlacklisted(to) {\n _transferWithAuthorization(\n from,\n to,\n value,\n validAfter,\n validBefore,\n nonce,\n v,\n r,\n s\n );\n }\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 whenNotPaused notBlacklisted(from) notBlacklisted(to) {\n _receiveWithAuthorization(\n from,\n to,\n value,\n validAfter,\n validBefore,\n nonce,\n v,\n r,\n s\n );\n }\n\n /**\n * @notice Attempt to cancel an authorization\n * @dev Works only if the authorization is not yet used.\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 whenNotPaused {\n _cancelAuthorization(authorizer, nonce, v, r, s);\n }\n\n /**\n * @notice Update allowance with a signed permit\n * @param owner Token owner's address (Authorizer)\n * @param spender Spender's address\n * @param value Amount of allowance\n * @param deadline The time at which the signature expires (unix time), or max uint256 value to signal no expiration\n * @param v v of the signature\n * @param r r of the signature\n * @param s s of the signature\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n )\n external\n virtual\n whenNotPaused\n notBlacklisted(owner)\n notBlacklisted(spender)\n {\n _permit(owner, spender, value, deadline, v, r, s);\n }\n\n /**\n * @dev Internal function to increase the allowance by a given increment\n * @param owner Token owner's address\n * @param spender Spender's address\n * @param increment Amount of increase\n */\n function _increaseAllowance(\n address owner,\n address spender,\n uint256 increment\n ) internal override {\n _approve(owner, spender, allowed[owner][spender].add(increment));\n }\n\n /**\n * @dev Internal function to decrease the allowance by a given decrement\n * @param owner Token owner's address\n * @param spender Spender's address\n * @param decrement Amount of decrease\n */\n function _decreaseAllowance(\n address owner,\n address spender,\n uint256 decrement\n ) internal override {\n _approve(\n owner,\n spender,\n allowed[owner][spender].sub(\n decrement,\n \"ERC20: decreased allowance below zero\"\n )\n );\n }\n}\n","keccak256":"0x64d8d5a86dc14b15686862b129aa5954c14d963fc6cc183b74e2831b0d37720a","license":"Apache-2.0"},"contracts/v2/FiatTokenV2_1.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { FiatTokenV2 } from \"./FiatTokenV2.sol\";\n\n// solhint-disable func-name-mixedcase\n\n/**\n * @title FiatToken V2.1\n * @notice ERC20 Token backed by fiat reserves, version 2.1\n */\ncontract FiatTokenV2_1 is FiatTokenV2 {\n /**\n * @notice Initialize v2.1\n * @param lostAndFound The address to which the locked funds are sent\n */\n function initializeV2_1(address lostAndFound) external {\n // solhint-disable-next-line reason-string\n require(_initializedVersion == 1);\n\n uint256 lockedAmount = _balanceOf(address(this));\n if (lockedAmount > 0) {\n _transfer(address(this), lostAndFound, lockedAmount);\n }\n _blacklist(address(this));\n\n _initializedVersion = 2;\n }\n\n /**\n * @notice Version string for the EIP712 domain separator\n * @return Version string\n */\n function version() external pure returns (string memory) {\n return \"2\";\n }\n}\n","keccak256":"0xa90a1d0d0ca22b94db27a172e753c9446bbad0bec5db59292e5a709acb57a7ca","license":"Apache-2.0"},"contracts/v2/FiatTokenV2_2.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { EIP712Domain } from \"./EIP712Domain.sol\"; // solhint-disable-line no-unused-import\nimport { Blacklistable } from \"../v1/Blacklistable.sol\"; // solhint-disable-line no-unused-import\nimport { FiatTokenV1 } from \"../v1/FiatTokenV1.sol\"; // solhint-disable-line no-unused-import\nimport { FiatTokenV2 } from \"./FiatTokenV2.sol\"; // solhint-disable-line no-unused-import\nimport { FiatTokenV2_1 } from \"./FiatTokenV2_1.sol\";\nimport { EIP712 } from \"../util/EIP712.sol\";\n\n// solhint-disable func-name-mixedcase\n\n/**\n * @title FiatToken V2.2\n * @notice ERC20 Token backed by fiat reserves, version 2.2\n */\ncontract FiatTokenV2_2 is FiatTokenV2_1 {\n /**\n * @notice Initialize v2.2\n * @param accountsToBlacklist A list of accounts to migrate from the old blacklist\n * @param newSymbol New token symbol\n * data structure to the new blacklist data structure.\n */\n function initializeV2_2(\n address[] calldata accountsToBlacklist,\n string calldata newSymbol\n ) external {\n // solhint-disable-next-line reason-string\n require(_initializedVersion == 2);\n\n // Update fiat token symbol\n symbol = newSymbol;\n\n // Add previously blacklisted accounts to the new blacklist data structure\n // and remove them from the old blacklist data structure.\n for (uint256 i = 0; i < accountsToBlacklist.length; i++) {\n require(\n _deprecatedBlacklisted[accountsToBlacklist[i]],\n \"FiatTokenV2_2: Blacklisting previously unblacklisted account!\"\n );\n _blacklist(accountsToBlacklist[i]);\n delete _deprecatedBlacklisted[accountsToBlacklist[i]];\n }\n _blacklist(address(this));\n delete _deprecatedBlacklisted[address(this)];\n\n _initializedVersion = 3;\n }\n\n /**\n * @dev Internal function to get the current chain id.\n * @return The current chain id.\n */\n function _chainId() internal virtual view returns (uint256) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n\n /**\n * @inheritdoc EIP712Domain\n */\n function _domainSeparator() internal override view returns (bytes32) {\n return EIP712.makeDomainSeparator(name, \"2\", _chainId());\n }\n\n /**\n * @notice Update allowance with a signed permit\n * @dev EOA wallet signatures should be packed in the order of r, s, v.\n * @param owner Token owner's address (Authorizer)\n * @param spender Spender's address\n * @param value Amount of allowance\n * @param deadline The time at which the signature expires (unix time), or max uint256 value to signal no expiration\n * @param signature Signature bytes signed by an EOA wallet or a contract wallet\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n bytes memory signature\n ) external whenNotPaused {\n _permit(owner, spender, value, deadline, signature);\n }\n\n /**\n * @notice Execute a transfer with a signed authorization\n * @dev EOA wallet signatures should be packed in the order of r, s, v.\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 signature Signature bytes signed by an EOA wallet or a contract wallet\n */\n function transferWithAuthorization(\n address from,\n address to,\n uint256 value,\n uint256 validAfter,\n uint256 validBefore,\n bytes32 nonce,\n bytes memory signature\n ) external whenNotPaused notBlacklisted(from) notBlacklisted(to) {\n _transferWithAuthorization(\n from,\n to,\n value,\n validAfter,\n validBefore,\n nonce,\n signature\n );\n }\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 * EOA wallet signatures should be packed in the order of r, s, v.\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 signature Signature bytes signed by an EOA wallet or a contract wallet\n */\n function receiveWithAuthorization(\n address from,\n address to,\n uint256 value,\n uint256 validAfter,\n uint256 validBefore,\n bytes32 nonce,\n bytes memory signature\n ) external whenNotPaused notBlacklisted(from) notBlacklisted(to) {\n _receiveWithAuthorization(\n from,\n to,\n value,\n validAfter,\n validBefore,\n nonce,\n signature\n );\n }\n\n /**\n * @notice Attempt to cancel an authorization\n * @dev Works only if the authorization is not yet used.\n * EOA wallet signatures should be packed in the order of r, s, v.\n * @param authorizer Authorizer's address\n * @param nonce Nonce of the authorization\n * @param signature Signature bytes signed by an EOA wallet or a contract wallet\n */\n function cancelAuthorization(\n address authorizer,\n bytes32 nonce,\n bytes memory signature\n ) external whenNotPaused {\n _cancelAuthorization(authorizer, nonce, signature);\n }\n\n /**\n * @dev Helper method that sets the blacklist state of an account on balanceAndBlacklistStates.\n * If _shouldBlacklist is true, we apply a (1 << 255) bitmask with an OR operation on the\n * account's balanceAndBlacklistState. This flips the high bit for the account to 1,\n * indicating that the account is blacklisted.\n *\n * If _shouldBlacklist if false, we reset the account's balanceAndBlacklistStates to their\n * balances. This clears the high bit for the account, indicating that the account is unblacklisted.\n * @param _account The address of the account.\n * @param _shouldBlacklist True if the account should be blacklisted, false if the account should be unblacklisted.\n */\n function _setBlacklistState(address _account, bool _shouldBlacklist)\n internal\n override\n {\n balanceAndBlacklistStates[_account] = _shouldBlacklist\n ? balanceAndBlacklistStates[_account] | (1 << 255)\n : _balanceOf(_account);\n }\n\n /**\n * @dev Helper method that sets the balance of an account on balanceAndBlacklistStates.\n * Since balances are stored in the last 255 bits of the balanceAndBlacklistStates value,\n * we need to ensure that the updated balance does not exceed (2^255 - 1).\n * Since blacklisted accounts' balances cannot be updated, the method will also\n * revert if the account is blacklisted\n * @param _account The address of the account.\n * @param _balance The new fiat token balance of the account (max: (2^255 - 1)).\n */\n function _setBalance(address _account, uint256 _balance) internal override {\n require(\n _balance <= ((1 << 255) - 1),\n \"FiatTokenV2_2: Balance exceeds (2^255 - 1)\"\n );\n require(\n !_isBlacklisted(_account),\n \"FiatTokenV2_2: Account is blacklisted\"\n );\n\n balanceAndBlacklistStates[_account] = _balance;\n }\n\n /**\n * @inheritdoc Blacklistable\n */\n function _isBlacklisted(address _account)\n internal\n override\n view\n returns (bool)\n {\n return balanceAndBlacklistStates[_account] >> 255 == 1;\n }\n\n /**\n * @dev Helper method to obtain the balance of an account. Since balances\n * are stored in the last 255 bits of the balanceAndBlacklistStates value,\n * we apply a ((1 << 255) - 1) bit bitmask with an AND operation on the\n * balanceAndBlacklistState to obtain the balance.\n * @param _account The address of the account.\n * @return The fiat token balance of the account.\n */\n function _balanceOf(address _account)\n internal\n override\n view\n returns (uint256)\n {\n return balanceAndBlacklistStates[_account] & ((1 << 255) - 1);\n }\n\n /**\n * @inheritdoc FiatTokenV1\n */\n function approve(address spender, uint256 value)\n external\n override\n whenNotPaused\n returns (bool)\n {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n /**\n * @inheritdoc FiatTokenV2\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external override whenNotPaused {\n _permit(owner, spender, value, deadline, v, r, s);\n }\n\n /**\n * @inheritdoc FiatTokenV2\n */\n function increaseAllowance(address spender, uint256 increment)\n external\n override\n whenNotPaused\n returns (bool)\n {\n _increaseAllowance(msg.sender, spender, increment);\n return true;\n }\n\n /**\n * @inheritdoc FiatTokenV2\n */\n function decreaseAllowance(address spender, uint256 decrement)\n external\n override\n whenNotPaused\n returns (bool)\n {\n _decreaseAllowance(msg.sender, spender, decrement);\n return true;\n }\n}\n","keccak256":"0x47e08bb1ad5f248cec3c09a79e70132a2093a30cd9effc0ed3a0fdb1646cf394","license":"Apache-2.0"}},"version":1} \ No newline at end of file diff --git a/verification_artifacts/SignatureChecker.json b/verification_artifacts/SignatureChecker.json new file mode 100644 index 000000000..81e484414 --- /dev/null +++ b/verification_artifacts/SignatureChecker.json @@ -0,0 +1 @@ +{"compiler":{"version":"0.6.12+commit.27d51765"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"bytes32","name":"digest","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isValidSignatureNow","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}],"devdoc":{"details":"Signature verification helper that can be used instead of `ECRecover.recover` to seamlessly support both ECDSA signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets. Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/21bb89ef5bfc789b9333eb05e3ba2b7b284ac77c/contracts/utils/cryptography/SignatureChecker.sol","kind":"dev","methods":{"isValidSignatureNow(address,bytes32,bytes)":{"details":"Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECRecover.recover`.","params":{"digest":"Keccak-256 hash digest of the signed message","signature":"Signature byte array associated with hash","signer":"Address of the claimed signer"}}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"contracts/util/SignatureChecker.sol":"SignatureChecker"},"evmVersion":"istanbul","libraries":{},"metadata":{"bytecodeHash":"ipfs","useLiteralContent":true},"optimizer":{"enabled":true,"runs":10000000},"remappings":[]},"sources":{"contracts/interface/IERC1271.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with the provided data hash\n * @return magicValue bytes4 magic value 0x1626ba7e when function passes\n */\n function isValidSignature(bytes32 hash, bytes memory signature)\n external\n view\n returns (bytes4 magicValue);\n}\n","keccak256":"0x8accb9f93dcd398e5c84cb80010de808cf5092cebfa823b3d7c4b8e5b2bcf672","license":"Apache-2.0"},"contracts/util/ECRecover.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\n/**\n * @title ECRecover\n * @notice A library that provides a safe ECDSA recovery function\n */\nlibrary ECRecover {\n /**\n * @notice Recover signer's address from a signed message\n * @dev Adapted from: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/65e4ffde586ec89af3b7e9140bdc9235d1254853/contracts/cryptography/ECDSA.sol\n * Modifications: Accept v, r, and s as separate arguments\n * @param digest Keccak-256 hash digest of the signed message\n * @param v v of the signature\n * @param r r of the signature\n * @param s s of the signature\n * @return Signer address\n */\n function recover(\n bytes32 digest,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) 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 \u00f7 2 + 1, and for v in (282): v \u2208 {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 if (\n uint256(s) >\n 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0\n ) {\n revert(\"ECRecover: invalid signature 's' value\");\n }\n\n if (v != 27 && v != 28) {\n revert(\"ECRecover: invalid signature 'v' value\");\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(digest, v, r, s);\n require(signer != address(0), \"ECRecover: invalid signature\");\n\n return signer;\n }\n\n /**\n * @notice Recover signer's address from a signed message\n * @dev Adapted from: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/0053ee040a7ff1dbc39691c9e67a69f564930a88/contracts/utils/cryptography/ECDSA.sol\n * @param digest Keccak-256 hash digest of the signed message\n * @param signature Signature byte array associated with hash\n * @return Signer address\n */\n function recover(bytes32 digest, bytes memory signature)\n internal\n pure\n returns (address)\n {\n require(signature.length == 65, \"ECRecover: invalid signature length\");\n\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 /// @solidity memory-safe-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 return recover(digest, v, r, s);\n }\n}\n","keccak256":"0xedf59af6c5998f9e4b0791cd79122a759a1d80a38453053df77838914dd1294d","license":"Apache-2.0"},"contracts/util/SignatureChecker.sol":{"content":"/**\n * Copyright 2023 Circle Internet Financial, LTD. All rights reserved.\n *\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npragma solidity 0.6.12;\n\nimport { ECRecover } from \"./ECRecover.sol\";\nimport { IERC1271 } from \"../interface/IERC1271.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECRecover.recover` to seamlessly support both ECDSA\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets.\n *\n * Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/21bb89ef5bfc789b9333eb05e3ba2b7b284ac77c/contracts/utils/cryptography/SignatureChecker.sol\n */\nlibrary SignatureChecker {\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECRecover.recover`.\n * @param signer Address of the claimed signer\n * @param digest Keccak-256 hash digest of the signed message\n * @param signature Signature byte array associated with hash\n */\n function isValidSignatureNow(\n address signer,\n bytes32 digest,\n bytes memory signature\n ) external view returns (bool) {\n if (!isContract(signer)) {\n return ECRecover.recover(digest, signature) == signer;\n }\n return isValidERC1271SignatureNow(signer, digest, signature);\n }\n\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\n * against the signer smart contract using ERC1271.\n * @param signer Address of the claimed signer\n * @param digest Keccak-256 hash digest of the signed message\n * @param signature Signature byte array associated with hash\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidERC1271SignatureNow(\n address signer,\n bytes32 digest,\n bytes memory signature\n ) internal view returns (bool) {\n (bool success, bytes memory result) = signer.staticcall(\n abi.encodeWithSelector(\n IERC1271.isValidSignature.selector,\n digest,\n signature\n )\n );\n return (success &&\n result.length >= 32 &&\n abi.decode(result, (bytes32)) ==\n bytes32(IERC1271.isValidSignature.selector));\n }\n\n /**\n * @dev Checks if the input address is a smart contract.\n */\n function isContract(address addr) internal view returns (bool) {\n uint256 size;\n assembly {\n size := extcodesize(addr)\n }\n return size > 0;\n }\n}\n","keccak256":"0x89181a5d7440ce21492c5023ab98357c76e3de81ffc376dfda3983997a70728a","license":"Apache-2.0"}},"version":1} \ No newline at end of file diff --git a/verification_artifacts/input.json b/verification_artifacts/input.json new file mode 100644 index 000000000..44985c1ca --- /dev/null +++ b/verification_artifacts/input.json @@ -0,0 +1,15 @@ +{ + "SignatureChecker": { + "contractAddress": "0x567d89B23ECa0FEd9572c8C15D836b000b2B27eC", + "contractCreationTxHash": "0x4bd38d799d5323873daaa42c60c3aa155f794c88bbb8e9f6f09d4ce14bc97ea9" + }, + "FiatTokenV2_2": { + "contractAddress": "0x0bD2dDddb088703F139a6d5a1dF0A25120607907", + "contractCreationTxHash": "0x672ea2fe575875c0b649b7768c0587ef64efae434812792095a21cd3ada0f208" + }, + "FiatTokenProxy": { + "contractAddress": "0xdBe060aAF22aE343C19A3Be553ddE0623125e552", + "contractCreationTxHash": "0x581c47f397166669683f1d952642519f624134a0f6d8a6c0d4ceb7daa9ac04ea" + }, + "rpcUrl": "https://evm-rpc.testnet-1.nibiru.fi" +}