From 18e01b5766b24585ec146a2908f178e7e0373858 Mon Sep 17 00:00:00 2001 From: Rodion Kharabet Date: Mon, 7 Aug 2023 13:59:09 +0300 Subject: [PATCH 1/8] Add FTM Fantom Opera mainnet --- src/sourcify-chains.ts | 9 +- test/chains/chain-tests.js | 9 + test/chains/sources/250/FUSDToken.sol | 18 ++ test/chains/sources/250/metadata.json | 424 ++++++++++++++++++++++++++ 4 files changed, 458 insertions(+), 2 deletions(-) create mode 100644 test/chains/sources/250/FUSDToken.sol create mode 100644 test/chains/sources/250/metadata.json diff --git a/src/sourcify-chains.ts b/src/sourcify-chains.ts index 6c84f571f..b1323b6a0 100644 --- a/src/sourcify-chains.ts +++ b/src/sourcify-chains.ts @@ -957,10 +957,15 @@ const sourcifyChainsExtensions: SourcifyChainsExtensionsObject = { // Edgeware EdgeEVM Mainnet supported: true, monitored: false, - contractFetchAddress: - "https://edgscan.live/" + BLOCKSCOUT_SUFFIX, txRegex: getBlockscoutRegex(), }, + "250": { + // FTM Fantom Opera Mainnet + supported: true, + monitored: false, + contractFetchAddress: "https://fantom.dex.guru/" + ETHERSCAN_SUFFIX, + txRegex: ETHERSCAN_REGEX, + }, }; const sourcifyChainsMap: SourcifyChainMap = {}; diff --git a/test/chains/chain-tests.js b/test/chains/chain-tests.js index ea65d15d5..04d453ad4 100644 --- a/test/chains/chain-tests.js +++ b/test/chains/chain-tests.js @@ -1016,6 +1016,15 @@ describe("Test Supported Chains", function () { "shared/1_Storage.metadata.json" ); + // FTM Fantom Opera Mainnet + verifyContract( + "0xAd84341756Bf337f5a0164515b1f6F993D194E1f", + "250", + "Fantom Opera", + ["250/FUSDToken.sol"], + "250/metadata.json" + ); + // Finally check if all the "supported: true" chains have been tested it("should have tested all supported chains", function (done) { if (newAddedChainId) { diff --git a/test/chains/sources/250/FUSDToken.sol b/test/chains/sources/250/FUSDToken.sol new file mode 100644 index 000000000..38d27e756 --- /dev/null +++ b/test/chains/sources/250/FUSDToken.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.5.0; + +import "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol"; +import "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol"; +import "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol"; +import "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol"; + +/** + * Implements ERC20 fUSD tokens using OpenZeppelin libraries. + */ +contract FUSDToken is ERC20, ERC20Detailed, ERC20Mintable, ERC20Burnable, ERC20Pausable { + // create instance of the fUSD token + constructor () public ERC20Detailed("Fantom StableCoin USD", "FUSD", 18) { + // mint single token to begin with? + } +} diff --git a/test/chains/sources/250/metadata.json b/test/chains/sources/250/metadata.json new file mode 100644 index 000000000..65201faef --- /dev/null +++ b/test/chains/sources/250/metadata.json @@ -0,0 +1,424 @@ +{ + "compiler": { "version": "0.5.0+commit.1d4f565a" }, + "language": "Solidity", + "output": { + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [{ "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "spender", "type": "address" }, + { "name": "value", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [{ "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "from", "type": "address" }, + { "name": "to", "type": "address" }, + { "name": "value", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [{ "name": "", "type": "uint8" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "spender", "type": "address" }, + { "name": "addedValue", "type": "uint256" } + ], + "name": "increaseAllowance", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "unpause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "account", "type": "address" }, + { "name": "amount", "type": "uint256" } + ], + "name": "mint", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "name": "amount", "type": "uint256" }], + "name": "burn", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "account", "type": "address" }], + "name": "isPauser", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "paused", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renouncePauser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "account", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "account", "type": "address" }, + { "name": "amount", "type": "uint256" } + ], + "name": "burnFrom", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "name": "account", "type": "address" }], + "name": "addPauser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "pause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [{ "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "name": "account", "type": "address" }], + "name": "addMinter", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceMinter", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "spender", "type": "address" }, + { "name": "subtractedValue", "type": "uint256" } + ], + "name": "decreaseAllowance", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "to", "type": "address" }, + { "name": "value", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "account", "type": "address" }], + "name": "isMinter", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "name": "owner", "type": "address" }, + { "name": "spender", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "name": "account", "type": "address" }], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "name": "account", "type": "address" }], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": true, "name": "account", "type": "address" }], + "name": "PauserAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": true, "name": "account", "type": "address" }], + "name": "PauserRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": true, "name": "account", "type": "address" }], + "name": "MinterAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": true, "name": "account", "type": "address" }], + "name": "MinterRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "from", "type": "address" }, + { "indexed": true, "name": "to", "type": "address" }, + { "indexed": false, "name": "value", "type": "uint256" } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "owner", "type": "address" }, + { "indexed": true, "name": "spender", "type": "address" }, + { "indexed": false, "name": "value", "type": "uint256" } + ], + "name": "Approval", + "type": "event" + } + ], + "devdoc": { + "methods": { + "allowance(address,address)": { "details": "See {IERC20-allowance}." }, + "balanceOf(address)": { "details": "See {IERC20-balanceOf}." }, + "burn(uint256)": { + "details": "Destroys `amount` tokens from the caller. * See {ERC20-_burn}." + }, + "burnFrom(address,uint256)": { "details": "See {ERC20-_burnFrom}." }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. * NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "mint(address,uint256)": { + "details": "See {ERC20-_mint}. * Requirements: * - the caller must have the {MinterRole}." + }, + "name()": { "details": "Returns the name of the token." }, + "pause()": { + "details": "Called by a pauser to pause, triggers stopped state." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { "details": "See {IERC20-totalSupply}." }, + "unpause()": { + "details": "Called by a pauser to unpause, returns to normal state." + } + } + }, + "userdoc": { + "methods": {}, + "notice": "Implements ERC20 fUSD tokens using OpenZeppelin libraries." + } + }, + "settings": { + "compilationTarget": { "contracts/FUSDToken.sol": "FUSDToken" }, + "evmVersion": "byzantium", + "libraries": {}, + "optimizer": { "enabled": false, "runs": 200 }, + "remappings": [] + }, + "sources": { + "@openzeppelin/contracts@2.5.0/GSN/Context.sol": { + "keccak256": "0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061", + "urls": [ + "bzzr://51482c01bddf23793bddee43b60ab9578a62948a4f2082def24ea792a553b055" + ] + }, + "@openzeppelin/contracts@2.5.0/access/Roles.sol": { + "keccak256": "0xb002c378d7b82a101bd659c341518953ca0919d342c0a400196982c0e7e7bcdb", + "urls": [ + "bzzr://bd34c1ce05b5b2b3a62fc02e160f6805b1cadd476854664f433c685b2fda8dad" + ] + }, + "@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol": { + "keccak256": "0xbe8eef6f2cb4e427f5c5d8a76865ccd06e55a4f1d6671ba312d45bfa705aedbf", + "urls": [ + "bzzr://946a26eebf5d294534471d07c4dc449ce3123e9fc2994bdfcd99dff1d09cc1af" + ] + }, + "@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol": { + "keccak256": "0xd1b5c934bab36d753c22987ad98c7614cb50ebf641371a83c96f8138619d7c30", + "urls": [ + "bzzr://39c672e2273e863fd2a6d1bc452e38887b48c113483b0e4c9d7aff60f3337483" + ] + }, + "@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol": { + "keccak256": "0xd3e5a49edfb74654d122962cc60b917d1c60461e669a7262fd7aba201fac1260", + "urls": [ + "bzzr://78a64ae8f0f90b1aa83280e0735930a16f416eeda54683d2f6280a67ad3758d6" + ] + }, + "@openzeppelin/contracts@2.5.0/math/SafeMath.sol": { + "keccak256": "0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076", + "urls": [ + "bzzr://292843005e754e752644f767477ec5ad7a1ffc91ddb18c38b8079c62f3993cad" + ] + }, + "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol": { + "keccak256": "0xb15af804e2bc97db51e4e103f13de9fe13f87e6b835d7a88c897966c0e58506e", + "urls": [ + "bzzr://6200c125af376381ae6c5415b8f3c1cb83889be20a7a51d67ac607487a10313b" + ] + }, + "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol": { + "keccak256": "0x9b94356691f3cbf90a5d83ae3fdf6a5a662bb004d2bd8b034160d60221807e64", + "urls": [ + "bzzr://c59f70303d4a8bc640926844c489765661caf274397542a19af7c3930051ce83" + ] + }, + "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol": { + "keccak256": "0x4a3a810b7ebe742e897e1fd428b3eeed2196d3acea58eaf9c566ed10d545d2ed", + "urls": [ + "bzzr://729aefb3f89f616c954a0735f8b4dd8804bdd0351e96f8e904fdb3e78a109b6c" + ] + }, + "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol": { + "keccak256": "0xa2b957cf89692c504962afb7506999155f83385373f808243246cd5879de5940", + "urls": [ + "bzzr://812521b94ef1bd30b0a93e14a97a0e79e2bf4cb607aa47c21c8177966a79fd1a" + ] + }, + "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol": { + "keccak256": "0xd5ae72078a1c90af870e1b9b86b0fc05eb14b4034e417bc66d151d3eb4d342ca", + "urls": [ + "bzzr://8926f6372c7696151349f02f4914dbbc27e7a053472e89bba75087ccefade457" + ] + }, + "@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol": { + "keccak256": "0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9", + "urls": [ + "bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062" + ] + }, + "contracts/FUSDToken.sol": { + "keccak256": "0xdffa824eddd8862ee67a57da238b313460ece7e452f8ad360eadba4ca18fccc1", + "urls": [ + "bzzr://7b23260a6656ad4632e4e820b103d02c5d43ae2ec6f589c110e24b57340505f1" + ] + } + }, + "version": 1 +} From d215695bc67359745871b8f1e164ac457b450718 Mon Sep 17 00:00:00 2001 From: Rodion Kharabet Date: Mon, 7 Aug 2023 17:19:00 +0300 Subject: [PATCH 2/8] add explicit import for GSN Context.sol --- test/chains/sources/250/FUSDToken.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/test/chains/sources/250/FUSDToken.sol b/test/chains/sources/250/FUSDToken.sol index 38d27e756..698a5a33b 100644 --- a/test/chains/sources/250/FUSDToken.sol +++ b/test/chains/sources/250/FUSDToken.sol @@ -6,6 +6,7 @@ import "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol"; import "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol"; import "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol"; import "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol"; +import "@openzeppelin/contracts@2.5.0/GSN/Context.sol"; /** * Implements ERC20 fUSD tokens using OpenZeppelin libraries. From 97539b8aa6385a9eacefabd7590b4261c535069d Mon Sep 17 00:00:00 2001 From: Rodion Kharabet Date: Mon, 7 Aug 2023 17:40:29 +0300 Subject: [PATCH 3/8] add required openzeppelin deps v2.5.0 --- test/chains/chain-tests.js | 22 +- .../contracts@2.5.0/GSN/Context.sol | 27 ++ .../contracts@2.5.0/access/Roles.sol | 36 +++ .../access/roles/MinterRole.sol | 44 ++++ .../access/roles/PauserRole.sol | 44 ++++ .../contracts@2.5.0/lifecycle/Pausable.sol | 74 ++++++ .../contracts@2.5.0/math/SafeMath.sol | 156 ++++++++++++ .../contracts@2.5.0/token/ERC20/ERC20.sol | 230 ++++++++++++++++++ .../token/ERC20/ERC20Burnable.sol | 27 ++ .../token/ERC20/ERC20Detailed.sol | 54 ++++ .../token/ERC20/ERC20Mintable.sol | 24 ++ .../token/ERC20/ERC20Pausable.sol | 34 +++ .../contracts@2.5.0/token/ERC20/IERC20.sol | 76 ++++++ test/chains/sources/250/FUSDToken.sol | 11 +- 14 files changed, 849 insertions(+), 10 deletions(-) create mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/GSN/Context.sol create mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/Roles.sol create mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol create mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol create mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol create mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/math/SafeMath.sol create mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol create mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol create mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol create mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol create mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol create mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol diff --git a/test/chains/chain-tests.js b/test/chains/chain-tests.js index 04d453ad4..ca3aa4dc5 100644 --- a/test/chains/chain-tests.js +++ b/test/chains/chain-tests.js @@ -30,7 +30,7 @@ let anyTestsPass = false; // Fail when zero tests passing chai.use(chaiHttp); describe("Test Supported Chains", function () { - console.log(`Set up tests timeout with ${Math.floor(TEST_TIME / 1000)} secs`) + console.log(`Set up tests timeout with ${Math.floor(TEST_TIME / 1000)} secs`); this.timeout(TEST_TIME); const server = new Server(); let currentResponse = null; // to log server response when test fails @@ -52,8 +52,8 @@ describe("Test Supported Chains", function () { if (!anyTestsPass && newAddedChainId) { throw new Error( "There needs to be at least one passing test. Did you forget to add a test for your new chain with the id " + - newAddedChainId + - "?" + newAddedChainId + + "?" ); } }); @@ -1021,7 +1021,21 @@ describe("Test Supported Chains", function () { "0xAd84341756Bf337f5a0164515b1f6F993D194E1f", "250", "Fantom Opera", - ["250/FUSDToken.sol"], + [ + "250/FUSDToken.sol", + "250/@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol", + "250/@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol", + "250/@openzeppelin/contracts@2.5.0/access/Roles.sol", + "250/@openzeppelin/contracts@2.5.0/GSN/Context.sol", + "250/@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol", + "250/@openzeppelin/contracts@2.5.0/math/SafeMath.sol", + "250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol", + "250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol", + "250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol", + "250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol", + "250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol", + "250/@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol", + ], "250/metadata.json" ); diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/GSN/Context.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/GSN/Context.sol new file mode 100644 index 000000000..107729583 --- /dev/null +++ b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/GSN/Context.sol @@ -0,0 +1,27 @@ +pragma solidity ^0.5.0; + +/* + * @dev Provides information about the current execution context, including the + * sender of the transaction and its data. While these are generally available + * via msg.sender and msg.data, they should not be accessed in such a direct + * manner, since when dealing with GSN meta-transactions the account sending and + * paying for execution may not be the actual sender (as far as an application + * is concerned). + * + * This contract is only required for intermediate, library-like contracts. + */ +contract Context { + // Empty internal constructor, to prevent people from mistakenly deploying + // an instance of this contract, which should be used via inheritance. + constructor () internal { } + // solhint-disable-previous-line no-empty-blocks + + function _msgSender() internal view returns (address payable) { + return msg.sender; + } + + function _msgData() internal view returns (bytes memory) { + this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 + return msg.data; + } +} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/Roles.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/Roles.sol new file mode 100644 index 000000000..5f3eff6ae --- /dev/null +++ b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/Roles.sol @@ -0,0 +1,36 @@ +pragma solidity ^0.5.0; + +/** + * @title Roles + * @dev Library for managing addresses assigned to a Role. + */ +library Roles { + struct Role { + mapping (address => bool) bearer; + } + + /** + * @dev Give an account access to this role. + */ + function add(Role storage role, address account) internal { + require(!has(role, account), "Roles: account already has role"); + role.bearer[account] = true; + } + + /** + * @dev Remove an account's access to this role. + */ + function remove(Role storage role, address account) internal { + require(has(role, account), "Roles: account does not have role"); + role.bearer[account] = false; + } + + /** + * @dev Check if an account has this role. + * @return bool + */ + function has(Role storage role, address account) internal view returns (bool) { + require(account != address(0), "Roles: account is the zero address"); + return role.bearer[account]; + } +} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol new file mode 100644 index 000000000..f881e3a73 --- /dev/null +++ b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol @@ -0,0 +1,44 @@ +pragma solidity ^0.5.0; + +import "../../GSN/Context.sol"; +import "../Roles.sol"; + +contract MinterRole is Context { + using Roles for Roles.Role; + + event MinterAdded(address indexed account); + event MinterRemoved(address indexed account); + + Roles.Role private _minters; + + constructor () internal { + _addMinter(_msgSender()); + } + + modifier onlyMinter() { + require(isMinter(_msgSender()), "MinterRole: caller does not have the Minter role"); + _; + } + + function isMinter(address account) public view returns (bool) { + return _minters.has(account); + } + + function addMinter(address account) public onlyMinter { + _addMinter(account); + } + + function renounceMinter() public { + _removeMinter(_msgSender()); + } + + function _addMinter(address account) internal { + _minters.add(account); + emit MinterAdded(account); + } + + function _removeMinter(address account) internal { + _minters.remove(account); + emit MinterRemoved(account); + } +} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol new file mode 100644 index 000000000..6ad238402 --- /dev/null +++ b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol @@ -0,0 +1,44 @@ +pragma solidity ^0.5.0; + +import "../../GSN/Context.sol"; +import "../Roles.sol"; + +contract PauserRole is Context { + using Roles for Roles.Role; + + event PauserAdded(address indexed account); + event PauserRemoved(address indexed account); + + Roles.Role private _pausers; + + constructor () internal { + _addPauser(_msgSender()); + } + + modifier onlyPauser() { + require(isPauser(_msgSender()), "PauserRole: caller does not have the Pauser role"); + _; + } + + function isPauser(address account) public view returns (bool) { + return _pausers.has(account); + } + + function addPauser(address account) public onlyPauser { + _addPauser(account); + } + + function renouncePauser() public { + _removePauser(_msgSender()); + } + + function _addPauser(address account) internal { + _pausers.add(account); + emit PauserAdded(account); + } + + function _removePauser(address account) internal { + _pausers.remove(account); + emit PauserRemoved(account); + } +} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol new file mode 100644 index 000000000..77d11e33b --- /dev/null +++ b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol @@ -0,0 +1,74 @@ +pragma solidity ^0.5.0; + +import "../GSN/Context.sol"; +import "../access/roles/PauserRole.sol"; + +/** + * @dev Contract module which allows children to implement an emergency stop + * mechanism that can be triggered by an authorized account. + * + * This module is used through inheritance. It will make available the + * modifiers `whenNotPaused` and `whenPaused`, which can be applied to + * the functions of your contract. Note that they will not be pausable by + * simply including this module, only once the modifiers are put in place. + */ +contract Pausable is Context, PauserRole { + /** + * @dev Emitted when the pause is triggered by a pauser (`account`). + */ + event Paused(address account); + + /** + * @dev Emitted when the pause is lifted by a pauser (`account`). + */ + event Unpaused(address account); + + bool private _paused; + + /** + * @dev Initializes the contract in unpaused state. Assigns the Pauser role + * to the deployer. + */ + constructor () internal { + _paused = false; + } + + /** + * @dev Returns true if the contract is paused, and false otherwise. + */ + function paused() public view returns (bool) { + return _paused; + } + + /** + * @dev Modifier to make a function callable only when the contract is not paused. + */ + modifier whenNotPaused() { + require(!_paused, "Pausable: paused"); + _; + } + + /** + * @dev Modifier to make a function callable only when the contract is paused. + */ + modifier whenPaused() { + require(_paused, "Pausable: not paused"); + _; + } + + /** + * @dev Called by a pauser to pause, triggers stopped state. + */ + function pause() public onlyPauser whenNotPaused { + _paused = true; + emit Paused(_msgSender()); + } + + /** + * @dev Called by a pauser to unpause, returns to normal state. + */ + function unpause() public onlyPauser whenPaused { + _paused = false; + emit Unpaused(_msgSender()); + } +} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/math/SafeMath.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/math/SafeMath.sol new file mode 100644 index 000000000..e7091fb22 --- /dev/null +++ b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/math/SafeMath.sol @@ -0,0 +1,156 @@ +pragma solidity ^0.5.0; + +/** + * @dev Wrappers over Solidity's arithmetic operations with added overflow + * checks. + * + * Arithmetic operations in Solidity wrap on overflow. This can easily result + * in bugs, because programmers usually assume that an overflow raises an + * error, which is the standard behavior in high level programming languages. + * `SafeMath` restores this intuition by reverting the transaction when an + * operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + */ +library SafeMath { + /** + * @dev Returns the addition of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * - Addition cannot overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a, "SafeMath: addition overflow"); + + return c; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + return sub(a, b, "SafeMath: subtraction overflow"); + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting with custom message on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * - Subtraction cannot overflow. + * + * _Available since v2.4.0._ + */ + function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b <= a, errorMessage); + uint256 c = a - b; + + return c; + } + + /** + * @dev Returns the multiplication of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * - Multiplication cannot overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 + if (a == 0) { + return 0; + } + + uint256 c = a * b; + require(c / a == b, "SafeMath: multiplication overflow"); + + return c; + } + + /** + * @dev Returns the integer division of two unsigned integers. Reverts on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + return div(a, b, "SafeMath: division by zero"); + } + + /** + * @dev Returns the integer division of two unsigned integers. Reverts with custom message on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + * + * _Available since v2.4.0._ + */ + function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + // Solidity only automatically asserts when dividing by 0 + require(b > 0, errorMessage); + uint256 c = a / b; + // assert(a == b * c + a % b); // There is no case in which this doesn't hold + + return c; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * Reverts when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + return mod(a, b, "SafeMath: modulo by zero"); + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * Reverts with custom message when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + * + * _Available since v2.4.0._ + */ + function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b != 0, errorMessage); + return a % b; + } +} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol new file mode 100644 index 000000000..0846fb2cb --- /dev/null +++ b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol @@ -0,0 +1,230 @@ +pragma solidity ^0.5.0; + +import "../../GSN/Context.sol"; +import "./IERC20.sol"; +import "../../math/SafeMath.sol"; + +/** + * @dev Implementation of the {IERC20} interface. + * + * This implementation is agnostic to the way tokens are created. This means + * that a supply mechanism has to be added in a derived contract using {_mint}. + * For a generic mechanism see {ERC20Mintable}. + * + * TIP: For a detailed writeup see our guide + * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How + * to implement supply mechanisms]. + * + * We have followed general OpenZeppelin guidelines: functions revert instead + * of returning `false` on failure. This behavior is nonetheless conventional + * and does not conflict with the expectations of ERC20 applications. + * + * Additionally, an {Approval} event is emitted on calls to {transferFrom}. + * This allows applications to reconstruct the allowance for all accounts just + * by listening to said events. Other implementations of the EIP may not emit + * these events, as it isn't required by the specification. + * + * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} + * functions have been added to mitigate the well-known issues around setting + * allowances. See {IERC20-approve}. + */ +contract ERC20 is Context, IERC20 { + using SafeMath for uint256; + + mapping (address => uint256) private _balances; + + mapping (address => mapping (address => uint256)) private _allowances; + + uint256 private _totalSupply; + + /** + * @dev See {IERC20-totalSupply}. + */ + function totalSupply() public view returns (uint256) { + return _totalSupply; + } + + /** + * @dev See {IERC20-balanceOf}. + */ + function balanceOf(address account) public view returns (uint256) { + return _balances[account]; + } + + /** + * @dev See {IERC20-transfer}. + * + * Requirements: + * + * - `recipient` cannot be the zero address. + * - the caller must have a balance of at least `amount`. + */ + function transfer(address recipient, uint256 amount) public returns (bool) { + _transfer(_msgSender(), recipient, amount); + return true; + } + + /** + * @dev See {IERC20-allowance}. + */ + function allowance(address owner, address spender) public view returns (uint256) { + return _allowances[owner][spender]; + } + + /** + * @dev See {IERC20-approve}. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function approve(address spender, uint256 amount) public returns (bool) { + _approve(_msgSender(), spender, amount); + return true; + } + + /** + * @dev See {IERC20-transferFrom}. + * + * Emits an {Approval} event indicating the updated allowance. This is not + * required by the EIP. See the note at the beginning of {ERC20}; + * + * Requirements: + * - `sender` and `recipient` cannot be the zero address. + * - `sender` must have a balance of at least `amount`. + * - the caller must have allowance for `sender`'s tokens of at least + * `amount`. + */ + function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { + _transfer(sender, recipient, amount); + _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); + return true; + } + + /** + * @dev Atomically increases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { + _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); + return true; + } + + /** + * @dev Atomically decreases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + * - `spender` must have allowance for the caller of at least + * `subtractedValue`. + */ + function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { + _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); + return true; + } + + /** + * @dev Moves tokens `amount` from `sender` to `recipient`. + * + * This is internal function is equivalent to {transfer}, and can be used to + * e.g. implement automatic token fees, slashing mechanisms, etc. + * + * Emits a {Transfer} event. + * + * Requirements: + * + * - `sender` cannot be the zero address. + * - `recipient` cannot be the zero address. + * - `sender` must have a balance of at least `amount`. + */ + function _transfer(address sender, address recipient, uint256 amount) internal { + require(sender != address(0), "ERC20: transfer from the zero address"); + require(recipient != address(0), "ERC20: transfer to the zero address"); + + _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); + _balances[recipient] = _balances[recipient].add(amount); + emit Transfer(sender, recipient, amount); + } + + /** @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * Requirements + * + * - `to` cannot be the zero address. + */ + function _mint(address account, uint256 amount) internal { + require(account != address(0), "ERC20: mint to the zero address"); + + _totalSupply = _totalSupply.add(amount); + _balances[account] = _balances[account].add(amount); + emit Transfer(address(0), account, amount); + } + + /** + * @dev Destroys `amount` tokens from `account`, reducing the + * total supply. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * Requirements + * + * - `account` cannot be the zero address. + * - `account` must have at least `amount` tokens. + */ + function _burn(address account, uint256 amount) internal { + require(account != address(0), "ERC20: burn from the zero address"); + + _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); + _totalSupply = _totalSupply.sub(amount); + emit Transfer(account, address(0), amount); + } + + /** + * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. + * + * This is internal function is equivalent to `approve`, and can be used to + * e.g. set automatic allowances for certain subsystems, etc. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + */ + function _approve(address owner, address spender, uint256 amount) internal { + require(owner != address(0), "ERC20: approve from the zero address"); + require(spender != address(0), "ERC20: approve to the zero address"); + + _allowances[owner][spender] = amount; + emit Approval(owner, spender, amount); + } + + /** + * @dev Destroys `amount` tokens from `account`.`amount` is then deducted + * from the caller's allowance. + * + * See {_burn} and {_approve}. + */ + function _burnFrom(address account, uint256 amount) internal { + _burn(account, amount); + _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); + } +} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol new file mode 100644 index 000000000..e58b72b25 --- /dev/null +++ b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol @@ -0,0 +1,27 @@ +pragma solidity ^0.5.0; + +import "../../GSN/Context.sol"; +import "./ERC20.sol"; + +/** + * @dev Extension of {ERC20} that allows token holders to destroy both their own + * tokens and those that they have an allowance for, in a way that can be + * recognized off-chain (via event analysis). + */ +contract ERC20Burnable is Context, ERC20 { + /** + * @dev Destroys `amount` tokens from the caller. + * + * See {ERC20-_burn}. + */ + function burn(uint256 amount) public { + _burn(_msgSender(), amount); + } + + /** + * @dev See {ERC20-_burnFrom}. + */ + function burnFrom(address account, uint256 amount) public { + _burnFrom(account, amount); + } +} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol new file mode 100644 index 000000000..61d4ab922 --- /dev/null +++ b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol @@ -0,0 +1,54 @@ +pragma solidity ^0.5.0; + +import "./IERC20.sol"; + +/** + * @dev Optional functions from the ERC20 standard. + */ +contract ERC20Detailed is IERC20 { + string private _name; + string private _symbol; + uint8 private _decimals; + + /** + * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of + * these values are immutable: they can only be set once during + * construction. + */ + constructor (string memory name, string memory symbol, uint8 decimals) public { + _name = name; + _symbol = symbol; + _decimals = decimals; + } + + /** + * @dev Returns the name of the token. + */ + function name() public view returns (string memory) { + return _name; + } + + /** + * @dev Returns the symbol of the token, usually a shorter version of the + * name. + */ + function symbol() public view returns (string memory) { + return _symbol; + } + + /** + * @dev Returns the number of decimals used to get its user representation. + * For example, if `decimals` equals `2`, a balance of `505` tokens should + * be displayed to a user as `5,05` (`505 / 10 ** 2`). + * + * Tokens usually opt for a value of 18, imitating the relationship between + * Ether and Wei. + * + * NOTE: This information is only used for _display_ purposes: it in + * no way affects any of the arithmetic of the contract, including + * {IERC20-balanceOf} and {IERC20-transfer}. + */ + function decimals() public view returns (uint8) { + return _decimals; + } +} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol new file mode 100644 index 000000000..d2fd5b737 --- /dev/null +++ b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol @@ -0,0 +1,24 @@ +pragma solidity ^0.5.0; + +import "./ERC20.sol"; +import "../../access/roles/MinterRole.sol"; + +/** + * @dev Extension of {ERC20} that adds a set of accounts with the {MinterRole}, + * which have permission to mint (create) new tokens as they see fit. + * + * At construction, the deployer of the contract is the only minter. + */ +contract ERC20Mintable is ERC20, MinterRole { + /** + * @dev See {ERC20-_mint}. + * + * Requirements: + * + * - the caller must have the {MinterRole}. + */ + function mint(address account, uint256 amount) public onlyMinter returns (bool) { + _mint(account, amount); + return true; + } +} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol new file mode 100644 index 000000000..5e8641ebc --- /dev/null +++ b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol @@ -0,0 +1,34 @@ +pragma solidity ^0.5.0; + +import "./ERC20.sol"; +import "../../lifecycle/Pausable.sol"; + +/** + * @title Pausable token + * @dev ERC20 with pausable transfers and allowances. + * + * Useful if you want to stop trades until the end of a crowdsale, or have + * an emergency switch for freezing all token transfers in the event of a large + * bug. + */ +contract ERC20Pausable is ERC20, Pausable { + function transfer(address to, uint256 value) public whenNotPaused returns (bool) { + return super.transfer(to, value); + } + + function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) { + return super.transferFrom(from, to, value); + } + + function approve(address spender, uint256 value) public whenNotPaused returns (bool) { + return super.approve(spender, value); + } + + function increaseAllowance(address spender, uint256 addedValue) public whenNotPaused returns (bool) { + return super.increaseAllowance(spender, addedValue); + } + + function decreaseAllowance(address spender, uint256 subtractedValue) public whenNotPaused returns (bool) { + return super.decreaseAllowance(spender, subtractedValue); + } +} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol new file mode 100644 index 000000000..bf5245ff0 --- /dev/null +++ b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol @@ -0,0 +1,76 @@ +pragma solidity ^0.5.0; + +/** + * @dev Interface of the ERC20 standard as defined in the EIP. Does not include + * the optional functions; to access them see {ERC20Detailed}. + */ +interface IERC20 { + /** + * @dev Returns the amount of tokens in existence. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns the amount of tokens owned by `account`. + */ + function balanceOf(address account) external view returns (uint256); + + /** + * @dev Moves `amount` tokens from the caller's account to `recipient`. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transfer(address recipient, uint256 amount) external returns (bool); + + /** + * @dev Returns the remaining number of tokens that `spender` will be + * allowed to spend on behalf of `owner` through {transferFrom}. This is + * zero by default. + * + * This value changes when {approve} or {transferFrom} are called. + */ + function allowance(address owner, address spender) external view returns (uint256); + + /** + * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * IMPORTANT: Beware that changing an allowance with this method brings the risk + * that someone may use both the old and the new allowance by unfortunate + * transaction ordering. One possible solution to mitigate this race + * condition is to first reduce the spender's allowance to 0 and set the + * desired value afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + * + * Emits an {Approval} event. + */ + function approve(address spender, uint256 amount) external returns (bool); + + /** + * @dev Moves `amount` tokens from `sender` to `recipient` using the + * allowance mechanism. `amount` is then deducted from the caller's + * allowance. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + + /** + * @dev Emitted when `value` tokens are moved from one account (`from`) to + * another (`to`). + * + * Note that `value` may be zero. + */ + event Transfer(address indexed from, address indexed to, uint256 value); + + /** + * @dev Emitted when the allowance of a `spender` for an `owner` is set by + * a call to {approve}. `value` is the new allowance. + */ + event Approval(address indexed owner, address indexed spender, uint256 value); +} diff --git a/test/chains/sources/250/FUSDToken.sol b/test/chains/sources/250/FUSDToken.sol index 698a5a33b..d86725ed1 100644 --- a/test/chains/sources/250/FUSDToken.sol +++ b/test/chains/sources/250/FUSDToken.sol @@ -1,12 +1,11 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.5.0; -import "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol"; -import "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol"; -import "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol"; -import "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol"; -import "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol"; -import "@openzeppelin/contracts@2.5.0/GSN/Context.sol"; +import "./@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol"; +import "./@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol"; +import "./@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol"; +import "./@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol"; +import "./@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol"; /** * Implements ERC20 fUSD tokens using OpenZeppelin libraries. From e5f5725d0b4930062cb26703fb0eba9643f1f328 Mon Sep 17 00:00:00 2001 From: Rodion Kharabet Date: Mon, 7 Aug 2023 17:56:33 +0300 Subject: [PATCH 4/8] update FUSDToken path --- test/chains/sources/250/metadata.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/chains/sources/250/metadata.json b/test/chains/sources/250/metadata.json index 65201faef..77966ce55 100644 --- a/test/chains/sources/250/metadata.json +++ b/test/chains/sources/250/metadata.json @@ -334,7 +334,7 @@ } }, "settings": { - "compilationTarget": { "contracts/FUSDToken.sol": "FUSDToken" }, + "compilationTarget": { "FUSDToken.sol": "FUSDToken" }, "evmVersion": "byzantium", "libraries": {}, "optimizer": { "enabled": false, "runs": 200 }, @@ -413,7 +413,7 @@ "bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062" ] }, - "contracts/FUSDToken.sol": { + "FUSDToken.sol": { "keccak256": "0xdffa824eddd8862ee67a57da238b313460ece7e452f8ad360eadba4ca18fccc1", "urls": [ "bzzr://7b23260a6656ad4632e4e820b103d02c5d43ae2ec6f589c110e24b57340505f1" From ec7e2b42c18af581295c0029d65ec46c8bb8633e Mon Sep 17 00:00:00 2001 From: Rodion Kharabet Date: Mon, 7 Aug 2023 18:19:47 +0300 Subject: [PATCH 5/8] disable local formatter --- src/sourcify-chains.ts | 2 ++ test/chains/chain-tests.js | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/sourcify-chains.ts b/src/sourcify-chains.ts index b1323b6a0..d0215e9d8 100644 --- a/src/sourcify-chains.ts +++ b/src/sourcify-chains.ts @@ -957,6 +957,8 @@ const sourcifyChainsExtensions: SourcifyChainsExtensionsObject = { // Edgeware EdgeEVM Mainnet supported: true, monitored: false, + contractFetchAddress: + "https://edgscan.live/" + BLOCKSCOUT_SUFFIX, txRegex: getBlockscoutRegex(), }, "250": { diff --git a/test/chains/chain-tests.js b/test/chains/chain-tests.js index ca3aa4dc5..40d8474e3 100644 --- a/test/chains/chain-tests.js +++ b/test/chains/chain-tests.js @@ -30,7 +30,7 @@ let anyTestsPass = false; // Fail when zero tests passing chai.use(chaiHttp); describe("Test Supported Chains", function () { - console.log(`Set up tests timeout with ${Math.floor(TEST_TIME / 1000)} secs`); + console.log(`Set up tests timeout with ${Math.floor(TEST_TIME / 1000)} secs`) this.timeout(TEST_TIME); const server = new Server(); let currentResponse = null; // to log server response when test fails @@ -52,8 +52,8 @@ describe("Test Supported Chains", function () { if (!anyTestsPass && newAddedChainId) { throw new Error( "There needs to be at least one passing test. Did you forget to add a test for your new chain with the id " + - newAddedChainId + - "?" + newAddedChainId + + "?" ); } }); From 90c2b003f69a1dc120d1086c6770b96efbd9bf09 Mon Sep 17 00:00:00 2001 From: Rodion Kharabet Date: Mon, 7 Aug 2023 18:28:11 +0300 Subject: [PATCH 6/8] update metadata --- test/chains/sources/250/metadata.json | 381 +++++++++++++++++++++----- 1 file changed, 307 insertions(+), 74 deletions(-) diff --git a/test/chains/sources/250/metadata.json b/test/chains/sources/250/metadata.json index 77966ce55..c53c17457 100644 --- a/test/chains/sources/250/metadata.json +++ b/test/chains/sources/250/metadata.json @@ -1,5 +1,7 @@ { - "compiler": { "version": "0.5.0+commit.1d4f565a" }, + "compiler": { + "version": "0.5.0+commit.1d4f565a" + }, "language": "Solidity", "output": { "abi": [ @@ -7,7 +9,12 @@ "constant": true, "inputs": [], "name": "name", - "outputs": [{ "name": "", "type": "string" }], + "outputs": [ + { + "name": "", + "type": "string" + } + ], "payable": false, "stateMutability": "view", "type": "function" @@ -15,11 +22,22 @@ { "constant": false, "inputs": [ - { "name": "spender", "type": "address" }, - { "name": "value", "type": "uint256" } + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } ], "name": "approve", - "outputs": [{ "name": "", "type": "bool" }], + "outputs": [ + { + "name": "", + "type": "bool" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -28,7 +46,12 @@ "constant": true, "inputs": [], "name": "totalSupply", - "outputs": [{ "name": "", "type": "uint256" }], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], "payable": false, "stateMutability": "view", "type": "function" @@ -36,12 +59,26 @@ { "constant": false, "inputs": [ - { "name": "from", "type": "address" }, - { "name": "to", "type": "address" }, - { "name": "value", "type": "uint256" } + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } ], "name": "transferFrom", - "outputs": [{ "name": "", "type": "bool" }], + "outputs": [ + { + "name": "", + "type": "bool" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -50,7 +87,12 @@ "constant": true, "inputs": [], "name": "decimals", - "outputs": [{ "name": "", "type": "uint8" }], + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], "payable": false, "stateMutability": "view", "type": "function" @@ -58,11 +100,22 @@ { "constant": false, "inputs": [ - { "name": "spender", "type": "address" }, - { "name": "addedValue", "type": "uint256" } + { + "name": "spender", + "type": "address" + }, + { + "name": "addedValue", + "type": "uint256" + } ], "name": "increaseAllowance", - "outputs": [{ "name": "", "type": "bool" }], + "outputs": [ + { + "name": "", + "type": "bool" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -79,18 +132,34 @@ { "constant": false, "inputs": [ - { "name": "account", "type": "address" }, - { "name": "amount", "type": "uint256" } + { + "name": "account", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } ], "name": "mint", - "outputs": [{ "name": "", "type": "bool" }], + "outputs": [ + { + "name": "", + "type": "bool" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, - "inputs": [{ "name": "amount", "type": "uint256" }], + "inputs": [ + { + "name": "amount", + "type": "uint256" + } + ], "name": "burn", "outputs": [], "payable": false, @@ -99,9 +168,19 @@ }, { "constant": true, - "inputs": [{ "name": "account", "type": "address" }], + "inputs": [ + { + "name": "account", + "type": "address" + } + ], "name": "isPauser", - "outputs": [{ "name": "", "type": "bool" }], + "outputs": [ + { + "name": "", + "type": "bool" + } + ], "payable": false, "stateMutability": "view", "type": "function" @@ -110,7 +189,12 @@ "constant": true, "inputs": [], "name": "paused", - "outputs": [{ "name": "", "type": "bool" }], + "outputs": [ + { + "name": "", + "type": "bool" + } + ], "payable": false, "stateMutability": "view", "type": "function" @@ -126,9 +210,19 @@ }, { "constant": true, - "inputs": [{ "name": "account", "type": "address" }], + "inputs": [ + { + "name": "account", + "type": "address" + } + ], "name": "balanceOf", - "outputs": [{ "name": "", "type": "uint256" }], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], "payable": false, "stateMutability": "view", "type": "function" @@ -136,8 +230,14 @@ { "constant": false, "inputs": [ - { "name": "account", "type": "address" }, - { "name": "amount", "type": "uint256" } + { + "name": "account", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } ], "name": "burnFrom", "outputs": [], @@ -147,7 +247,12 @@ }, { "constant": false, - "inputs": [{ "name": "account", "type": "address" }], + "inputs": [ + { + "name": "account", + "type": "address" + } + ], "name": "addPauser", "outputs": [], "payable": false, @@ -167,14 +272,24 @@ "constant": true, "inputs": [], "name": "symbol", - "outputs": [{ "name": "", "type": "string" }], + "outputs": [ + { + "name": "", + "type": "string" + } + ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, - "inputs": [{ "name": "account", "type": "address" }], + "inputs": [ + { + "name": "account", + "type": "address" + } + ], "name": "addMinter", "outputs": [], "payable": false, @@ -193,11 +308,22 @@ { "constant": false, "inputs": [ - { "name": "spender", "type": "address" }, - { "name": "subtractedValue", "type": "uint256" } + { + "name": "spender", + "type": "address" + }, + { + "name": "subtractedValue", + "type": "uint256" + } ], "name": "decreaseAllowance", - "outputs": [{ "name": "", "type": "bool" }], + "outputs": [ + { + "name": "", + "type": "bool" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -205,20 +331,41 @@ { "constant": false, "inputs": [ - { "name": "to", "type": "address" }, - { "name": "value", "type": "uint256" } + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } ], "name": "transfer", - "outputs": [{ "name": "", "type": "bool" }], + "outputs": [ + { + "name": "", + "type": "bool" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [{ "name": "account", "type": "address" }], + "inputs": [ + { + "name": "account", + "type": "address" + } + ], "name": "isMinter", - "outputs": [{ "name": "", "type": "bool" }], + "outputs": [ + { + "name": "", + "type": "bool" + } + ], "payable": false, "stateMutability": "view", "type": "function" @@ -226,11 +373,22 @@ { "constant": true, "inputs": [ - { "name": "owner", "type": "address" }, - { "name": "spender", "type": "address" } + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } ], "name": "allowance", - "outputs": [{ "name": "", "type": "uint256" }], + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], "payable": false, "stateMutability": "view", "type": "function" @@ -243,46 +401,94 @@ }, { "anonymous": false, - "inputs": [{ "indexed": false, "name": "account", "type": "address" }], + "inputs": [ + { + "indexed": false, + "name": "account", + "type": "address" + } + ], "name": "Paused", "type": "event" }, { "anonymous": false, - "inputs": [{ "indexed": false, "name": "account", "type": "address" }], + "inputs": [ + { + "indexed": false, + "name": "account", + "type": "address" + } + ], "name": "Unpaused", "type": "event" }, { "anonymous": false, - "inputs": [{ "indexed": true, "name": "account", "type": "address" }], + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], "name": "PauserAdded", "type": "event" }, { "anonymous": false, - "inputs": [{ "indexed": true, "name": "account", "type": "address" }], + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], "name": "PauserRemoved", "type": "event" }, { "anonymous": false, - "inputs": [{ "indexed": true, "name": "account", "type": "address" }], + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], "name": "MinterAdded", "type": "event" }, { "anonymous": false, - "inputs": [{ "indexed": true, "name": "account", "type": "address" }], + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], "name": "MinterRemoved", "type": "event" }, { "anonymous": false, "inputs": [ - { "indexed": true, "name": "from", "type": "address" }, - { "indexed": true, "name": "to", "type": "address" }, - { "indexed": false, "name": "value", "type": "uint256" } + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } ], "name": "Transfer", "type": "event" @@ -290,9 +496,21 @@ { "anonymous": false, "inputs": [ - { "indexed": true, "name": "owner", "type": "address" }, - { "indexed": true, "name": "spender", "type": "address" }, - { "indexed": false, "name": "value", "type": "uint256" } + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } ], "name": "Approval", "type": "event" @@ -300,19 +518,27 @@ ], "devdoc": { "methods": { - "allowance(address,address)": { "details": "See {IERC20-allowance}." }, - "balanceOf(address)": { "details": "See {IERC20-balanceOf}." }, + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, "burn(uint256)": { "details": "Destroys `amount` tokens from the caller. * See {ERC20-_burn}." }, - "burnFrom(address,uint256)": { "details": "See {ERC20-_burnFrom}." }, + "burnFrom(address,uint256)": { + "details": "See {ERC20-_burnFrom}." + }, "decimals()": { "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. * NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." }, "mint(address,uint256)": { "details": "See {ERC20-_mint}. * Requirements: * - the caller must have the {MinterRole}." }, - "name()": { "details": "Returns the name of the token." }, + "name()": { + "details": "Returns the name of the token." + }, "pause()": { "details": "Called by a pauser to pause, triggers stopped state." }, @@ -322,7 +548,9 @@ "symbol()": { "details": "Returns the symbol of the token, usually a shorter version of the name." }, - "totalSupply()": { "details": "See {IERC20-totalSupply}." }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, "unpause()": { "details": "Called by a pauser to unpause, returns to normal state." } @@ -334,91 +562,96 @@ } }, "settings": { - "compilationTarget": { "FUSDToken.sol": "FUSDToken" }, + "compilationTarget": { + "contracts/FUSDToken.sol": "FUSDToken" + }, "evmVersion": "byzantium", "libraries": {}, - "optimizer": { "enabled": false, "runs": 200 }, + "optimizer": { + "enabled": false, + "runs": 200 + }, "remappings": [] }, "sources": { - "@openzeppelin/contracts@2.5.0/GSN/Context.sol": { + "contracts/@openzeppelin/contracts@2.5.0/GSN/Context.sol": { "keccak256": "0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061", "urls": [ "bzzr://51482c01bddf23793bddee43b60ab9578a62948a4f2082def24ea792a553b055" ] }, - "@openzeppelin/contracts@2.5.0/access/Roles.sol": { + "contracts/@openzeppelin/contracts@2.5.0/access/Roles.sol": { "keccak256": "0xb002c378d7b82a101bd659c341518953ca0919d342c0a400196982c0e7e7bcdb", "urls": [ "bzzr://bd34c1ce05b5b2b3a62fc02e160f6805b1cadd476854664f433c685b2fda8dad" ] }, - "@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol": { + "contracts/@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol": { "keccak256": "0xbe8eef6f2cb4e427f5c5d8a76865ccd06e55a4f1d6671ba312d45bfa705aedbf", "urls": [ "bzzr://946a26eebf5d294534471d07c4dc449ce3123e9fc2994bdfcd99dff1d09cc1af" ] }, - "@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol": { + "contracts/@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol": { "keccak256": "0xd1b5c934bab36d753c22987ad98c7614cb50ebf641371a83c96f8138619d7c30", "urls": [ "bzzr://39c672e2273e863fd2a6d1bc452e38887b48c113483b0e4c9d7aff60f3337483" ] }, - "@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol": { + "contracts/@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol": { "keccak256": "0xd3e5a49edfb74654d122962cc60b917d1c60461e669a7262fd7aba201fac1260", "urls": [ "bzzr://78a64ae8f0f90b1aa83280e0735930a16f416eeda54683d2f6280a67ad3758d6" ] }, - "@openzeppelin/contracts@2.5.0/math/SafeMath.sol": { + "contracts/@openzeppelin/contracts@2.5.0/math/SafeMath.sol": { "keccak256": "0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076", "urls": [ "bzzr://292843005e754e752644f767477ec5ad7a1ffc91ddb18c38b8079c62f3993cad" ] }, - "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol": { + "contracts/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol": { "keccak256": "0xb15af804e2bc97db51e4e103f13de9fe13f87e6b835d7a88c897966c0e58506e", "urls": [ "bzzr://6200c125af376381ae6c5415b8f3c1cb83889be20a7a51d67ac607487a10313b" ] }, - "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol": { + "contracts/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol": { "keccak256": "0x9b94356691f3cbf90a5d83ae3fdf6a5a662bb004d2bd8b034160d60221807e64", "urls": [ "bzzr://c59f70303d4a8bc640926844c489765661caf274397542a19af7c3930051ce83" ] }, - "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol": { + "contracts/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol": { "keccak256": "0x4a3a810b7ebe742e897e1fd428b3eeed2196d3acea58eaf9c566ed10d545d2ed", "urls": [ "bzzr://729aefb3f89f616c954a0735f8b4dd8804bdd0351e96f8e904fdb3e78a109b6c" ] }, - "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol": { + "contracts/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol": { "keccak256": "0xa2b957cf89692c504962afb7506999155f83385373f808243246cd5879de5940", "urls": [ "bzzr://812521b94ef1bd30b0a93e14a97a0e79e2bf4cb607aa47c21c8177966a79fd1a" ] }, - "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol": { + "contracts/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol": { "keccak256": "0xd5ae72078a1c90af870e1b9b86b0fc05eb14b4034e417bc66d151d3eb4d342ca", "urls": [ "bzzr://8926f6372c7696151349f02f4914dbbc27e7a053472e89bba75087ccefade457" ] }, - "@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol": { + "contracts/@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol": { "keccak256": "0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9", "urls": [ "bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062" ] }, - "FUSDToken.sol": { - "keccak256": "0xdffa824eddd8862ee67a57da238b313460ece7e452f8ad360eadba4ca18fccc1", + "contracts/FUSDToken.sol": { + "keccak256": "0x1c79cc93846fc2a8315d87f94c9c3d7930e9e66e125a3341d8acfc09c99bd2f7", "urls": [ - "bzzr://7b23260a6656ad4632e4e820b103d02c5d43ae2ec6f589c110e24b57340505f1" + "bzzr://610d9ce5c3e017ee5cca4cc74c049d21b6cc60b3eae46f07661d980c93b2794c" ] } }, "version": 1 -} +} \ No newline at end of file From 1e0f2daf249deb740b0453e4f2e60d9e67837ef8 Mon Sep 17 00:00:00 2001 From: Rodion Kharabet Date: Mon, 7 Aug 2023 18:34:52 +0300 Subject: [PATCH 7/8] update relative paths in metadata --- test/chains/sources/250/metadata.json | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/test/chains/sources/250/metadata.json b/test/chains/sources/250/metadata.json index c53c17457..911f03e7e 100644 --- a/test/chains/sources/250/metadata.json +++ b/test/chains/sources/250/metadata.json @@ -563,7 +563,7 @@ }, "settings": { "compilationTarget": { - "contracts/FUSDToken.sol": "FUSDToken" + "FUSDToken.sol": "FUSDToken" }, "evmVersion": "byzantium", "libraries": {}, @@ -574,79 +574,79 @@ "remappings": [] }, "sources": { - "contracts/@openzeppelin/contracts@2.5.0/GSN/Context.sol": { + "@openzeppelin/contracts@2.5.0/GSN/Context.sol": { "keccak256": "0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061", "urls": [ "bzzr://51482c01bddf23793bddee43b60ab9578a62948a4f2082def24ea792a553b055" ] }, - "contracts/@openzeppelin/contracts@2.5.0/access/Roles.sol": { + "@openzeppelin/contracts@2.5.0/access/Roles.sol": { "keccak256": "0xb002c378d7b82a101bd659c341518953ca0919d342c0a400196982c0e7e7bcdb", "urls": [ "bzzr://bd34c1ce05b5b2b3a62fc02e160f6805b1cadd476854664f433c685b2fda8dad" ] }, - "contracts/@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol": { + "@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol": { "keccak256": "0xbe8eef6f2cb4e427f5c5d8a76865ccd06e55a4f1d6671ba312d45bfa705aedbf", "urls": [ "bzzr://946a26eebf5d294534471d07c4dc449ce3123e9fc2994bdfcd99dff1d09cc1af" ] }, - "contracts/@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol": { + "@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol": { "keccak256": "0xd1b5c934bab36d753c22987ad98c7614cb50ebf641371a83c96f8138619d7c30", "urls": [ "bzzr://39c672e2273e863fd2a6d1bc452e38887b48c113483b0e4c9d7aff60f3337483" ] }, - "contracts/@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol": { + "@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol": { "keccak256": "0xd3e5a49edfb74654d122962cc60b917d1c60461e669a7262fd7aba201fac1260", "urls": [ "bzzr://78a64ae8f0f90b1aa83280e0735930a16f416eeda54683d2f6280a67ad3758d6" ] }, - "contracts/@openzeppelin/contracts@2.5.0/math/SafeMath.sol": { + "@openzeppelin/contracts@2.5.0/math/SafeMath.sol": { "keccak256": "0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076", "urls": [ "bzzr://292843005e754e752644f767477ec5ad7a1ffc91ddb18c38b8079c62f3993cad" ] }, - "contracts/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol": { + "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol": { "keccak256": "0xb15af804e2bc97db51e4e103f13de9fe13f87e6b835d7a88c897966c0e58506e", "urls": [ "bzzr://6200c125af376381ae6c5415b8f3c1cb83889be20a7a51d67ac607487a10313b" ] }, - "contracts/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol": { + "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol": { "keccak256": "0x9b94356691f3cbf90a5d83ae3fdf6a5a662bb004d2bd8b034160d60221807e64", "urls": [ "bzzr://c59f70303d4a8bc640926844c489765661caf274397542a19af7c3930051ce83" ] }, - "contracts/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol": { + "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol": { "keccak256": "0x4a3a810b7ebe742e897e1fd428b3eeed2196d3acea58eaf9c566ed10d545d2ed", "urls": [ "bzzr://729aefb3f89f616c954a0735f8b4dd8804bdd0351e96f8e904fdb3e78a109b6c" ] }, - "contracts/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol": { + "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol": { "keccak256": "0xa2b957cf89692c504962afb7506999155f83385373f808243246cd5879de5940", "urls": [ "bzzr://812521b94ef1bd30b0a93e14a97a0e79e2bf4cb607aa47c21c8177966a79fd1a" ] }, - "contracts/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol": { + "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol": { "keccak256": "0xd5ae72078a1c90af870e1b9b86b0fc05eb14b4034e417bc66d151d3eb4d342ca", "urls": [ "bzzr://8926f6372c7696151349f02f4914dbbc27e7a053472e89bba75087ccefade457" ] }, - "contracts/@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol": { + "@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol": { "keccak256": "0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9", "urls": [ "bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062" ] }, - "contracts/FUSDToken.sol": { + "FUSDToken.sol": { "keccak256": "0x1c79cc93846fc2a8315d87f94c9c3d7930e9e66e125a3341d8acfc09c99bd2f7", "urls": [ "bzzr://610d9ce5c3e017ee5cca4cc74c049d21b6cc60b3eae46f07661d980c93b2794c" From a7a175514e48bc9db8b10c9d81810dca8f0a66ae Mon Sep 17 00:00:00 2001 From: Rodion Kharabet Date: Tue, 8 Aug 2023 17:01:26 +0300 Subject: [PATCH 8/8] Deploy Storage test contract instead of fUSD --- test/chains/chain-tests.js | 20 +- .../contracts@2.5.0/GSN/Context.sol | 27 - .../contracts@2.5.0/access/Roles.sol | 36 - .../access/roles/MinterRole.sol | 44 -- .../access/roles/PauserRole.sol | 44 -- .../contracts@2.5.0/lifecycle/Pausable.sol | 74 -- .../contracts@2.5.0/math/SafeMath.sol | 156 ----- .../contracts@2.5.0/token/ERC20/ERC20.sol | 230 ------ .../token/ERC20/ERC20Burnable.sol | 27 - .../token/ERC20/ERC20Detailed.sol | 54 -- .../token/ERC20/ERC20Mintable.sol | 24 - .../token/ERC20/ERC20Pausable.sol | 34 - .../contracts@2.5.0/token/ERC20/IERC20.sol | 76 -- test/chains/sources/250/FUSDToken.sol | 18 - test/chains/sources/250/metadata.json | 657 ------------------ 15 files changed, 3 insertions(+), 1518 deletions(-) delete mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/GSN/Context.sol delete mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/Roles.sol delete mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol delete mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol delete mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol delete mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/math/SafeMath.sol delete mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol delete mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol delete mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol delete mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol delete mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol delete mode 100644 test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol delete mode 100644 test/chains/sources/250/FUSDToken.sol delete mode 100644 test/chains/sources/250/metadata.json diff --git a/test/chains/chain-tests.js b/test/chains/chain-tests.js index 40d8474e3..178a2e693 100644 --- a/test/chains/chain-tests.js +++ b/test/chains/chain-tests.js @@ -1018,25 +1018,11 @@ describe("Test Supported Chains", function () { // FTM Fantom Opera Mainnet verifyContract( - "0xAd84341756Bf337f5a0164515b1f6F993D194E1f", + "0xc47856bEBCcc2BBB23E7a5E1Ba8bB4Fffa5C5476", "250", "Fantom Opera", - [ - "250/FUSDToken.sol", - "250/@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol", - "250/@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol", - "250/@openzeppelin/contracts@2.5.0/access/Roles.sol", - "250/@openzeppelin/contracts@2.5.0/GSN/Context.sol", - "250/@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol", - "250/@openzeppelin/contracts@2.5.0/math/SafeMath.sol", - "250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol", - "250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol", - "250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol", - "250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol", - "250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol", - "250/@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol", - ], - "250/metadata.json" + ["shared/1_Storage.sol"], + "shared/1_Storage.metadata.json" ); // Finally check if all the "supported: true" chains have been tested diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/GSN/Context.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/GSN/Context.sol deleted file mode 100644 index 107729583..000000000 --- a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/GSN/Context.sol +++ /dev/null @@ -1,27 +0,0 @@ -pragma solidity ^0.5.0; - -/* - * @dev Provides information about the current execution context, including the - * sender of the transaction and its data. While these are generally available - * via msg.sender and msg.data, they should not be accessed in such a direct - * manner, since when dealing with GSN meta-transactions the account sending and - * paying for execution may not be the actual sender (as far as an application - * is concerned). - * - * This contract is only required for intermediate, library-like contracts. - */ -contract Context { - // Empty internal constructor, to prevent people from mistakenly deploying - // an instance of this contract, which should be used via inheritance. - constructor () internal { } - // solhint-disable-previous-line no-empty-blocks - - function _msgSender() internal view returns (address payable) { - return msg.sender; - } - - function _msgData() internal view returns (bytes memory) { - this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 - return msg.data; - } -} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/Roles.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/Roles.sol deleted file mode 100644 index 5f3eff6ae..000000000 --- a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/Roles.sol +++ /dev/null @@ -1,36 +0,0 @@ -pragma solidity ^0.5.0; - -/** - * @title Roles - * @dev Library for managing addresses assigned to a Role. - */ -library Roles { - struct Role { - mapping (address => bool) bearer; - } - - /** - * @dev Give an account access to this role. - */ - function add(Role storage role, address account) internal { - require(!has(role, account), "Roles: account already has role"); - role.bearer[account] = true; - } - - /** - * @dev Remove an account's access to this role. - */ - function remove(Role storage role, address account) internal { - require(has(role, account), "Roles: account does not have role"); - role.bearer[account] = false; - } - - /** - * @dev Check if an account has this role. - * @return bool - */ - function has(Role storage role, address account) internal view returns (bool) { - require(account != address(0), "Roles: account is the zero address"); - return role.bearer[account]; - } -} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol deleted file mode 100644 index f881e3a73..000000000 --- a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol +++ /dev/null @@ -1,44 +0,0 @@ -pragma solidity ^0.5.0; - -import "../../GSN/Context.sol"; -import "../Roles.sol"; - -contract MinterRole is Context { - using Roles for Roles.Role; - - event MinterAdded(address indexed account); - event MinterRemoved(address indexed account); - - Roles.Role private _minters; - - constructor () internal { - _addMinter(_msgSender()); - } - - modifier onlyMinter() { - require(isMinter(_msgSender()), "MinterRole: caller does not have the Minter role"); - _; - } - - function isMinter(address account) public view returns (bool) { - return _minters.has(account); - } - - function addMinter(address account) public onlyMinter { - _addMinter(account); - } - - function renounceMinter() public { - _removeMinter(_msgSender()); - } - - function _addMinter(address account) internal { - _minters.add(account); - emit MinterAdded(account); - } - - function _removeMinter(address account) internal { - _minters.remove(account); - emit MinterRemoved(account); - } -} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol deleted file mode 100644 index 6ad238402..000000000 --- a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol +++ /dev/null @@ -1,44 +0,0 @@ -pragma solidity ^0.5.0; - -import "../../GSN/Context.sol"; -import "../Roles.sol"; - -contract PauserRole is Context { - using Roles for Roles.Role; - - event PauserAdded(address indexed account); - event PauserRemoved(address indexed account); - - Roles.Role private _pausers; - - constructor () internal { - _addPauser(_msgSender()); - } - - modifier onlyPauser() { - require(isPauser(_msgSender()), "PauserRole: caller does not have the Pauser role"); - _; - } - - function isPauser(address account) public view returns (bool) { - return _pausers.has(account); - } - - function addPauser(address account) public onlyPauser { - _addPauser(account); - } - - function renouncePauser() public { - _removePauser(_msgSender()); - } - - function _addPauser(address account) internal { - _pausers.add(account); - emit PauserAdded(account); - } - - function _removePauser(address account) internal { - _pausers.remove(account); - emit PauserRemoved(account); - } -} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol deleted file mode 100644 index 77d11e33b..000000000 --- a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol +++ /dev/null @@ -1,74 +0,0 @@ -pragma solidity ^0.5.0; - -import "../GSN/Context.sol"; -import "../access/roles/PauserRole.sol"; - -/** - * @dev Contract module which allows children to implement an emergency stop - * mechanism that can be triggered by an authorized account. - * - * This module is used through inheritance. It will make available the - * modifiers `whenNotPaused` and `whenPaused`, which can be applied to - * the functions of your contract. Note that they will not be pausable by - * simply including this module, only once the modifiers are put in place. - */ -contract Pausable is Context, PauserRole { - /** - * @dev Emitted when the pause is triggered by a pauser (`account`). - */ - event Paused(address account); - - /** - * @dev Emitted when the pause is lifted by a pauser (`account`). - */ - event Unpaused(address account); - - bool private _paused; - - /** - * @dev Initializes the contract in unpaused state. Assigns the Pauser role - * to the deployer. - */ - constructor () internal { - _paused = false; - } - - /** - * @dev Returns true if the contract is paused, and false otherwise. - */ - function paused() public view returns (bool) { - return _paused; - } - - /** - * @dev Modifier to make a function callable only when the contract is not paused. - */ - modifier whenNotPaused() { - require(!_paused, "Pausable: paused"); - _; - } - - /** - * @dev Modifier to make a function callable only when the contract is paused. - */ - modifier whenPaused() { - require(_paused, "Pausable: not paused"); - _; - } - - /** - * @dev Called by a pauser to pause, triggers stopped state. - */ - function pause() public onlyPauser whenNotPaused { - _paused = true; - emit Paused(_msgSender()); - } - - /** - * @dev Called by a pauser to unpause, returns to normal state. - */ - function unpause() public onlyPauser whenPaused { - _paused = false; - emit Unpaused(_msgSender()); - } -} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/math/SafeMath.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/math/SafeMath.sol deleted file mode 100644 index e7091fb22..000000000 --- a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/math/SafeMath.sol +++ /dev/null @@ -1,156 +0,0 @@ -pragma solidity ^0.5.0; - -/** - * @dev Wrappers over Solidity's arithmetic operations with added overflow - * checks. - * - * Arithmetic operations in Solidity wrap on overflow. This can easily result - * in bugs, because programmers usually assume that an overflow raises an - * error, which is the standard behavior in high level programming languages. - * `SafeMath` restores this intuition by reverting the transaction when an - * operation overflows. - * - * Using this library instead of the unchecked operations eliminates an entire - * class of bugs, so it's recommended to use it always. - */ -library SafeMath { - /** - * @dev Returns the addition of two unsigned integers, reverting on - * overflow. - * - * Counterpart to Solidity's `+` operator. - * - * Requirements: - * - Addition cannot overflow. - */ - function add(uint256 a, uint256 b) internal pure returns (uint256) { - uint256 c = a + b; - require(c >= a, "SafeMath: addition overflow"); - - return c; - } - - /** - * @dev Returns the subtraction of two unsigned integers, reverting on - * overflow (when the result is negative). - * - * Counterpart to Solidity's `-` operator. - * - * Requirements: - * - Subtraction cannot overflow. - */ - function sub(uint256 a, uint256 b) internal pure returns (uint256) { - return sub(a, b, "SafeMath: subtraction overflow"); - } - - /** - * @dev Returns the subtraction of two unsigned integers, reverting with custom message on - * overflow (when the result is negative). - * - * Counterpart to Solidity's `-` operator. - * - * Requirements: - * - Subtraction cannot overflow. - * - * _Available since v2.4.0._ - */ - function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { - require(b <= a, errorMessage); - uint256 c = a - b; - - return c; - } - - /** - * @dev Returns the multiplication of two unsigned integers, reverting on - * overflow. - * - * Counterpart to Solidity's `*` operator. - * - * Requirements: - * - Multiplication cannot overflow. - */ - function mul(uint256 a, uint256 b) internal pure returns (uint256) { - // Gas optimization: this is cheaper than requiring 'a' not being zero, but the - // benefit is lost if 'b' is also tested. - // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 - if (a == 0) { - return 0; - } - - uint256 c = a * b; - require(c / a == b, "SafeMath: multiplication overflow"); - - return c; - } - - /** - * @dev Returns the integer division of two unsigned integers. Reverts on - * division by zero. The result is rounded towards zero. - * - * Counterpart to Solidity's `/` operator. Note: this function uses a - * `revert` opcode (which leaves remaining gas untouched) while Solidity - * uses an invalid opcode to revert (consuming all remaining gas). - * - * Requirements: - * - The divisor cannot be zero. - */ - function div(uint256 a, uint256 b) internal pure returns (uint256) { - return div(a, b, "SafeMath: division by zero"); - } - - /** - * @dev Returns the integer division of two unsigned integers. Reverts with custom message on - * division by zero. The result is rounded towards zero. - * - * Counterpart to Solidity's `/` operator. Note: this function uses a - * `revert` opcode (which leaves remaining gas untouched) while Solidity - * uses an invalid opcode to revert (consuming all remaining gas). - * - * Requirements: - * - The divisor cannot be zero. - * - * _Available since v2.4.0._ - */ - function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { - // Solidity only automatically asserts when dividing by 0 - require(b > 0, errorMessage); - uint256 c = a / b; - // assert(a == b * c + a % b); // There is no case in which this doesn't hold - - return c; - } - - /** - * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), - * Reverts when dividing by zero. - * - * Counterpart to Solidity's `%` operator. This function uses a `revert` - * opcode (which leaves remaining gas untouched) while Solidity uses an - * invalid opcode to revert (consuming all remaining gas). - * - * Requirements: - * - The divisor cannot be zero. - */ - function mod(uint256 a, uint256 b) internal pure returns (uint256) { - return mod(a, b, "SafeMath: modulo by zero"); - } - - /** - * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), - * Reverts with custom message when dividing by zero. - * - * Counterpart to Solidity's `%` operator. This function uses a `revert` - * opcode (which leaves remaining gas untouched) while Solidity uses an - * invalid opcode to revert (consuming all remaining gas). - * - * Requirements: - * - The divisor cannot be zero. - * - * _Available since v2.4.0._ - */ - function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { - require(b != 0, errorMessage); - return a % b; - } -} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol deleted file mode 100644 index 0846fb2cb..000000000 --- a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol +++ /dev/null @@ -1,230 +0,0 @@ -pragma solidity ^0.5.0; - -import "../../GSN/Context.sol"; -import "./IERC20.sol"; -import "../../math/SafeMath.sol"; - -/** - * @dev Implementation of the {IERC20} interface. - * - * This implementation is agnostic to the way tokens are created. This means - * that a supply mechanism has to be added in a derived contract using {_mint}. - * For a generic mechanism see {ERC20Mintable}. - * - * TIP: For a detailed writeup see our guide - * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How - * to implement supply mechanisms]. - * - * We have followed general OpenZeppelin guidelines: functions revert instead - * of returning `false` on failure. This behavior is nonetheless conventional - * and does not conflict with the expectations of ERC20 applications. - * - * Additionally, an {Approval} event is emitted on calls to {transferFrom}. - * This allows applications to reconstruct the allowance for all accounts just - * by listening to said events. Other implementations of the EIP may not emit - * these events, as it isn't required by the specification. - * - * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} - * functions have been added to mitigate the well-known issues around setting - * allowances. See {IERC20-approve}. - */ -contract ERC20 is Context, IERC20 { - using SafeMath for uint256; - - mapping (address => uint256) private _balances; - - mapping (address => mapping (address => uint256)) private _allowances; - - uint256 private _totalSupply; - - /** - * @dev See {IERC20-totalSupply}. - */ - function totalSupply() public view returns (uint256) { - return _totalSupply; - } - - /** - * @dev See {IERC20-balanceOf}. - */ - function balanceOf(address account) public view returns (uint256) { - return _balances[account]; - } - - /** - * @dev See {IERC20-transfer}. - * - * Requirements: - * - * - `recipient` cannot be the zero address. - * - the caller must have a balance of at least `amount`. - */ - function transfer(address recipient, uint256 amount) public returns (bool) { - _transfer(_msgSender(), recipient, amount); - return true; - } - - /** - * @dev See {IERC20-allowance}. - */ - function allowance(address owner, address spender) public view returns (uint256) { - return _allowances[owner][spender]; - } - - /** - * @dev See {IERC20-approve}. - * - * Requirements: - * - * - `spender` cannot be the zero address. - */ - function approve(address spender, uint256 amount) public returns (bool) { - _approve(_msgSender(), spender, amount); - return true; - } - - /** - * @dev See {IERC20-transferFrom}. - * - * Emits an {Approval} event indicating the updated allowance. This is not - * required by the EIP. See the note at the beginning of {ERC20}; - * - * Requirements: - * - `sender` and `recipient` cannot be the zero address. - * - `sender` must have a balance of at least `amount`. - * - the caller must have allowance for `sender`'s tokens of at least - * `amount`. - */ - function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { - _transfer(sender, recipient, amount); - _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); - return true; - } - - /** - * @dev Atomically increases the allowance granted to `spender` by the caller. - * - * This is an alternative to {approve} that can be used as a mitigation for - * problems described in {IERC20-approve}. - * - * Emits an {Approval} event indicating the updated allowance. - * - * Requirements: - * - * - `spender` cannot be the zero address. - */ - function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { - _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); - return true; - } - - /** - * @dev Atomically decreases the allowance granted to `spender` by the caller. - * - * This is an alternative to {approve} that can be used as a mitigation for - * problems described in {IERC20-approve}. - * - * Emits an {Approval} event indicating the updated allowance. - * - * Requirements: - * - * - `spender` cannot be the zero address. - * - `spender` must have allowance for the caller of at least - * `subtractedValue`. - */ - function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { - _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); - return true; - } - - /** - * @dev Moves tokens `amount` from `sender` to `recipient`. - * - * This is internal function is equivalent to {transfer}, and can be used to - * e.g. implement automatic token fees, slashing mechanisms, etc. - * - * Emits a {Transfer} event. - * - * Requirements: - * - * - `sender` cannot be the zero address. - * - `recipient` cannot be the zero address. - * - `sender` must have a balance of at least `amount`. - */ - function _transfer(address sender, address recipient, uint256 amount) internal { - require(sender != address(0), "ERC20: transfer from the zero address"); - require(recipient != address(0), "ERC20: transfer to the zero address"); - - _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); - _balances[recipient] = _balances[recipient].add(amount); - emit Transfer(sender, recipient, amount); - } - - /** @dev Creates `amount` tokens and assigns them to `account`, increasing - * the total supply. - * - * Emits a {Transfer} event with `from` set to the zero address. - * - * Requirements - * - * - `to` cannot be the zero address. - */ - function _mint(address account, uint256 amount) internal { - require(account != address(0), "ERC20: mint to the zero address"); - - _totalSupply = _totalSupply.add(amount); - _balances[account] = _balances[account].add(amount); - emit Transfer(address(0), account, amount); - } - - /** - * @dev Destroys `amount` tokens from `account`, reducing the - * total supply. - * - * Emits a {Transfer} event with `to` set to the zero address. - * - * Requirements - * - * - `account` cannot be the zero address. - * - `account` must have at least `amount` tokens. - */ - function _burn(address account, uint256 amount) internal { - require(account != address(0), "ERC20: burn from the zero address"); - - _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); - _totalSupply = _totalSupply.sub(amount); - emit Transfer(account, address(0), amount); - } - - /** - * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. - * - * This is internal function is equivalent to `approve`, and can be used to - * e.g. set automatic allowances for certain subsystems, etc. - * - * Emits an {Approval} event. - * - * Requirements: - * - * - `owner` cannot be the zero address. - * - `spender` cannot be the zero address. - */ - function _approve(address owner, address spender, uint256 amount) internal { - require(owner != address(0), "ERC20: approve from the zero address"); - require(spender != address(0), "ERC20: approve to the zero address"); - - _allowances[owner][spender] = amount; - emit Approval(owner, spender, amount); - } - - /** - * @dev Destroys `amount` tokens from `account`.`amount` is then deducted - * from the caller's allowance. - * - * See {_burn} and {_approve}. - */ - function _burnFrom(address account, uint256 amount) internal { - _burn(account, amount); - _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); - } -} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol deleted file mode 100644 index e58b72b25..000000000 --- a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol +++ /dev/null @@ -1,27 +0,0 @@ -pragma solidity ^0.5.0; - -import "../../GSN/Context.sol"; -import "./ERC20.sol"; - -/** - * @dev Extension of {ERC20} that allows token holders to destroy both their own - * tokens and those that they have an allowance for, in a way that can be - * recognized off-chain (via event analysis). - */ -contract ERC20Burnable is Context, ERC20 { - /** - * @dev Destroys `amount` tokens from the caller. - * - * See {ERC20-_burn}. - */ - function burn(uint256 amount) public { - _burn(_msgSender(), amount); - } - - /** - * @dev See {ERC20-_burnFrom}. - */ - function burnFrom(address account, uint256 amount) public { - _burnFrom(account, amount); - } -} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol deleted file mode 100644 index 61d4ab922..000000000 --- a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol +++ /dev/null @@ -1,54 +0,0 @@ -pragma solidity ^0.5.0; - -import "./IERC20.sol"; - -/** - * @dev Optional functions from the ERC20 standard. - */ -contract ERC20Detailed is IERC20 { - string private _name; - string private _symbol; - uint8 private _decimals; - - /** - * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of - * these values are immutable: they can only be set once during - * construction. - */ - constructor (string memory name, string memory symbol, uint8 decimals) public { - _name = name; - _symbol = symbol; - _decimals = decimals; - } - - /** - * @dev Returns the name of the token. - */ - function name() public view returns (string memory) { - return _name; - } - - /** - * @dev Returns the symbol of the token, usually a shorter version of the - * name. - */ - function symbol() public view returns (string memory) { - return _symbol; - } - - /** - * @dev Returns the number of decimals used to get its user representation. - * For example, if `decimals` equals `2`, a balance of `505` tokens should - * be displayed to a user as `5,05` (`505 / 10 ** 2`). - * - * Tokens usually opt for a value of 18, imitating the relationship between - * Ether and Wei. - * - * NOTE: This information is only used for _display_ purposes: it in - * no way affects any of the arithmetic of the contract, including - * {IERC20-balanceOf} and {IERC20-transfer}. - */ - function decimals() public view returns (uint8) { - return _decimals; - } -} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol deleted file mode 100644 index d2fd5b737..000000000 --- a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol +++ /dev/null @@ -1,24 +0,0 @@ -pragma solidity ^0.5.0; - -import "./ERC20.sol"; -import "../../access/roles/MinterRole.sol"; - -/** - * @dev Extension of {ERC20} that adds a set of accounts with the {MinterRole}, - * which have permission to mint (create) new tokens as they see fit. - * - * At construction, the deployer of the contract is the only minter. - */ -contract ERC20Mintable is ERC20, MinterRole { - /** - * @dev See {ERC20-_mint}. - * - * Requirements: - * - * - the caller must have the {MinterRole}. - */ - function mint(address account, uint256 amount) public onlyMinter returns (bool) { - _mint(account, amount); - return true; - } -} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol deleted file mode 100644 index 5e8641ebc..000000000 --- a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol +++ /dev/null @@ -1,34 +0,0 @@ -pragma solidity ^0.5.0; - -import "./ERC20.sol"; -import "../../lifecycle/Pausable.sol"; - -/** - * @title Pausable token - * @dev ERC20 with pausable transfers and allowances. - * - * Useful if you want to stop trades until the end of a crowdsale, or have - * an emergency switch for freezing all token transfers in the event of a large - * bug. - */ -contract ERC20Pausable is ERC20, Pausable { - function transfer(address to, uint256 value) public whenNotPaused returns (bool) { - return super.transfer(to, value); - } - - function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) { - return super.transferFrom(from, to, value); - } - - function approve(address spender, uint256 value) public whenNotPaused returns (bool) { - return super.approve(spender, value); - } - - function increaseAllowance(address spender, uint256 addedValue) public whenNotPaused returns (bool) { - return super.increaseAllowance(spender, addedValue); - } - - function decreaseAllowance(address spender, uint256 subtractedValue) public whenNotPaused returns (bool) { - return super.decreaseAllowance(spender, subtractedValue); - } -} diff --git a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol b/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol deleted file mode 100644 index bf5245ff0..000000000 --- a/test/chains/sources/250/@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol +++ /dev/null @@ -1,76 +0,0 @@ -pragma solidity ^0.5.0; - -/** - * @dev Interface of the ERC20 standard as defined in the EIP. Does not include - * the optional functions; to access them see {ERC20Detailed}. - */ -interface IERC20 { - /** - * @dev Returns the amount of tokens in existence. - */ - function totalSupply() external view returns (uint256); - - /** - * @dev Returns the amount of tokens owned by `account`. - */ - function balanceOf(address account) external view returns (uint256); - - /** - * @dev Moves `amount` tokens from the caller's account to `recipient`. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ - function transfer(address recipient, uint256 amount) external returns (bool); - - /** - * @dev Returns the remaining number of tokens that `spender` will be - * allowed to spend on behalf of `owner` through {transferFrom}. This is - * zero by default. - * - * This value changes when {approve} or {transferFrom} are called. - */ - function allowance(address owner, address spender) external view returns (uint256); - - /** - * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * IMPORTANT: Beware that changing an allowance with this method brings the risk - * that someone may use both the old and the new allowance by unfortunate - * transaction ordering. One possible solution to mitigate this race - * condition is to first reduce the spender's allowance to 0 and set the - * desired value afterwards: - * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - * - * Emits an {Approval} event. - */ - function approve(address spender, uint256 amount) external returns (bool); - - /** - * @dev Moves `amount` tokens from `sender` to `recipient` using the - * allowance mechanism. `amount` is then deducted from the caller's - * allowance. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ - function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); - - /** - * @dev Emitted when `value` tokens are moved from one account (`from`) to - * another (`to`). - * - * Note that `value` may be zero. - */ - event Transfer(address indexed from, address indexed to, uint256 value); - - /** - * @dev Emitted when the allowance of a `spender` for an `owner` is set by - * a call to {approve}. `value` is the new allowance. - */ - event Approval(address indexed owner, address indexed spender, uint256 value); -} diff --git a/test/chains/sources/250/FUSDToken.sol b/test/chains/sources/250/FUSDToken.sol deleted file mode 100644 index d86725ed1..000000000 --- a/test/chains/sources/250/FUSDToken.sol +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.5.0; - -import "./@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol"; -import "./@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol"; -import "./@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol"; -import "./@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol"; -import "./@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol"; - -/** - * Implements ERC20 fUSD tokens using OpenZeppelin libraries. - */ -contract FUSDToken is ERC20, ERC20Detailed, ERC20Mintable, ERC20Burnable, ERC20Pausable { - // create instance of the fUSD token - constructor () public ERC20Detailed("Fantom StableCoin USD", "FUSD", 18) { - // mint single token to begin with? - } -} diff --git a/test/chains/sources/250/metadata.json b/test/chains/sources/250/metadata.json deleted file mode 100644 index 911f03e7e..000000000 --- a/test/chains/sources/250/metadata.json +++ /dev/null @@ -1,657 +0,0 @@ -{ - "compiler": { - "version": "0.5.0+commit.1d4f565a" - }, - "language": "Solidity", - "output": { - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "from", - "type": "address" - }, - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "unpause", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "account", - "type": "address" - }, - { - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "account", - "type": "address" - } - ], - "name": "isPauser", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "paused", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renouncePauser", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "account", - "type": "address" - }, - { - "name": "amount", - "type": "uint256" - } - ], - "name": "burnFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "account", - "type": "address" - } - ], - "name": "addPauser", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "pause", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "account", - "type": "address" - } - ], - "name": "addMinter", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceMinter", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "account", - "type": "address" - } - ], - "name": "isMinter", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "account", - "type": "address" - } - ], - "name": "PauserAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "account", - "type": "address" - } - ], - "name": "PauserRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "account", - "type": "address" - } - ], - "name": "MinterAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "account", - "type": "address" - } - ], - "name": "MinterRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } - ], - "devdoc": { - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "burn(uint256)": { - "details": "Destroys `amount` tokens from the caller. * See {ERC20-_burn}." - }, - "burnFrom(address,uint256)": { - "details": "See {ERC20-_burnFrom}." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. * NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "mint(address,uint256)": { - "details": "See {ERC20-_mint}. * Requirements: * - the caller must have the {MinterRole}." - }, - "name()": { - "details": "Returns the name of the token." - }, - "pause()": { - "details": "Called by a pauser to pause, triggers stopped state." - }, - "paused()": { - "details": "Returns true if the contract is paused, and false otherwise." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "unpause()": { - "details": "Called by a pauser to unpause, returns to normal state." - } - } - }, - "userdoc": { - "methods": {}, - "notice": "Implements ERC20 fUSD tokens using OpenZeppelin libraries." - } - }, - "settings": { - "compilationTarget": { - "FUSDToken.sol": "FUSDToken" - }, - "evmVersion": "byzantium", - "libraries": {}, - "optimizer": { - "enabled": false, - "runs": 200 - }, - "remappings": [] - }, - "sources": { - "@openzeppelin/contracts@2.5.0/GSN/Context.sol": { - "keccak256": "0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061", - "urls": [ - "bzzr://51482c01bddf23793bddee43b60ab9578a62948a4f2082def24ea792a553b055" - ] - }, - "@openzeppelin/contracts@2.5.0/access/Roles.sol": { - "keccak256": "0xb002c378d7b82a101bd659c341518953ca0919d342c0a400196982c0e7e7bcdb", - "urls": [ - "bzzr://bd34c1ce05b5b2b3a62fc02e160f6805b1cadd476854664f433c685b2fda8dad" - ] - }, - "@openzeppelin/contracts@2.5.0/access/roles/MinterRole.sol": { - "keccak256": "0xbe8eef6f2cb4e427f5c5d8a76865ccd06e55a4f1d6671ba312d45bfa705aedbf", - "urls": [ - "bzzr://946a26eebf5d294534471d07c4dc449ce3123e9fc2994bdfcd99dff1d09cc1af" - ] - }, - "@openzeppelin/contracts@2.5.0/access/roles/PauserRole.sol": { - "keccak256": "0xd1b5c934bab36d753c22987ad98c7614cb50ebf641371a83c96f8138619d7c30", - "urls": [ - "bzzr://39c672e2273e863fd2a6d1bc452e38887b48c113483b0e4c9d7aff60f3337483" - ] - }, - "@openzeppelin/contracts@2.5.0/lifecycle/Pausable.sol": { - "keccak256": "0xd3e5a49edfb74654d122962cc60b917d1c60461e669a7262fd7aba201fac1260", - "urls": [ - "bzzr://78a64ae8f0f90b1aa83280e0735930a16f416eeda54683d2f6280a67ad3758d6" - ] - }, - "@openzeppelin/contracts@2.5.0/math/SafeMath.sol": { - "keccak256": "0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076", - "urls": [ - "bzzr://292843005e754e752644f767477ec5ad7a1ffc91ddb18c38b8079c62f3993cad" - ] - }, - "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20.sol": { - "keccak256": "0xb15af804e2bc97db51e4e103f13de9fe13f87e6b835d7a88c897966c0e58506e", - "urls": [ - "bzzr://6200c125af376381ae6c5415b8f3c1cb83889be20a7a51d67ac607487a10313b" - ] - }, - "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Burnable.sol": { - "keccak256": "0x9b94356691f3cbf90a5d83ae3fdf6a5a662bb004d2bd8b034160d60221807e64", - "urls": [ - "bzzr://c59f70303d4a8bc640926844c489765661caf274397542a19af7c3930051ce83" - ] - }, - "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Detailed.sol": { - "keccak256": "0x4a3a810b7ebe742e897e1fd428b3eeed2196d3acea58eaf9c566ed10d545d2ed", - "urls": [ - "bzzr://729aefb3f89f616c954a0735f8b4dd8804bdd0351e96f8e904fdb3e78a109b6c" - ] - }, - "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Mintable.sol": { - "keccak256": "0xa2b957cf89692c504962afb7506999155f83385373f808243246cd5879de5940", - "urls": [ - "bzzr://812521b94ef1bd30b0a93e14a97a0e79e2bf4cb607aa47c21c8177966a79fd1a" - ] - }, - "@openzeppelin/contracts@2.5.0/token/ERC20/ERC20Pausable.sol": { - "keccak256": "0xd5ae72078a1c90af870e1b9b86b0fc05eb14b4034e417bc66d151d3eb4d342ca", - "urls": [ - "bzzr://8926f6372c7696151349f02f4914dbbc27e7a053472e89bba75087ccefade457" - ] - }, - "@openzeppelin/contracts@2.5.0/token/ERC20/IERC20.sol": { - "keccak256": "0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9", - "urls": [ - "bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062" - ] - }, - "FUSDToken.sol": { - "keccak256": "0x1c79cc93846fc2a8315d87f94c9c3d7930e9e66e125a3341d8acfc09c99bd2f7", - "urls": [ - "bzzr://610d9ce5c3e017ee5cca4cc74c049d21b6cc60b3eae46f07661d980c93b2794c" - ] - } - }, - "version": 1 -} \ No newline at end of file