From 589cb34246ca07bfdaff4158117aca72f14fb8b4 Mon Sep 17 00:00:00 2001 From: Dmytro Horbatenko Date: Wed, 1 Apr 2026 13:16:37 +0300 Subject: [PATCH] feat: mRe7ETH on Optimism --- .openzeppelin/optimism.json | 1977 +++++++++++++++++ ROLES.md | 13 +- config/constants/addresses.ts | 29 + config/networks/index.ts | 10 + config/networks/verify.config.ts | 4 + config/types/index.ts | 3 +- config/types/tokens.ts | 1 + .../mRe7ETH/MRe7EthCustomAggregatorFeed.sol | 28 + .../products/mRe7ETH/MRe7EthDataFeed.sol | 24 + .../products/mRe7ETH/MRe7EthDepositVault.sol | 24 + .../MRe7EthMidasAccessControlRoles.sol | 27 + .../MRe7EthRedemptionVaultWithSwapper.sol | 27 + contracts/products/mRe7ETH/mRe7ETH.sol | 67 + hardhat.config.ts | 1 + helpers/contracts.ts | 1 + helpers/mtokens-metadata.ts | 4 + helpers/roles.ts | 1 + scripts/deploy/configs/index.ts | 2 + scripts/deploy/configs/mRe7ETH.ts | 99 + scripts/deploy/configs/network-configs.ts | 9 + scripts/deploy/configs/payment-tokens.ts | 34 + 21 files changed, 2383 insertions(+), 2 deletions(-) create mode 100644 .openzeppelin/optimism.json create mode 100644 contracts/products/mRe7ETH/MRe7EthCustomAggregatorFeed.sol create mode 100644 contracts/products/mRe7ETH/MRe7EthDataFeed.sol create mode 100644 contracts/products/mRe7ETH/MRe7EthDepositVault.sol create mode 100644 contracts/products/mRe7ETH/MRe7EthMidasAccessControlRoles.sol create mode 100644 contracts/products/mRe7ETH/MRe7EthRedemptionVaultWithSwapper.sol create mode 100644 contracts/products/mRe7ETH/mRe7ETH.sol create mode 100644 scripts/deploy/configs/mRe7ETH.ts diff --git a/.openzeppelin/optimism.json b/.openzeppelin/optimism.json new file mode 100644 index 00000000..3ea00976 --- /dev/null +++ b/.openzeppelin/optimism.json @@ -0,0 +1,1977 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x2F8D0aa6810453b55C1077bDD8944dD037AfF2dc", + "txHash": "0x9c631e1948e510685a104bc9dd8a87f6a8ead124877847bc8fec71b2f82b1c28" + }, + "proxies": [ + { + "address": "0x08D0016Ac2Cf7027D460b2816eA3D0e74617beF8", + "txHash": "0xb3e05c4fbc1875d2e31d660e67ffc2a93a67cf48fe6f850f1b6c8f6cbc310483", + "kind": "transparent" + }, + { + "address": "0xE7Ba07519dFA06e60059563F484d6090dedF21B3", + "txHash": "0xfd6aa8ec62104d35caa4a4eb14564022fc62e6db1089f19a247cde566ce42f41", + "kind": "transparent" + }, + { + "address": "0xcFfe26979e96B9E0454cC83aa03FC973C9Eb0E5E", + "txHash": "0x2a573f7379271d9a7d94e8caf27196ed427359d4de73aead8c53d2d71b47b1ce", + "kind": "transparent" + }, + { + "address": "0x46129d0863667b1159C55F0B43b898bc3352130a", + "txHash": "0xcbd59e0095d26e07b3875c08c42f7fa196a9774bbf85606cdd04f68e4230dc87", + "kind": "transparent" + }, + { + "address": "0xC562F73ADD198ce47E9Af5B0752dE3D7c991225D", + "txHash": "0x92defb25bc715f6bc3f28813871025f83e0cb684896573f0f4913907f15f67dd", + "kind": "transparent" + }, + { + "address": "0x2c8AEe33a6B1eBDd047903B5FDe01D71B8854e6D", + "txHash": "0x862a30f8876198099e3914ef403552898f26cf70b8d983c3ae9d0b3184974b48", + "kind": "transparent" + }, + { + "address": "0xc79ab9Af2d3E87e91Ec1572C8C1Bc8D2EEBB4c24", + "txHash": "0x2055d4236d7d31e71aa295e888c426af6d6d5378fe57345cc8634bf5314edade", + "kind": "transparent" + }, + { + "address": "0x4C13A495D7A1eA5Fb9Afda5Faa7218666Ad794e3", + "txHash": "0x75f87371a0692243ecaac973385af3a102b57408e77d81695325b69c172ef4ca", + "kind": "transparent" + }, + { + "address": "0x7f711A1E6EF2Cc6De1A5580a634050286Ef27125", + "txHash": "0x786ba2b84c476d64c16291f633ee5d93e1e89d7b2b61999839393363c2b2becf", + "kind": "transparent" + }, + { + "address": "0x72E7303C4BFf823444098748B12eAd1EBc80768C", + "txHash": "0x1cc6e8df08abbab48652598774570707f5ee36933503d8e0ef94eb0ce01db47a", + "kind": "transparent" + } + ], + "impls": { + "6d838117edf6833c74149c4daf15a65a3ce1d9f7088af7b7c3517a631f80ea95": { + "address": "0xE187C0B2a2d748Be0a09342239639ea08b822E7d", + "txHash": "0xc52e285ec220507515197a13621b15c179722ec26ebe1861f78096c3802804db", + "layout": { + "solcVersion": "0.8.22", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)6036_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:62" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:260" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)6036_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)6036_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "7006db598598e7fdc2d6455f9ff4c5657f28653e1d3c424e4d5498ebb19983ab": { + "address": "0x6F12177579E0BFd70EaB08900a3e119D8C9fa30A", + "txHash": "0x79348a7ba9daef915df76063b7c123ef3ece0e787e9d504ca53d90f8a28bef07", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:46" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:47" + }, + { + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:376" + }, + { + "label": "_paused", + "offset": 0, + "slot": "101", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC20PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol:48" + }, + { + "label": "accessControl", + "offset": 0, + "slot": "201", + "type": "t_contract(MidasAccessControl)10756", + "contract": "WithMidasAccessControl", + "src": "contracts/access/WithMidasAccessControl.sol:24" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)50_storage", + "contract": "WithMidasAccessControl", + "src": "contracts/access/WithMidasAccessControl.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)50_storage", + "contract": "Blacklistable", + "src": "contracts/access/Blacklistable.sol:16" + }, + { + "label": "metadata", + "offset": 0, + "slot": "302", + "type": "t_mapping(t_bytes32,t_bytes_storage)", + "contract": "mToken", + "src": "contracts/mToken.sol:18" + }, + { + "label": "__gap", + "offset": 0, + "slot": "303", + "type": "t_array(t_uint256)50_storage", + "contract": "mToken", + "src": "contracts/mToken.sol:23" + }, + { + "label": "__gap", + "offset": 0, + "slot": "353", + "type": "t_array(t_uint256)50_storage", + "contract": "mRe7ETH", + "src": "contracts/products/mRe7ETH/mRe7ETH.sol:33" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(MidasAccessControl)10756": { + "label": "contract MidasAccessControl", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bytes_storage)": { + "label": "mapping(bytes32 => bytes)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "d4d53ed9bd8ba1ac13ca03d785ecd8da04cc8f714a308aa031ca3728b4d4198c": { + "address": "0x9FbE6b4773c6b34Ec3414BefA8f6a25C62B4F2DA", + "txHash": "0xcce43826dd5f593aa675747c281dcc36d51b180b717b03c0def87fe79ba56f76", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "accessControl", + "offset": 2, + "slot": "0", + "type": "t_contract(MidasAccessControl)10756", + "contract": "WithMidasAccessControl", + "src": "contracts/access/WithMidasAccessControl.sol:24" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "WithMidasAccessControl", + "src": "contracts/access/WithMidasAccessControl.sol:29" + }, + { + "label": "description", + "offset": 0, + "slot": "51", + "type": "t_string_storage", + "contract": "CustomAggregatorV3CompatibleFeed", + "src": "contracts/feeds/CustomAggregatorV3CompatibleFeed.sol:31" + }, + { + "label": "latestRound", + "offset": 0, + "slot": "52", + "type": "t_uint80", + "contract": "CustomAggregatorV3CompatibleFeed", + "src": "contracts/feeds/CustomAggregatorV3CompatibleFeed.sol:36" + }, + { + "label": "maxAnswerDeviation", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "CustomAggregatorV3CompatibleFeed", + "src": "contracts/feeds/CustomAggregatorV3CompatibleFeed.sol:42" + }, + { + "label": "minAnswer", + "offset": 0, + "slot": "54", + "type": "t_int192", + "contract": "CustomAggregatorV3CompatibleFeed", + "src": "contracts/feeds/CustomAggregatorV3CompatibleFeed.sol:47" + }, + { + "label": "maxAnswer", + "offset": 0, + "slot": "55", + "type": "t_int192", + "contract": "CustomAggregatorV3CompatibleFeed", + "src": "contracts/feeds/CustomAggregatorV3CompatibleFeed.sol:52" + }, + { + "label": "_roundData", + "offset": 0, + "slot": "56", + "type": "t_mapping(t_uint80,t_struct(RoundData)11081_storage)", + "contract": "CustomAggregatorV3CompatibleFeed", + "src": "contracts/feeds/CustomAggregatorV3CompatibleFeed.sol:57" + }, + { + "label": "__gap", + "offset": 0, + "slot": "57", + "type": "t_array(t_uint256)50_storage", + "contract": "MRe7EthCustomAggregatorFeed", + "src": "contracts/products/mRe7ETH/MRe7EthCustomAggregatorFeed.sol:20" + } + ], + "types": { + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(MidasAccessControl)10756": { + "label": "contract MidasAccessControl", + "numberOfBytes": "20" + }, + "t_int192": { + "label": "int192", + "numberOfBytes": "24" + }, + "t_int256": { + "label": "int256", + "numberOfBytes": "32" + }, + "t_mapping(t_uint80,t_struct(RoundData)11081_storage)": { + "label": "mapping(uint80 => struct CustomAggregatorV3CompatibleFeed.RoundData)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(RoundData)11081_storage": { + "label": "struct CustomAggregatorV3CompatibleFeed.RoundData", + "members": [ + { + "label": "roundId", + "type": "t_uint80", + "offset": 0, + "slot": "0" + }, + { + "label": "answer", + "type": "t_int256", + "offset": 0, + "slot": "1" + }, + { + "label": "startedAt", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "updatedAt", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "answeredInRound", + "type": "t_uint80", + "offset": 0, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + }, + "t_uint80": { + "label": "uint80", + "numberOfBytes": "10" + } + } + } + }, + "8a838383d0a9fe6fc761e46f0ef9b47f5375b7f8be94840730d7c9e901e7ef6b": { + "address": "0x1de8D819f3C08B3EE19A3F2662e4B6976941aC96", + "txHash": "0x4fce2750bbf7799ec5e4761a189d84b142ef24fcc2ac873ed145b7f3c185bcde", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "accessControl", + "offset": 2, + "slot": "0", + "type": "t_contract(MidasAccessControl)10756", + "contract": "WithMidasAccessControl", + "src": "contracts/access/WithMidasAccessControl.sol:24" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "WithMidasAccessControl", + "src": "contracts/access/WithMidasAccessControl.sol:29" + }, + { + "label": "aggregator", + "offset": 0, + "slot": "51", + "type": "t_contract(AggregatorV3Interface)45", + "contract": "DataFeed", + "src": "contracts/feeds/DataFeed.sol:22" + }, + { + "label": "healthyDiff", + "offset": 0, + "slot": "52", + "type": "t_uint256", + "contract": "DataFeed", + "src": "contracts/feeds/DataFeed.sol:27" + }, + { + "label": "minExpectedAnswer", + "offset": 0, + "slot": "53", + "type": "t_int256", + "contract": "DataFeed", + "src": "contracts/feeds/DataFeed.sol:32" + }, + { + "label": "maxExpectedAnswer", + "offset": 0, + "slot": "54", + "type": "t_int256", + "contract": "DataFeed", + "src": "contracts/feeds/DataFeed.sol:37" + }, + { + "label": "__gap", + "offset": 0, + "slot": "55", + "type": "t_array(t_uint256)50_storage", + "contract": "DataFeed", + "src": "contracts/feeds/DataFeed.sol:42" + }, + { + "label": "__gap", + "offset": 0, + "slot": "105", + "type": "t_array(t_uint256)50_storage", + "contract": "MRe7EthDataFeed", + "src": "contracts/products/mRe7ETH/MRe7EthDataFeed.sol:16" + } + ], + "types": { + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(AggregatorV3Interface)45": { + "label": "contract AggregatorV3Interface", + "numberOfBytes": "20" + }, + "t_contract(MidasAccessControl)10756": { + "label": "contract MidasAccessControl", + "numberOfBytes": "20" + }, + "t_int256": { + "label": "int256", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "69fe95cc2a9e516c66f9aef2e473d90bed8a390492fa5c0ab18b43ea9ce6cb27": { + "address": "0xa7a4969d5b5CBdF9c42b538dfB3A36f18D7947fE", + "txHash": "0x22be06007f880146fdb4a5b8455bdc3802dd0a09a6f34da6aa105bc613e56b91", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "accessControl", + "offset": 2, + "slot": "0", + "type": "t_contract(MidasAccessControl)10756", + "contract": "WithMidasAccessControl", + "src": "contracts/access/WithMidasAccessControl.sol:24" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "WithMidasAccessControl", + "src": "contracts/access/WithMidasAccessControl.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_paused", + "offset": 0, + "slot": "101", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "fnPaused", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes4,t_bool)", + "contract": "Pausable", + "src": "contracts/access/Pausable.sol:14" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)50_storage", + "contract": "Pausable", + "src": "contracts/access/Pausable.sol:19" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)50_storage", + "contract": "Blacklistable", + "src": "contracts/access/Blacklistable.sol:16" + }, + { + "label": "greenlistEnabled", + "offset": 0, + "slot": "252", + "type": "t_bool", + "contract": "Greenlistable", + "src": "contracts/access/Greenlistable.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "253", + "type": "t_array(t_uint256)50_storage", + "contract": "Greenlistable", + "src": "contracts/access/Greenlistable.sol:21" + }, + { + "label": "sanctionsList", + "offset": 0, + "slot": "303", + "type": "t_address", + "contract": "WithSanctionsList", + "src": "contracts/abstract/WithSanctionsList.sol:18" + }, + { + "label": "__gap", + "offset": 0, + "slot": "304", + "type": "t_array(t_uint256)50_storage", + "contract": "WithSanctionsList", + "src": "contracts/abstract/WithSanctionsList.sol:23" + }, + { + "label": "currentRequestId", + "offset": 0, + "slot": "354", + "type": "t_struct(Counter)4934_storage", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:53" + }, + { + "label": "mToken", + "offset": 0, + "slot": "355", + "type": "t_contract(IMToken)12054", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:66" + }, + { + "label": "mTokenDataFeed", + "offset": 0, + "slot": "356", + "type": "t_contract(IDataFeed)11769", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:71" + }, + { + "label": "tokensReceiver", + "offset": 0, + "slot": "357", + "type": "t_address", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:76" + }, + { + "label": "instantFee", + "offset": 0, + "slot": "358", + "type": "t_uint256", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:81" + }, + { + "label": "instantDailyLimit", + "offset": 0, + "slot": "359", + "type": "t_uint256", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:88" + }, + { + "label": "dailyLimits", + "offset": 0, + "slot": "360", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:93" + }, + { + "label": "feeReceiver", + "offset": 0, + "slot": "361", + "type": "t_address", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:98" + }, + { + "label": "variationTolerance", + "offset": 0, + "slot": "362", + "type": "t_uint256", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:103" + }, + { + "label": "waivedFeeRestriction", + "offset": 0, + "slot": "363", + "type": "t_mapping(t_address,t_bool)", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:108" + }, + { + "label": "_paymentTokens", + "offset": 0, + "slot": "364", + "type": "t_struct(AddressSet)3891_storage", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:113" + }, + { + "label": "tokensConfig", + "offset": 0, + "slot": "366", + "type": "t_mapping(t_address,t_struct(TokenConfig)12067_storage)", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:118" + }, + { + "label": "minAmount", + "offset": 0, + "slot": "367", + "type": "t_uint256", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:123" + }, + { + "label": "isFreeFromMinAmount", + "offset": 0, + "slot": "368", + "type": "t_mapping(t_address,t_bool)", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:128" + }, + { + "label": "__gap", + "offset": 0, + "slot": "369", + "type": "t_array(t_uint256)50_storage", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:133" + }, + { + "label": "minMTokenAmountForFirstDeposit", + "offset": 0, + "slot": "419", + "type": "t_uint256", + "contract": "DepositVault", + "src": "contracts/DepositVault.sol:78" + }, + { + "label": "mintRequests", + "offset": 0, + "slot": "420", + "type": "t_mapping(t_uint256,t_struct(Request)11786_storage)", + "contract": "DepositVault", + "src": "contracts/DepositVault.sol:83" + }, + { + "label": "totalMinted", + "offset": 0, + "slot": "421", + "type": "t_mapping(t_address,t_uint256)", + "contract": "DepositVault", + "src": "contracts/DepositVault.sol:88" + }, + { + "label": "maxSupplyCap", + "offset": 0, + "slot": "422", + "type": "t_uint256", + "contract": "DepositVault", + "src": "contracts/DepositVault.sol:95" + }, + { + "label": "__gap", + "offset": 0, + "slot": "423", + "type": "t_array(t_uint256)49_storage", + "contract": "DepositVault", + "src": "contracts/DepositVault.sol:103" + }, + { + "label": "__gap", + "offset": 0, + "slot": "472", + "type": "t_array(t_uint256)50_storage", + "contract": "MRe7EthDepositVault", + "src": "contracts/products/mRe7ETH/MRe7EthDepositVault.sol:16" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes4": { + "label": "bytes4", + "numberOfBytes": "4" + }, + "t_contract(IDataFeed)11769": { + "label": "contract IDataFeed", + "numberOfBytes": "20" + }, + "t_contract(IMToken)12054": { + "label": "contract IMToken", + "numberOfBytes": "20" + }, + "t_contract(MidasAccessControl)10756": { + "label": "contract MidasAccessControl", + "numberOfBytes": "20" + }, + "t_enum(RequestStatus)12071": { + "label": "enum RequestStatus", + "members": ["Pending", "Processed", "Canceled"], + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(TokenConfig)12067_storage)": { + "label": "mapping(address => struct TokenConfig)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes4,t_bool)": { + "label": "mapping(bytes4 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Request)11786_storage)": { + "label": "mapping(uint256 => struct Request)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)3891_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)3576_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Counter)4934_storage": { + "label": "struct Counters.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Request)11786_storage": { + "label": "struct Request", + "members": [ + { + "label": "sender", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "tokenIn", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "status", + "type": "t_enum(RequestStatus)12071", + "offset": 20, + "slot": "1" + }, + { + "label": "depositedUsdAmount", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "usdAmountWithoutFees", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "tokenOutRate", + "type": "t_uint256", + "offset": 0, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_struct(Set)3576_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(TokenConfig)12067_storage": { + "label": "struct TokenConfig", + "members": [ + { + "label": "dataFeed", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "fee", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "allowance", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "stable", + "type": "t_bool", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "442b474c6d4b20cb613012c28d57ee6582c821abe52debb7d8de4e03095bb155": { + "address": "0x33477a2C7C4AbF34f93A4e61C31fD59D4a6f79DE", + "txHash": "0xf8090808af299a963026374db5ecec7daa787a7fbbf847b7c530f71e02ae0c0a", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "accessControl", + "offset": 2, + "slot": "0", + "type": "t_contract(MidasAccessControl)10756", + "contract": "WithMidasAccessControl", + "src": "contracts/access/WithMidasAccessControl.sol:24" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "WithMidasAccessControl", + "src": "contracts/access/WithMidasAccessControl.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_paused", + "offset": 0, + "slot": "101", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "fnPaused", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes4,t_bool)", + "contract": "Pausable", + "src": "contracts/access/Pausable.sol:14" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)50_storage", + "contract": "Pausable", + "src": "contracts/access/Pausable.sol:19" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)50_storage", + "contract": "Blacklistable", + "src": "contracts/access/Blacklistable.sol:16" + }, + { + "label": "greenlistEnabled", + "offset": 0, + "slot": "252", + "type": "t_bool", + "contract": "Greenlistable", + "src": "contracts/access/Greenlistable.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "253", + "type": "t_array(t_uint256)50_storage", + "contract": "Greenlistable", + "src": "contracts/access/Greenlistable.sol:21" + }, + { + "label": "sanctionsList", + "offset": 0, + "slot": "303", + "type": "t_address", + "contract": "WithSanctionsList", + "src": "contracts/abstract/WithSanctionsList.sol:18" + }, + { + "label": "__gap", + "offset": 0, + "slot": "304", + "type": "t_array(t_uint256)50_storage", + "contract": "WithSanctionsList", + "src": "contracts/abstract/WithSanctionsList.sol:23" + }, + { + "label": "currentRequestId", + "offset": 0, + "slot": "354", + "type": "t_struct(Counter)4934_storage", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:53" + }, + { + "label": "mToken", + "offset": 0, + "slot": "355", + "type": "t_contract(IMToken)12054", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:66" + }, + { + "label": "mTokenDataFeed", + "offset": 0, + "slot": "356", + "type": "t_contract(IDataFeed)11769", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:71" + }, + { + "label": "tokensReceiver", + "offset": 0, + "slot": "357", + "type": "t_address", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:76" + }, + { + "label": "instantFee", + "offset": 0, + "slot": "358", + "type": "t_uint256", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:81" + }, + { + "label": "instantDailyLimit", + "offset": 0, + "slot": "359", + "type": "t_uint256", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:88" + }, + { + "label": "dailyLimits", + "offset": 0, + "slot": "360", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:93" + }, + { + "label": "feeReceiver", + "offset": 0, + "slot": "361", + "type": "t_address", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:98" + }, + { + "label": "variationTolerance", + "offset": 0, + "slot": "362", + "type": "t_uint256", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:103" + }, + { + "label": "waivedFeeRestriction", + "offset": 0, + "slot": "363", + "type": "t_mapping(t_address,t_bool)", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:108" + }, + { + "label": "_paymentTokens", + "offset": 0, + "slot": "364", + "type": "t_struct(AddressSet)3891_storage", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:113" + }, + { + "label": "tokensConfig", + "offset": 0, + "slot": "366", + "type": "t_mapping(t_address,t_struct(TokenConfig)12067_storage)", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:118" + }, + { + "label": "minAmount", + "offset": 0, + "slot": "367", + "type": "t_uint256", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:123" + }, + { + "label": "isFreeFromMinAmount", + "offset": 0, + "slot": "368", + "type": "t_mapping(t_address,t_bool)", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:128" + }, + { + "label": "__gap", + "offset": 0, + "slot": "369", + "type": "t_array(t_uint256)50_storage", + "contract": "ManageableVault", + "src": "contracts/abstract/ManageableVault.sol:133" + }, + { + "label": "minFiatRedeemAmount", + "offset": 0, + "slot": "419", + "type": "t_uint256", + "contract": "RedemptionVault", + "src": "contracts/RedemptionVault.sol:69" + }, + { + "label": "fiatAdditionalFee", + "offset": 0, + "slot": "420", + "type": "t_uint256", + "contract": "RedemptionVault", + "src": "contracts/RedemptionVault.sol:74" + }, + { + "label": "fiatFlatFee", + "offset": 0, + "slot": "421", + "type": "t_uint256", + "contract": "RedemptionVault", + "src": "contracts/RedemptionVault.sol:79" + }, + { + "label": "redeemRequests", + "offset": 0, + "slot": "422", + "type": "t_mapping(t_uint256,t_struct(Request)12335_storage)", + "contract": "RedemptionVault", + "src": "contracts/RedemptionVault.sol:84" + }, + { + "label": "requestRedeemer", + "offset": 0, + "slot": "423", + "type": "t_address", + "contract": "RedemptionVault", + "src": "contracts/RedemptionVault.sol:89" + }, + { + "label": "__gap", + "offset": 0, + "slot": "424", + "type": "t_array(t_uint256)50_storage", + "contract": "RedemptionVault", + "src": "contracts/RedemptionVault.sol:94" + }, + { + "label": "___gap", + "offset": 0, + "slot": "474", + "type": "t_array(t_uint256)50_storage", + "contract": "RedemptionVaultWithSwapper", + "src": "contracts/RedemptionVaultWithSwapper.sol:33" + }, + { + "label": "mTbillRedemptionVault", + "offset": 0, + "slot": "524", + "type": "t_contract(IRedemptionVault)12572", + "contract": "RedemptionVaultWithSwapper", + "src": "contracts/RedemptionVaultWithSwapper.sol:40" + }, + { + "label": "liquidityProvider", + "offset": 0, + "slot": "525", + "type": "t_address", + "contract": "RedemptionVaultWithSwapper", + "src": "contracts/RedemptionVaultWithSwapper.sol:42" + }, + { + "label": "__gap", + "offset": 0, + "slot": "526", + "type": "t_array(t_uint256)50_storage", + "contract": "RedemptionVaultWithSwapper", + "src": "contracts/RedemptionVaultWithSwapper.sol:47" + }, + { + "label": "__gap", + "offset": 0, + "slot": "576", + "type": "t_array(t_uint256)50_storage", + "contract": "MRe7EthRedemptionVaultWithSwapper", + "src": "contracts/products/mRe7ETH/MRe7EthRedemptionVaultWithSwapper.sol:19" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes4": { + "label": "bytes4", + "numberOfBytes": "4" + }, + "t_contract(IDataFeed)11769": { + "label": "contract IDataFeed", + "numberOfBytes": "20" + }, + "t_contract(IMToken)12054": { + "label": "contract IMToken", + "numberOfBytes": "20" + }, + "t_contract(IRedemptionVault)12572": { + "label": "contract IRedemptionVault", + "numberOfBytes": "20" + }, + "t_contract(MidasAccessControl)10756": { + "label": "contract MidasAccessControl", + "numberOfBytes": "20" + }, + "t_enum(RequestStatus)12071": { + "label": "enum RequestStatus", + "members": ["Pending", "Processed", "Canceled"], + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(TokenConfig)12067_storage)": { + "label": "mapping(address => struct TokenConfig)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes4,t_bool)": { + "label": "mapping(bytes4 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Request)12335_storage)": { + "label": "mapping(uint256 => struct Request)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)3891_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)3576_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Counter)4934_storage": { + "label": "struct Counters.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Request)12335_storage": { + "label": "struct Request", + "members": [ + { + "label": "sender", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "tokenOut", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "status", + "type": "t_enum(RequestStatus)12071", + "offset": 20, + "slot": "1" + }, + { + "label": "amountMToken", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "mTokenRate", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "tokenOutRate", + "type": "t_uint256", + "offset": 0, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_struct(Set)3576_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(TokenConfig)12067_storage": { + "label": "struct TokenConfig", + "members": [ + { + "label": "dataFeed", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "fee", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "allowance", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "stable", + "type": "t_bool", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "523a9ef3ade85572d8881c6011ea65025a3e2f80de46ad669069d84228de3a53": { + "address": "0x2a6B0CdEa4fc9415a57a46546130d22b042777A6", + "txHash": "0x02fea0f61de779a22eb6c5825ea60a2bfd781d705a4023dd902031a771b6c7db", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "accessControl", + "offset": 2, + "slot": "0", + "type": "t_contract(MidasAccessControl)10756", + "contract": "WithMidasAccessControl", + "src": "contracts/access/WithMidasAccessControl.sol:24" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "WithMidasAccessControl", + "src": "contracts/access/WithMidasAccessControl.sol:29" + }, + { + "label": "description", + "offset": 0, + "slot": "51", + "type": "t_string_storage", + "contract": "CustomAggregatorV3CompatibleFeed", + "src": "contracts/feeds/CustomAggregatorV3CompatibleFeed.sol:31" + }, + { + "label": "latestRound", + "offset": 0, + "slot": "52", + "type": "t_uint80", + "contract": "CustomAggregatorV3CompatibleFeed", + "src": "contracts/feeds/CustomAggregatorV3CompatibleFeed.sol:36" + }, + { + "label": "maxAnswerDeviation", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "CustomAggregatorV3CompatibleFeed", + "src": "contracts/feeds/CustomAggregatorV3CompatibleFeed.sol:42" + }, + { + "label": "minAnswer", + "offset": 0, + "slot": "54", + "type": "t_int192", + "contract": "CustomAggregatorV3CompatibleFeed", + "src": "contracts/feeds/CustomAggregatorV3CompatibleFeed.sol:47" + }, + { + "label": "maxAnswer", + "offset": 0, + "slot": "55", + "type": "t_int192", + "contract": "CustomAggregatorV3CompatibleFeed", + "src": "contracts/feeds/CustomAggregatorV3CompatibleFeed.sol:52" + }, + { + "label": "_roundData", + "offset": 0, + "slot": "56", + "type": "t_mapping(t_uint80,t_struct(RoundData)11081_storage)", + "contract": "CustomAggregatorV3CompatibleFeed", + "src": "contracts/feeds/CustomAggregatorV3CompatibleFeed.sol:57" + } + ], + "types": { + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(MidasAccessControl)10756": { + "label": "contract MidasAccessControl", + "numberOfBytes": "20" + }, + "t_int192": { + "label": "int192", + "numberOfBytes": "24" + }, + "t_int256": { + "label": "int256", + "numberOfBytes": "32" + }, + "t_mapping(t_uint80,t_struct(RoundData)11081_storage)": { + "label": "mapping(uint80 => struct CustomAggregatorV3CompatibleFeed.RoundData)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(RoundData)11081_storage": { + "label": "struct CustomAggregatorV3CompatibleFeed.RoundData", + "members": [ + { + "label": "roundId", + "type": "t_uint80", + "offset": 0, + "slot": "0" + }, + { + "label": "answer", + "type": "t_int256", + "offset": 0, + "slot": "1" + }, + { + "label": "startedAt", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "updatedAt", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "answeredInRound", + "type": "t_uint80", + "offset": 0, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + }, + "t_uint80": { + "label": "uint80", + "numberOfBytes": "10" + } + } + } + }, + "b191e8bb3024ad70d753b0b698fed22eb31a87d7f17acf6c96c14b266aa49a1b": { + "address": "0x4642805E5C8dF8Fba82108cD76EF21276ea3743A", + "txHash": "0x29b56c708647126f4e4deb7a7ab8cb62df85a48e9d74115fb008a9f83c87772b", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "accessControl", + "offset": 2, + "slot": "0", + "type": "t_contract(MidasAccessControl)10756", + "contract": "WithMidasAccessControl", + "src": "contracts/access/WithMidasAccessControl.sol:24" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "WithMidasAccessControl", + "src": "contracts/access/WithMidasAccessControl.sol:29" + }, + { + "label": "aggregator", + "offset": 0, + "slot": "51", + "type": "t_contract(AggregatorV3Interface)45", + "contract": "DataFeed", + "src": "contracts/feeds/DataFeed.sol:22" + }, + { + "label": "healthyDiff", + "offset": 0, + "slot": "52", + "type": "t_uint256", + "contract": "DataFeed", + "src": "contracts/feeds/DataFeed.sol:27" + }, + { + "label": "minExpectedAnswer", + "offset": 0, + "slot": "53", + "type": "t_int256", + "contract": "DataFeed", + "src": "contracts/feeds/DataFeed.sol:32" + }, + { + "label": "maxExpectedAnswer", + "offset": 0, + "slot": "54", + "type": "t_int256", + "contract": "DataFeed", + "src": "contracts/feeds/DataFeed.sol:37" + }, + { + "label": "__gap", + "offset": 0, + "slot": "55", + "type": "t_array(t_uint256)50_storage", + "contract": "DataFeed", + "src": "contracts/feeds/DataFeed.sol:42" + } + ], + "types": { + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(AggregatorV3Interface)45": { + "label": "contract AggregatorV3Interface", + "numberOfBytes": "20" + }, + "t_contract(MidasAccessControl)10756": { + "label": "contract MidasAccessControl", + "numberOfBytes": "20" + }, + "t_int256": { + "label": "int256", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + } + } +} diff --git a/ROLES.md b/ROLES.md index 67154485..244e3cf2 100644 --- a/ROLES.md +++ b/ROLES.md @@ -731,4 +731,15 @@ All the roles for the Midas protocol smart contracts are listed below. | ***pauser*** | `0x252be2e845ef0860578d2406c8043a0196e4eb5321e0ab3b625b259add8b5213` | | ***customFeedAdmin*** | `0x611014d106fde488a6777e4edcdf617a5efa1d338bd69a08a39fcc2fc5a0e157` | | ***depositVaultAdmin*** | `0x0e1940e672eb264dbd85c24c06c804fabf4f2b2581deda529a1d87e5587959cb` | -| ***redemptionVaultAdmin*** | `0x46c34f93bd31e702e9aee98b0dc288a6404a0cdbb567f2e1592bb7ccad8bacbc` | \ No newline at end of file +| ***redemptionVaultAdmin*** | `0x46c34f93bd31e702e9aee98b0dc288a6404a0cdbb567f2e1592bb7ccad8bacbc` | + +### mRe7ETH Roles + +| Role Name | Role | +| --- | --- | +| ***minter*** | `0x27299e0a77222f4852a2f0c31e6280cf68ff1b6325ddd69542a3c92e1f2e9b18` | +| ***burner*** | `0x17bb22a480938428fa8e772c0680a12b4a0f16537133a4af6350ed764795ef1a` | +| ***pauser*** | `0x8f4b7dfb05ebffc760b8d398af5b0d327b890a22f9030321740d68be514e8f60` | +| ***customFeedAdmin*** | `0xc9f03f672dadad915001ad6a5393aba8482f9c28ea275c4b5480f7b994778ed5` | +| ***depositVaultAdmin*** | `0x798de9824ed446b72c97afa7b28844dbbfbde8830d58977e9462289a757aafb7` | +| ***redemptionVaultAdmin*** | `0x37c36a61c043b91d5ec6d117c64ef865031d25c49609bb25d6530b1fcb8e2e1c` | \ No newline at end of file diff --git a/config/constants/addresses.ts b/config/constants/addresses.ts index 80a991ed..eadb6bee 100644 --- a/config/constants/addresses.ts +++ b/config/constants/addresses.ts @@ -1328,6 +1328,34 @@ export const midasAddressesPerNetwork: ConfigPerNetwork< redemptionVaultSwapper: '0xc5a2ADeacc1cf8424630c0C6B09E1DF6e871c65A', }, }, + optimism: { + accessControl: '0x08D0016Ac2Cf7027D460b2816eA3D0e74617beF8', + timelock: '0x50382fe9Dab9feACabe1b93aB310131cEd8a9b68', + paymentTokens: { + weth: { + token: '0x4200000000000000000000000000000000000006', + aggregator: '0xc79ab9Af2d3E87e91Ec1572C8C1Bc8D2EEBB4c24', + dataFeed: '0x4C13A495D7A1eA5Fb9Afda5Faa7218666Ad794e3', + }, + wsteth: { + token: '0x1f32b1c2345538c0c6f582fcb022739c4a194ebb', + aggregator: '0x524299Ab0987a7c4B3c8022a35669DdcdC715a10', + dataFeed: '0x7f711A1E6EF2Cc6De1A5580a634050286Ef27125', + }, + weeth: { + token: '0x346e03F8Cce9fE01dCB3d0Da3e9D00dC2c0E08f0', + aggregator: '0xb4479d436DDa5c1A79bD88D282725615202406E3', + dataFeed: '0x72E7303C4BFf823444098748B12eAd1EBc80768C', + }, + }, + mRe7ETH: { + token: '0xE7Ba07519dFA06e60059563F484d6090dedF21B3', + customFeed: '0xcFfe26979e96B9E0454cC83aa03FC973C9Eb0E5E', + dataFeed: '0x46129d0863667b1159C55F0B43b898bc3352130a', + depositVault: '0xC562F73ADD198ce47E9Af5B0752dE3D7c991225D', + redemptionVaultSwapper: '0x2c8AEe33a6B1eBDd047903B5FDe01D71B8854e6D', + }, + }, sepolia: { paymentTokens: { usdc: { @@ -1562,6 +1590,7 @@ export const sanctionListContracts: Partial> = { [chainIds.arbitrum]: '0x40C57923924B5c5c5455c48D93317139ADDaC8fb', [chainIds.base]: '0x3A91A31cB3dC49b4db9Ce721F50a9D076c8D739B', [chainIds.bsc]: '0x40C57923924B5c5c5455c48D93317139ADDaC8fb', + [chainIds.optimism]: '0x40C57923924B5c5c5455c48D93317139ADDaC8fb', }; export const ustbContracts: Partial> = { diff --git a/config/networks/index.ts b/config/networks/index.ts index ec4e8777..fd1ad854 100644 --- a/config/networks/index.ts +++ b/config/networks/index.ts @@ -51,6 +51,9 @@ export const rpcUrls: ConfigPerNetwork = { scroll: 'https://rpc.scroll.io', monad: 'https://rpc.monad.xyz', injective: `https://${QUICK_NODE_PROJECT}.injective-mainnet.quiknode.pro/${QUICK_NODE_KEY}/`, + optimism: ALCHEMY_KEY + ? `https://opt-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}` + : `https://optimism-mainnet.infura.io/v3/${INFURA_KEY}`, }; export const gasPrices: ConfigPerNetwork = { @@ -76,6 +79,7 @@ export const gasPrices: ConfigPerNetwork = { scroll: undefined, monad: undefined, injective: undefined, + optimism: undefined, }; export const chainIds: ConfigPerNetwork = { @@ -101,6 +105,7 @@ export const chainIds: ConfigPerNetwork = { scroll: 534352, monad: 143, injective: 1776, + optimism: 10, }; export const mnemonics: ConfigPerNetwork = { @@ -126,6 +131,7 @@ export const mnemonics: ConfigPerNetwork = { scroll: MNEMONIC_PROD, monad: MNEMONIC_PROD, injective: MNEMONIC_PROD, + optimism: MNEMONIC_PROD, }; export const gases: ConfigPerNetwork = { @@ -151,6 +157,7 @@ export const gases: ConfigPerNetwork = { scroll: undefined, monad: undefined, injective: undefined, + optimism: undefined, }; export const timeouts: ConfigPerNetwork = { @@ -176,6 +183,7 @@ export const timeouts: ConfigPerNetwork = { scroll: undefined, monad: undefined, injective: undefined, + optimism: undefined, }; export const blockGasLimits: ConfigPerNetwork = { @@ -201,6 +209,7 @@ export const blockGasLimits: ConfigPerNetwork = { scroll: undefined, monad: undefined, injective: undefined, + optimism: undefined, }; export const initialBasesFeePerGas: ConfigPerNetwork = { @@ -226,6 +235,7 @@ export const initialBasesFeePerGas: ConfigPerNetwork = { scroll: undefined, monad: undefined, injective: undefined, + optimism: undefined, }; export const blockFinality: PartialConfigPerNetwork = { diff --git a/config/networks/verify.config.ts b/config/networks/verify.config.ts index 34044c47..5f80e678 100644 --- a/config/networks/verify.config.ts +++ b/config/networks/verify.config.ts @@ -121,4 +121,8 @@ export const verifyConfig: VerifyConfigPerNetwork = { apiUrl: 'https://custom-api.injective.network/api', browserUrl: 'https://custom.injective.network', }, + optimism: { + type: 'etherscan', + browserUrl: 'https://optimistic.etherscan.io', + }, }; diff --git a/config/types/index.ts b/config/types/index.ts index ff999f9a..1d160378 100644 --- a/config/types/index.ts +++ b/config/types/index.ts @@ -23,7 +23,8 @@ export type Network = | 'tacTestnet' | 'xrplevm' | 'zerog' - | 'injective'; + | 'injective' + | 'optimism'; export type RpcUrl = | `https://eth-${RpcNetwork}.g.alchemy.com/v2/${string}` | `https://${RpcNetwork}.infura.io/v3/${string}` diff --git a/config/types/tokens.ts b/config/types/tokens.ts index 6157f95a..9e5c02f2 100644 --- a/config/types/tokens.ts +++ b/config/types/tokens.ts @@ -64,6 +64,7 @@ export enum MTokenNameEnum { weEUR = 'weEUR', mTU = 'mTU', mM1USD = 'mM1USD', + mRe7ETH = 'mRe7ETH', } export type MTokenName = keyof typeof MTokenNameEnum; diff --git a/contracts/products/mRe7ETH/MRe7EthCustomAggregatorFeed.sol b/contracts/products/mRe7ETH/MRe7EthCustomAggregatorFeed.sol new file mode 100644 index 00000000..f36167ea --- /dev/null +++ b/contracts/products/mRe7ETH/MRe7EthCustomAggregatorFeed.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.9; + +import "../../feeds/CustomAggregatorV3CompatibleFeed.sol"; +import "./MRe7EthMidasAccessControlRoles.sol"; + +/** + * @title MRe7EthCustomAggregatorFeed + * @notice AggregatorV3 compatible feed for mRe7ETH, + * where price is submitted manually by feed admins + * @author RedDuck Software + */ +contract MRe7EthCustomAggregatorFeed is + CustomAggregatorV3CompatibleFeed, + MRe7EthMidasAccessControlRoles +{ + /** + * @dev leaving a storage gap for futures updates + */ + uint256[50] private __gap; + + /** + * @inheritdoc CustomAggregatorV3CompatibleFeed + */ + function feedAdminRole() public pure override returns (bytes32) { + return M_RE7ETH_CUSTOM_AGGREGATOR_FEED_ADMIN_ROLE; + } +} diff --git a/contracts/products/mRe7ETH/MRe7EthDataFeed.sol b/contracts/products/mRe7ETH/MRe7EthDataFeed.sol new file mode 100644 index 00000000..2b445dc9 --- /dev/null +++ b/contracts/products/mRe7ETH/MRe7EthDataFeed.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.9; + +import "../../feeds/DataFeed.sol"; +import "./MRe7EthMidasAccessControlRoles.sol"; + +/** + * @title MRe7EthDataFeed + * @notice DataFeed for mRe7ETH product + * @author RedDuck Software + */ +contract MRe7EthDataFeed is DataFeed, MRe7EthMidasAccessControlRoles { + /** + * @dev leaving a storage gap for futures updates + */ + uint256[50] private __gap; + + /** + * @inheritdoc DataFeed + */ + function feedAdminRole() public pure override returns (bytes32) { + return M_RE7ETH_CUSTOM_AGGREGATOR_FEED_ADMIN_ROLE; + } +} diff --git a/contracts/products/mRe7ETH/MRe7EthDepositVault.sol b/contracts/products/mRe7ETH/MRe7EthDepositVault.sol new file mode 100644 index 00000000..75df184a --- /dev/null +++ b/contracts/products/mRe7ETH/MRe7EthDepositVault.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.9; + +import "../../DepositVault.sol"; +import "./MRe7EthMidasAccessControlRoles.sol"; + +/** + * @title MRe7EthDepositVault + * @notice Smart contract that handles mRe7ETH minting + * @author RedDuck Software + */ +contract MRe7EthDepositVault is DepositVault, MRe7EthMidasAccessControlRoles { + /** + * @dev leaving a storage gap for futures updates + */ + uint256[50] private __gap; + + /** + * @inheritdoc ManageableVault + */ + function vaultRole() public pure override returns (bytes32) { + return M_RE7ETH_DEPOSIT_VAULT_ADMIN_ROLE; + } +} diff --git a/contracts/products/mRe7ETH/MRe7EthMidasAccessControlRoles.sol b/contracts/products/mRe7ETH/MRe7EthMidasAccessControlRoles.sol new file mode 100644 index 00000000..8beda66b --- /dev/null +++ b/contracts/products/mRe7ETH/MRe7EthMidasAccessControlRoles.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.9; + +/** + * @title MRe7EthMidasAccessControlRoles + * @notice Base contract that stores all roles descriptors for mRe7ETH contracts + * @author RedDuck Software + */ +abstract contract MRe7EthMidasAccessControlRoles { + /** + * @notice actor that can manage MRe7EthDepositVault + */ + bytes32 public constant M_RE7ETH_DEPOSIT_VAULT_ADMIN_ROLE = + keccak256("M_RE7ETH_DEPOSIT_VAULT_ADMIN_ROLE"); + + /** + * @notice actor that can manage MRe7EthRedemptionVault + */ + bytes32 public constant M_RE7ETH_REDEMPTION_VAULT_ADMIN_ROLE = + keccak256("M_RE7ETH_REDEMPTION_VAULT_ADMIN_ROLE"); + + /** + * @notice actor that can manage MRe7EthCustomAggregatorFeed and MRe7EthDataFeed + */ + bytes32 public constant M_RE7ETH_CUSTOM_AGGREGATOR_FEED_ADMIN_ROLE = + keccak256("M_RE7ETH_CUSTOM_AGGREGATOR_FEED_ADMIN_ROLE"); +} diff --git a/contracts/products/mRe7ETH/MRe7EthRedemptionVaultWithSwapper.sol b/contracts/products/mRe7ETH/MRe7EthRedemptionVaultWithSwapper.sol new file mode 100644 index 00000000..7c517e45 --- /dev/null +++ b/contracts/products/mRe7ETH/MRe7EthRedemptionVaultWithSwapper.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.9; + +import "../../RedemptionVaultWithSwapper.sol"; +import "./MRe7EthMidasAccessControlRoles.sol"; + +/** + * @title MRe7EthRedemptionVaultWithSwapper + * @notice Smart contract that handles mRe7ETH redemptions + * @author RedDuck Software + */ +contract MRe7EthRedemptionVaultWithSwapper is + RedemptionVaultWithSwapper, + MRe7EthMidasAccessControlRoles +{ + /** + * @dev leaving a storage gap for futures updates + */ + uint256[50] private __gap; + + /** + * @inheritdoc ManageableVault + */ + function vaultRole() public pure override returns (bytes32) { + return M_RE7ETH_REDEMPTION_VAULT_ADMIN_ROLE; + } +} diff --git a/contracts/products/mRe7ETH/mRe7ETH.sol b/contracts/products/mRe7ETH/mRe7ETH.sol new file mode 100644 index 00000000..a08c04fa --- /dev/null +++ b/contracts/products/mRe7ETH/mRe7ETH.sol @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.9; + +import "../../mToken.sol"; + +/** + * @title mRe7ETH + * @author RedDuck Software + */ +//solhint-disable contract-name-camelcase +contract mRe7ETH is mToken { + /** + * @notice actor that can mint mRe7ETH + */ + bytes32 public constant M_RE7ETH_MINT_OPERATOR_ROLE = + keccak256("M_RE7ETH_MINT_OPERATOR_ROLE"); + + /** + * @notice actor that can burn mRe7ETH + */ + bytes32 public constant M_RE7ETH_BURN_OPERATOR_ROLE = + keccak256("M_RE7ETH_BURN_OPERATOR_ROLE"); + + /** + * @notice actor that can pause mRe7ETH + */ + bytes32 public constant M_RE7ETH_PAUSE_OPERATOR_ROLE = + keccak256("M_RE7ETH_PAUSE_OPERATOR_ROLE"); + + /** + * @dev leaving a storage gap for futures updates + */ + uint256[50] private __gap; + + /** + * @inheritdoc mToken + */ + function _getNameSymbol() + internal + pure + override + returns (string memory, string memory) + { + return ("Midas Re7 Ethereum", "mRe7ETH"); + } + + /** + * @dev AC role, owner of which can mint mRe7ETH token + */ + function _minterRole() internal pure override returns (bytes32) { + return M_RE7ETH_MINT_OPERATOR_ROLE; + } + + /** + * @dev AC role, owner of which can burn mRe7ETH token + */ + function _burnerRole() internal pure override returns (bytes32) { + return M_RE7ETH_BURN_OPERATOR_ROLE; + } + + /** + * @dev AC role, owner of which can pause mRe7ETH token + */ + function _pauserRole() internal pure override returns (bytes32) { + return M_RE7ETH_PAUSE_OPERATOR_ROLE; + } +} diff --git a/hardhat.config.ts b/hardhat.config.ts index fec604ca..e16c1e51 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -88,6 +88,7 @@ const config: HardhatUserConfig = { scroll: getNetworkConfig('scroll'), monad: getNetworkConfig('monad'), injective: getNetworkConfig('injective'), + optimism: getNetworkConfig('optimism'), }, gasReporter: { enabled: REPORT_GAS, diff --git a/helpers/contracts.ts b/helpers/contracts.ts index 6ec664b4..1845ed14 100644 --- a/helpers/contracts.ts +++ b/helpers/contracts.ts @@ -116,6 +116,7 @@ export const contractNamesPrefixes: Record = { weEUR: 'WeEur', mTU: 'MTu', mM1USD: 'MM1Usd', + mRe7ETH: 'MRe7Eth', }; export const getCommonContractNames = (): CommonContractNames => { diff --git a/helpers/mtokens-metadata.ts b/helpers/mtokens-metadata.ts index 0f490439..1e53654f 100644 --- a/helpers/mtokens-metadata.ts +++ b/helpers/mtokens-metadata.ts @@ -264,4 +264,8 @@ export const mTokensMetadata: Record< name: 'Midas M1 USD Market Neutral', symbol: 'mM1-USD', }, + mRe7ETH: { + name: 'Midas Re7 Ethereum', + symbol: 'mRe7ETH', + }, }; diff --git a/helpers/roles.ts b/helpers/roles.ts index 32a66d2c..2c57b29b 100644 --- a/helpers/roles.ts +++ b/helpers/roles.ts @@ -70,6 +70,7 @@ const prefixes: Record = { weEUR: 'WE_EUR', mTU: 'M_TU', mM1USD: 'M_M1_USD', + mRe7ETH: 'M_RE7ETH', }; const mappedTokenNames: Partial> = { diff --git a/scripts/deploy/configs/index.ts b/scripts/deploy/configs/index.ts index 80d3dcf6..508dec82 100644 --- a/scripts/deploy/configs/index.ts +++ b/scripts/deploy/configs/index.ts @@ -37,6 +37,7 @@ import { mMEVDeploymentConfig } from './mMEV'; import { mPortofinoDeploymentConfig } from './mPortofino'; import { mRE7DeploymentConfig } from './mRE7'; import { mRE7BTCDeploymentConfig } from './mRE7BTC'; +import { mRe7ETHDeploymentConfig } from './mRe7ETH'; import { mRE7SOLDeploymentConfig } from './mRE7SOL'; import { mROXDeploymentConfig } from './mROX'; import { mSLDeploymentConfig } from './mSL'; @@ -133,4 +134,5 @@ export const configsPerToken: Record = { weEUR: weEURDeploymentConfig, mTU: mTUDeploymentConfig, mM1USD: mM1USDDeploymentConfig, + mRe7ETH: mRe7ETHDeploymentConfig, }; diff --git a/scripts/deploy/configs/mRe7ETH.ts b/scripts/deploy/configs/mRe7ETH.ts new file mode 100644 index 00000000..e0ac86d0 --- /dev/null +++ b/scripts/deploy/configs/mRe7ETH.ts @@ -0,0 +1,99 @@ +import { constants } from 'ethers'; +import { parseUnits } from 'ethers/lib/utils'; + +import { chainIds } from '../../../config'; +import { DeploymentConfig } from '../common/types'; + +export const mRe7ETHDeploymentConfig: DeploymentConfig = { + genericConfigs: { + customAggregator: { + maxAnswerDeviation: parseUnits('0.3', 8), + description: 'mRe7ETH/ETH', + }, + dataFeed: {}, + }, + networkConfigs: { + [chainIds.optimism]: { + dv: { + type: 'REGULAR', + enableSanctionsList: true, + feeReceiver: '0x1B63F7dB61c4dB587D47882aE5c038a494e76915', + tokensReceiver: '0x67bA9B7Ed92fe260B0d21fFF5ef492B0118F4944', + instantDailyLimit: constants.MaxUint256, + instantFee: parseUnits('0', 2), + variationTolerance: parseUnits('1.4', 2), + minMTokenAmountForFirstDeposit: parseUnits('0', 18), + maxSupplyCap: constants.MaxUint256, + }, + rvSwapper: { + type: 'SWAPPER', + feeReceiver: '0xE4Cd2762054Fe5EcfEE0ed3219B5A315BA6cc157', + tokensReceiver: '0x67bA9B7Ed92fe260B0d21fFF5ef492B0118F4944', + requestRedeemer: '0x8C071c01041829Be1BEA1Fb6dAb7718eabf4c2AC', + instantDailyLimit: parseUnits('100', 18), + instantFee: parseUnits('0.5', 2), + variationTolerance: parseUnits('1.4', 2), + liquidityProvider: 'dummy', + enableSanctionsList: true, + swapperVault: 'dummy', + minAmount: parseUnits('1'), + }, + postDeploy: { + addPaymentTokens: { + vaults: [ + { + paymentTokens: [ + { + token: 'weth', + allowance: parseUnits('100000', 18), + }, + { + token: 'wsteth', + allowance: parseUnits('10000', 18), + isStable: false, + }, + { + token: 'weeth', + allowance: parseUnits('10000', 18), + isStable: false, + }, + ], + type: 'depositVault', + }, + { + paymentTokens: [ + { + token: 'weth', + allowance: parseUnits('100000', 18), + }, + { + token: 'wsteth', + allowance: parseUnits('10000', 18), + isStable: false, + }, + { + token: 'weeth', + allowance: parseUnits('10000', 18), + isStable: false, + }, + ], + type: 'redemptionVaultSwapper', + }, + ], + }, + grantRoles: { + tokenManagerAddress: '0xf5885e74d573C28687CedFB3F3d904da4713b683', + vaultsManagerAddress: '0x2ACB4BdCbEf02f81BF713b696Ac26390d7f79A12', + oracleManagerAddress: '0xDd9f610732D0e37c806Dd1Dd775d63f169B2A1E9', + }, + setRoundData: { + data: parseUnits('1', 8), + }, + pauseFunctions: { + depositVault: ['depositRequest', 'depositRequestWithCustomRecipient'], + redemptionVaultSwapper: ['redeemFiatRequest'], + }, + }, + }, + }, +}; diff --git a/scripts/deploy/configs/network-configs.ts b/scripts/deploy/configs/network-configs.ts index 1f2f96dd..efa1f40c 100644 --- a/scripts/deploy/configs/network-configs.ts +++ b/scripts/deploy/configs/network-configs.ts @@ -92,4 +92,13 @@ export const networkDeploymentConfigs: NetworkDeploymentConfig = { proposer: '0xAD8bea0c137012021EEAF6486C42074701c5038E', }, }, + [chainIds.optimism]: { + grantDefaultAdminRole: { + acAdminAddress: '0xd4195CF4df289a4748C1A7B6dDBE770e27bA1227', + }, + timelock: { + minDelay: 2 * DAY, + proposer: '0xB60842E9DaBCd1C52e354ac30E82a97661cB7E89', + }, + }, }; diff --git a/scripts/deploy/configs/payment-tokens.ts b/scripts/deploy/configs/payment-tokens.ts index cb908bdc..1e4fd17f 100644 --- a/scripts/deploy/configs/payment-tokens.ts +++ b/scripts/deploy/configs/payment-tokens.ts @@ -791,5 +791,39 @@ export const paymentTokenDeploymentConfigs: PaymentTokenDeploymentConfig = { }, }, }, + [chainIds.optimism]: { + weth: { + customAggregator: { + minAnswer: parseUnits('0.99999', 8), + maxAnswer: parseUnits('1', 8), + description: 'WETH/ETH', + maxAnswerDeviation: parseUnits('0', 8), + }, + dataFeed: { + healthyDiff: constants.MaxUint256, + minAnswer: parseUnits('0.99999', 8), + maxAnswer: parseUnits('1', 8), + }, + postDeploy: { + setRoundData: { + data: parseUnits('1', 8), + }, + }, + }, + wsteth: { + dataFeed: { + healthyDiff: constants.MaxUint256, + minAnswer: parseUnits('1.23056234', 18), + maxAnswer: parseUnits('1.35', 18), + }, + }, + weeth: { + dataFeed: { + healthyDiff: constants.MaxUint256, + minAnswer: parseUnits('1.09132691', 18), + maxAnswer: parseUnits('1.2', 18), + }, + }, + }, }, };