From d48716fe8594c44bfa06ee4b67c3f7629fe63648 Mon Sep 17 00:00:00 2001 From: Shane Earley Date: Fri, 27 Oct 2023 16:52:34 -0400 Subject: [PATCH] Fix oracle authorization --- common/env/src/index.ts | 8 +- contracts/ethereum/.openzeppelin/goerli.json | 1093 ++++++++++++++++- contracts/ethereum/arguments.js | 20 +- contracts/ethereum/hardhat.config.ts | 7 + contracts/ethereum/package.json | 4 +- contracts/ethereum/scripts/report.ts | 12 +- .../scripts/{upgrade.ts => upgrade-all.ts} | 15 +- contracts/ethereum/scripts/upgrade-proxies.ts | 93 ++ contracts/ethereum/src/v1/CasimirManager.sol | 6 + .../src/v1/interfaces/ICasimirManager.sol | 5 + .../src/v1/mock/AuthorizedOriginReceiver.sol | 164 --- .../src/v1/mock/FunctionsBillingRegistry.sol | 817 +++++++++++- ...sOraclePatched.sol => FunctionsOracle.sol} | 4 +- .../src/v1/mock/FunctionsOracleFactory.sol | 46 +- package-lock.json | 876 +++++-------- scripts/ethereum/upgrade.ts | 5 +- services/oracle/src/providers/handlers.ts | 8 +- 17 files changed, 2391 insertions(+), 792 deletions(-) rename contracts/ethereum/scripts/{upgrade.ts => upgrade-all.ts} (93%) create mode 100644 contracts/ethereum/scripts/upgrade-proxies.ts delete mode 100644 contracts/ethereum/src/v1/mock/AuthorizedOriginReceiver.sol rename contracts/ethereum/src/v1/mock/{FunctionsOraclePatched.sol => FunctionsOracle.sol} (98%) diff --git a/common/env/src/index.ts b/common/env/src/index.ts index 19e13d366..b5eafcf17 100644 --- a/common/env/src/index.ts +++ b/common/env/src/index.ts @@ -9,7 +9,7 @@ import MOCK_VALIDATORS from './mock/validators.json' const ETHEREUM_CONTRACTS = { TESTNET: { - BEACON_LIBRARY_ADDRESS: '0xc4E9Ea9BeD9D9c44ffd003A1dFc437Bca9DCeD99', + BEACON_LIBRARY_ADDRESS: '0x0295bfe577d6833882Ee0E1Bccc4a5825d1Df653', MANAGER_BEACON_ADDRESS: '0x69D830C11bbD81c0A9AC031d17A2599D3a0F632E', POOL_BEACON_ADDRESS: '0x9Ef6fb4fe7F7EB9DDeB019028E978439b9aD72BF', REGISTRY_BEACON_ADDRESS: '0xC0799f7643978828cEBCe4F327dcA233dE1871C8', @@ -17,9 +17,9 @@ const ETHEREUM_CONTRACTS = { VIEWS_BEACON_ADDRESS: '0x7B07be561eA274a78D9dC30FCFAcEeb2C6Ac3962', FACTORY_ADDRESS: '0xA6fd22c5633bCD82Ee25045de91351a8dfA2c76F', - FUNCTIONS_BILLING_REGISTRY_ADDRESS: '0x0A1Efb45bbb81a73496EDd59043C8c60e16d36E6', - FUNCTIONS_ORACLE_ADDRESS: '0x923Aa3b3Efe278bD026366a7685674f7f7960252', - FUNCTIONS_ORACLE_FACTORY_ADDRESS: '0x8487AE78294BDF6d7eFD7F5a61805F98C1007030', + FUNCTIONS_BILLING_REGISTRY_ADDRESS: '0x566087488869A18767cBA3Adb19dfc713FE56Ac6', + FUNCTIONS_ORACLE_ADDRESS: '0x914F29Ddb0b8A8201a58e6eeaf71d6df36429214', + FUNCTIONS_ORACLE_FACTORY_ADDRESS: '0x1304Dc23DD83f5c374193839E880cCa5D040f5A7', DEPOSIT_CONTRACT_ADDRESS: '0xff50ed3d0ec03aC01D4C79aAd74928BFF48a7b2b', KEEPER_REGISTRAR_ADDRESS: '0x57A4a13b35d25EE78e084168aBaC5ad360252467', diff --git a/contracts/ethereum/.openzeppelin/goerli.json b/contracts/ethereum/.openzeppelin/goerli.json index 18b1a08a8..572b289e8 100644 --- a/contracts/ethereum/.openzeppelin/goerli.json +++ b/contracts/ethereum/.openzeppelin/goerli.json @@ -1275,7 +1275,7 @@ "label": "manager", "offset": 2, "slot": "0", - "type": "t_contract(ICasimirManager)20047", + "type": "t_contract(ICasimirManager)12379", "contract": "CasimirViews", "src": "src/v1/CasimirViews.sol:18" }, @@ -1297,7 +1297,7 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(ICasimirManager)20047": { + "t_contract(ICasimirManager)12379": { "label": "contract ICasimirManager", "numberOfBytes": "20" }, @@ -2447,7 +2447,7 @@ "label": "s_oracle", "offset": 0, "slot": "151", - "type": "t_contract(FunctionsOracleInterface)4175", + "type": "t_contract(FunctionsOracleInterface)548", "contract": "FunctionsClient", "src": "src/v1/vendor/FunctionsClient.sol:13" }, @@ -2471,7 +2471,7 @@ "label": "factory", "offset": 1, "slot": "153", - "type": "t_contract(ICasimirFactory)19567", + "type": "t_contract(ICasimirFactory)11895", "contract": "CasimirUpkeep", "src": "src/v1/CasimirUpkeep.sol:28" }, @@ -2479,7 +2479,7 @@ "label": "manager", "offset": 0, "slot": "154", - "type": "t_contract(ICasimirManager)20047", + "type": "t_contract(ICasimirManager)12379", "contract": "CasimirUpkeep", "src": "src/v1/CasimirUpkeep.sol:30" }, @@ -2495,7 +2495,7 @@ "label": "reportStatus", "offset": 0, "slot": "156", - "type": "t_enum(ReportStatus)20301", + "type": "t_enum(ReportStatus)12633", "contract": "CasimirUpkeep", "src": "src/v1/CasimirUpkeep.sol:34" }, @@ -2591,7 +2591,7 @@ "label": "reportRequests", "offset": 0, "slot": "167", - "type": "t_mapping(t_bytes32,t_enum(RequestType)20297)", + "type": "t_mapping(t_bytes32,t_enum(RequestType)12629)", "contract": "CasimirUpkeep", "src": "src/v1/CasimirUpkeep.sol:58" }, @@ -2677,19 +2677,19 @@ "label": "bytes", "numberOfBytes": "32" }, - "t_contract(FunctionsOracleInterface)4175": { + "t_contract(FunctionsOracleInterface)548": { "label": "contract FunctionsOracleInterface", "numberOfBytes": "20" }, - "t_contract(ICasimirFactory)19567": { + "t_contract(ICasimirFactory)11895": { "label": "contract ICasimirFactory", "numberOfBytes": "20" }, - "t_contract(ICasimirManager)20047": { + "t_contract(ICasimirManager)12379": { "label": "contract ICasimirManager", "numberOfBytes": "20" }, - "t_enum(ReportStatus)20301": { + "t_enum(ReportStatus)12633": { "label": "enum ICasimirUpkeep.ReportStatus", "members": [ "FINALIZED", @@ -2698,7 +2698,7 @@ ], "numberOfBytes": "1" }, - "t_enum(RequestType)20297": { + "t_enum(RequestType)12629": { "label": "enum ICasimirUpkeep.RequestType", "members": [ "NONE", @@ -2711,7 +2711,7 @@ "label": "mapping(bytes32 => address)", "numberOfBytes": "32" }, - "t_mapping(t_bytes32,t_enum(RequestType)20297)": { + "t_mapping(t_bytes32,t_enum(RequestType)12629)": { "label": "mapping(bytes32 => enum ICasimirUpkeep.RequestType)", "numberOfBytes": "32" }, @@ -3467,6 +3467,1073 @@ }, "namespaces": {} } + }, + "e3d82e02956af4328f9ee517e2251da0f18092c782acb5041a5c08e9efc957fe": { + "address": "0xc65f10e7057C5754398e86f8e6d02281F442F1EC", + "txHash": "0x6f7200ed6833bffa68efe2ef8fabad606ce724783c5e127a63af1582c34517cd", + "layout": { + "solcVersion": "0.8.18", + "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": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_status", + "offset": 0, + "slot": "101", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" + }, + { + "label": "lockPeriod", + "offset": 0, + "slot": "151", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:36" + }, + { + "label": "userFee", + "offset": 0, + "slot": "152", + "type": "t_uint32", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:38" + }, + { + "label": "eigenStake", + "offset": 4, + "slot": "152", + "type": "t_bool", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:40" + }, + { + "label": "liquidStake", + "offset": 5, + "slot": "152", + "type": "t_bool", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:42" + }, + { + "label": "reportPeriod", + "offset": 6, + "slot": "152", + "type": "t_uint32", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:44" + }, + { + "label": "functionsId", + "offset": 10, + "slot": "152", + "type": "t_uint64", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:46" + }, + { + "label": "upkeepId", + "offset": 0, + "slot": "153", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:48" + }, + { + "label": "latestBeaconBalance", + "offset": 0, + "slot": "154", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:50" + }, + { + "label": "finalizableActivations", + "offset": 0, + "slot": "155", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:52" + }, + { + "label": "finalizableCompletedExits", + "offset": 0, + "slot": "156", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:54" + }, + { + "label": "requestedWithdrawalBalance", + "offset": 0, + "slot": "157", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:56" + }, + { + "label": "reservedFeeBalance", + "offset": 0, + "slot": "158", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:58" + }, + { + "label": "requestedExits", + "offset": 0, + "slot": "159", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:60" + }, + { + "label": "daoOracleAddress", + "offset": 0, + "slot": "160", + "type": "t_address", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:115" + }, + { + "label": "factory", + "offset": 0, + "slot": "161", + "type": "t_contract(ICasimirFactory)15748", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:117" + }, + { + "label": "registry", + "offset": 0, + "slot": "162", + "type": "t_contract(ICasimirRegistry)16466", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:119" + }, + { + "label": "upkeep", + "offset": 0, + "slot": "163", + "type": "t_contract(ICasimirUpkeep)16570", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:121" + }, + { + "label": "lastPoolId", + "offset": 20, + "slot": "163", + "type": "t_uint32", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:123" + }, + { + "label": "latestBeaconBalanceAfterFees", + "offset": 0, + "slot": "164", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:125" + }, + { + "label": "latestActiveRewardBalance", + "offset": 0, + "slot": "165", + "type": "t_int256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:127" + }, + { + "label": "finalizableExitedBalance", + "offset": 0, + "slot": "166", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:129" + }, + { + "label": "finalizableRecoveredBalance", + "offset": 0, + "slot": "167", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:131" + }, + { + "label": "users", + "offset": 0, + "slot": "168", + "type": "t_mapping(t_address,t_struct(User)15623_storage)", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:133" + }, + { + "label": "stakeRatioSum", + "offset": 0, + "slot": "169", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:135" + }, + { + "label": "requestedWithdrawals", + "offset": 0, + "slot": "170", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:137" + }, + { + "label": "requestedWithdrawalQueue", + "offset": 0, + "slot": "171", + "type": "t_array(t_struct(Withdrawal)15630_storage)dyn_storage", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:139" + }, + { + "label": "poolAddresses", + "offset": 0, + "slot": "172", + "type": "t_mapping(t_uint32,t_address)", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:141" + }, + { + "label": "tipBalance", + "offset": 0, + "slot": "173", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:143" + }, + { + "label": "recoveredBalances", + "offset": 0, + "slot": "174", + "type": "t_mapping(t_uint32,t_uint256)", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:145" + }, + { + "label": "prepoolBalance", + "offset": 0, + "slot": "175", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:147" + }, + { + "label": "exitedBalance", + "offset": 0, + "slot": "176", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:149" + }, + { + "label": "readyPoolIds", + "offset": 0, + "slot": "177", + "type": "t_array(t_uint32)dyn_storage", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:151" + }, + { + "label": "pendingPoolIds", + "offset": 0, + "slot": "178", + "type": "t_array(t_uint32)dyn_storage", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:153" + }, + { + "label": "stakedPoolIds", + "offset": 0, + "slot": "179", + "type": "t_array(t_uint32)dyn_storage", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:155" + }, + { + "label": "forcedExits", + "offset": 0, + "slot": "180", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:157" + }, + { + "label": "__gap", + "offset": 0, + "slot": "181", + "type": "t_array(t_uint256)50_storage", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:159" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Withdrawal)15630_storage)dyn_storage": { + "label": "struct ICasimirCore.Withdrawal[]", + "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_array(t_uint32)dyn_storage": { + "label": "uint32[]", + "numberOfBytes": "32" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(ICasimirFactory)15748": { + "label": "contract ICasimirFactory", + "numberOfBytes": "20" + }, + "t_contract(ICasimirRegistry)16466": { + "label": "contract ICasimirRegistry", + "numberOfBytes": "20" + }, + "t_contract(ICasimirUpkeep)16570": { + "label": "contract ICasimirUpkeep", + "numberOfBytes": "20" + }, + "t_int256": { + "label": "int256", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(User)15623_storage)": { + "label": "mapping(address => struct ICasimirCore.User)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint32,t_address)": { + "label": "mapping(uint32 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint32,t_uint256)": { + "label": "mapping(uint32 => uint256)", + "numberOfBytes": "32" + }, + "t_struct(User)15623_storage": { + "label": "struct ICasimirCore.User", + "members": [ + { + "label": "stake0", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "stakeRatioSum0", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Withdrawal)15630_storage": { + "label": "struct ICasimirCore.Withdrawal", + "members": [ + { + "label": "userAddress", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "amount", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "period", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "bc324f7e8d7b2211cb8cb7a959bee1ba6ccb87ac230cfa011b83bb63b3b653e4": { + "address": "0x14C356a7d837Fb21f6420Dfd285B806A407B2607", + "txHash": "0x9149ea7de6bc6bce6c6eb403c000090ae7590a3d4378815228eff174568f1da5", + "layout": { + "solcVersion": "0.8.18", + "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": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_status", + "offset": 0, + "slot": "101", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" + }, + { + "label": "managerAddresses", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_uint32,t_address)", + "contract": "CasimirFactory", + "src": "src/v1/CasimirFactory.sol:42" + }, + { + "label": "viewsAddresses", + "offset": 0, + "slot": "152", + "type": "t_mapping(t_uint32,t_address)", + "contract": "CasimirFactory", + "src": "src/v1/CasimirFactory.sol:44" + }, + { + "label": "lastManagerId", + "offset": 0, + "slot": "153", + "type": "t_uint32", + "contract": "CasimirFactory", + "src": "src/v1/CasimirFactory.sol:46" + }, + { + "label": "__gap", + "offset": 0, + "slot": "154", + "type": "t_array(t_uint256)50_storage", + "contract": "CasimirFactory", + "src": "src/v1/CasimirFactory.sol:48" + } + ], + "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_mapping(t_uint32,t_address)": { + "label": "mapping(uint32 => address)", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "2dc62d7cef1601798922e01541bc2c69151be28d032568453c5113835380d2e0": { + "address": "0xE7232300e7fb7f5D7D4D11a33C1B59af77cf7Eae", + "txHash": "0xcec08aaea6b78549e37d4cdac59dd279704b05875365c6f352fa531060d76a1c", + "layout": { + "solcVersion": "0.8.18", + "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": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_status", + "offset": 0, + "slot": "101", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" + }, + { + "label": "lockPeriod", + "offset": 0, + "slot": "151", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:36" + }, + { + "label": "userFee", + "offset": 0, + "slot": "152", + "type": "t_uint32", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:38" + }, + { + "label": "eigenStake", + "offset": 4, + "slot": "152", + "type": "t_bool", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:40" + }, + { + "label": "liquidStake", + "offset": 5, + "slot": "152", + "type": "t_bool", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:42" + }, + { + "label": "reportPeriod", + "offset": 6, + "slot": "152", + "type": "t_uint32", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:44" + }, + { + "label": "functionsId", + "offset": 10, + "slot": "152", + "type": "t_uint64", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:46" + }, + { + "label": "upkeepId", + "offset": 0, + "slot": "153", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:48" + }, + { + "label": "latestBeaconBalance", + "offset": 0, + "slot": "154", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:50" + }, + { + "label": "finalizableActivations", + "offset": 0, + "slot": "155", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:52" + }, + { + "label": "finalizableCompletedExits", + "offset": 0, + "slot": "156", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:54" + }, + { + "label": "requestedWithdrawalBalance", + "offset": 0, + "slot": "157", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:56" + }, + { + "label": "reservedFeeBalance", + "offset": 0, + "slot": "158", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:58" + }, + { + "label": "requestedExits", + "offset": 0, + "slot": "159", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:60" + }, + { + "label": "daoOracleAddress", + "offset": 0, + "slot": "160", + "type": "t_address", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:115" + }, + { + "label": "factory", + "offset": 0, + "slot": "161", + "type": "t_contract(ICasimirFactory)11894", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:117" + }, + { + "label": "registry", + "offset": 0, + "slot": "162", + "type": "t_contract(ICasimirRegistry)12612", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:119" + }, + { + "label": "upkeep", + "offset": 0, + "slot": "163", + "type": "t_contract(ICasimirUpkeep)12716", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:121" + }, + { + "label": "lastPoolId", + "offset": 20, + "slot": "163", + "type": "t_uint32", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:123" + }, + { + "label": "latestBeaconBalanceAfterFees", + "offset": 0, + "slot": "164", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:125" + }, + { + "label": "latestActiveRewardBalance", + "offset": 0, + "slot": "165", + "type": "t_int256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:127" + }, + { + "label": "finalizableExitedBalance", + "offset": 0, + "slot": "166", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:129" + }, + { + "label": "finalizableRecoveredBalance", + "offset": 0, + "slot": "167", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:131" + }, + { + "label": "users", + "offset": 0, + "slot": "168", + "type": "t_mapping(t_address,t_struct(User)11769_storage)", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:133" + }, + { + "label": "stakeRatioSum", + "offset": 0, + "slot": "169", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:135" + }, + { + "label": "requestedWithdrawals", + "offset": 0, + "slot": "170", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:137" + }, + { + "label": "requestedWithdrawalQueue", + "offset": 0, + "slot": "171", + "type": "t_array(t_struct(Withdrawal)11776_storage)dyn_storage", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:139" + }, + { + "label": "poolAddresses", + "offset": 0, + "slot": "172", + "type": "t_mapping(t_uint32,t_address)", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:141" + }, + { + "label": "tipBalance", + "offset": 0, + "slot": "173", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:143" + }, + { + "label": "recoveredBalances", + "offset": 0, + "slot": "174", + "type": "t_mapping(t_uint32,t_uint256)", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:145" + }, + { + "label": "prepoolBalance", + "offset": 0, + "slot": "175", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:147" + }, + { + "label": "exitedBalance", + "offset": 0, + "slot": "176", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:149" + }, + { + "label": "readyPoolIds", + "offset": 0, + "slot": "177", + "type": "t_array(t_uint32)dyn_storage", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:151" + }, + { + "label": "pendingPoolIds", + "offset": 0, + "slot": "178", + "type": "t_array(t_uint32)dyn_storage", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:153" + }, + { + "label": "stakedPoolIds", + "offset": 0, + "slot": "179", + "type": "t_array(t_uint32)dyn_storage", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:155" + }, + { + "label": "forcedExits", + "offset": 0, + "slot": "180", + "type": "t_uint256", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:157" + }, + { + "label": "__gap", + "offset": 0, + "slot": "181", + "type": "t_array(t_uint256)50_storage", + "contract": "CasimirManager", + "src": "src/v1/CasimirManager.sol:159" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Withdrawal)11776_storage)dyn_storage": { + "label": "struct ICasimirCore.Withdrawal[]", + "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_array(t_uint32)dyn_storage": { + "label": "uint32[]", + "numberOfBytes": "32" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(ICasimirFactory)11894": { + "label": "contract ICasimirFactory", + "numberOfBytes": "20" + }, + "t_contract(ICasimirRegistry)12612": { + "label": "contract ICasimirRegistry", + "numberOfBytes": "20" + }, + "t_contract(ICasimirUpkeep)12716": { + "label": "contract ICasimirUpkeep", + "numberOfBytes": "20" + }, + "t_int256": { + "label": "int256", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(User)11769_storage)": { + "label": "mapping(address => struct ICasimirCore.User)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint32,t_address)": { + "label": "mapping(uint32 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint32,t_uint256)": { + "label": "mapping(uint32 => uint256)", + "numberOfBytes": "32" + }, + "t_struct(User)11769_storage": { + "label": "struct ICasimirCore.User", + "members": [ + { + "label": "stake0", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "stakeRatioSum0", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Withdrawal)11776_storage": { + "label": "struct ICasimirCore.Withdrawal", + "members": [ + { + "label": "userAddress", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "amount", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "period", + "type": "t_uint256", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } } } } diff --git a/contracts/ethereum/arguments.js b/contracts/ethereum/arguments.js index 28f5437e5..ebb686b1b 100644 --- a/contracts/ethereum/arguments.js +++ b/contracts/ethereum/arguments.js @@ -3,6 +3,22 @@ * npm run verify --workspace @casimir/ethereum -- --constructor-args arguments.js --network goerli CONTRACT_ADDRESS */ -// const { ETHEREUM_CONTRACTS } = require("@casimir/env"); +const { ETHEREUM_CONTRACTS } = require("@casimir/env"); -// module.exports = [] \ No newline at end of file +module.exports = [ + // Manager + // ETHEREUM_CONTRACTS['TESTNET'].FUNCTIONS_BILLING_REGISTRY_ADDRESS, + // ETHEREUM_CONTRACTS['TESTNET'].KEEPER_REGISTRAR_ADDRESS, + // ETHEREUM_CONTRACTS['TESTNET'].KEEPER_REGISTRY_ADDRESS, + // ETHEREUM_CONTRACTS['TESTNET'].LINK_TOKEN_ADDRESS, + // ETHEREUM_CONTRACTS['TESTNET'].SSV_NETWORK_ADDRESS, + // ETHEREUM_CONTRACTS['TESTNET'].SSV_TOKEN_ADDRESS, + // ETHEREUM_CONTRACTS['TESTNET'].SWAP_FACTORY_ADDRESS, + // ETHEREUM_CONTRACTS['TESTNET'].SWAP_ROUTER_ADDRESS, + // ETHEREUM_CONTRACTS['TESTNET'].WETH_TOKEN_ADDRESS, + + // Functions Billing Registry + // ETHEREUM_CONTRACTS['TESTNET'].LINK_TOKEN_ADDRESS, + // ETHEREUM_CONTRACTS['TESTNET'].LINK_ETH_FEED_ADDRESS, + // ETHEREUM_CONTRACTS['TESTNET'].FUNCTIONS_ORACLE_ADDRESS +] \ No newline at end of file diff --git a/contracts/ethereum/hardhat.config.ts b/contracts/ethereum/hardhat.config.ts index 275c3a16a..25f9e7e0d 100644 --- a/contracts/ethereum/hardhat.config.ts +++ b/contracts/ethereum/hardhat.config.ts @@ -8,6 +8,7 @@ import '@openzeppelin/hardhat-upgrades' import 'hardhat-abi-exporter' import 'hardhat-contract-sizer' import 'solidity-docgen' +// import '@tenderly/hardhat-tenderly' import { ETHEREUM_CONTRACTS, ETHEREUM_RPC_URL, ETHEREUM_SIGNERS, HARDHAT_NETWORK_KEY } from '@casimir/env' // Seed is provided @@ -45,6 +46,7 @@ if (hardhatNetwork !== 'localhost') { process.env.ETHEREUM_RPC_URL = process.env.ETHEREUM_RPC_URL || ETHEREUM_RPC_URL[networkKey] process.env.OWNER_ADDRESS = ETHEREUM_SIGNERS[networkKey].OWNER_ADDRESS process.env.DAO_ORACLE_ADDRESS = ETHEREUM_SIGNERS[networkKey].DAO_ORACLE_ADDRESS + process.env.BEACON_LIBRARY_ADDRESS = ETHEREUM_CONTRACTS[networkKey].BEACON_LIBRARY_ADDRESS process.env.MANAGER_BEACON_ADDRESS = ETHEREUM_CONTRACTS[networkKey].MANAGER_BEACON_ADDRESS process.env.POOL_BEACON_ADDRESS = ETHEREUM_CONTRACTS[networkKey].POOL_BEACON_ADDRESS process.env.REGISTRY_BEACON_ADDRESS = ETHEREUM_CONTRACTS[networkKey].REGISTRY_BEACON_ADDRESS @@ -70,6 +72,11 @@ const config: HardhatUserConfig = { etherscan: { apiKey: 'DS62I9VXK4IEGYHG2RRMMX8H17KI9HANBI' }, + // tenderly: { + // username: 'shanejearley', + // project: 'casimir', + // accessKey: 'Nym3yVsVN2vCrXC95PiEjmMux5fApdok' + // }, mocha: { timeout: 60000 }, diff --git a/contracts/ethereum/package.json b/contracts/ethereum/package.json index 9800c1556..b545e3fef 100644 --- a/contracts/ethereum/package.json +++ b/contracts/ethereum/package.json @@ -8,11 +8,11 @@ "dev": "npx hardhat run scripts/dev.ts", "docgen": "npx hardhat docgen", "node": "npx hardhat node", - "postinstall": "npx esno scripts/foundryup.ts", "report": "npx hardhat run scripts/report.ts", "size": "npx hardhat size-contracts", "test": "npx hardhat test", - "upgrade": "npx hardhat run scripts/upgrade.ts", + "upgrade:all": "npx hardhat run scripts/upgrade-all.ts", + "upgrade:proxies": "npx hardhat run scripts/upgrade-proxies.ts", "verify": "npx hardhat verify" }, "dependencies": { diff --git a/contracts/ethereum/scripts/report.ts b/contracts/ethereum/scripts/report.ts index 629f43af0..ff5181434 100644 --- a/contracts/ethereum/scripts/report.ts +++ b/contracts/ethereum/scripts/report.ts @@ -1,5 +1,5 @@ import { ethers } from 'hardhat' -import { CasimirFactory, CasimirUpkeep } from '../build/@types' +import { CasimirFactory } from '../build/@types' import ICasimirFactoryAbi from '../build/abi/ICasimirFactory.json' import ICasimirUpkeepAbi from '../build/abi/ICasimirUpkeep.json' import { ETHEREUM_CONTRACTS, ETHEREUM_RPC_URL } from '@casimir/env' @@ -12,14 +12,8 @@ void async function() { const factory = new ethers.Contract(ETHEREUM_CONTRACTS['TESTNET'].FACTORY_ADDRESS, ICasimirFactoryAbi, provider) as CasimirFactory const [managerId] = await factory.getManagerIds() const managerConfig = await factory.getManagerConfig(managerId) - const upkeep = new ethers.Contract(managerConfig.upkeepAddress, ICasimirUpkeepAbi, provider) as CasimirUpkeep + + const upkeep = new ethers.Contract(managerConfig.upkeepAddress, ICasimirUpkeepAbi, provider) const requestReport = await upkeep.connect(owner).requestReport() await requestReport.wait() - // const checkData = ethers.utils.toUtf8Bytes('') - // const checkUpkeep = await upkeep.checkUpkeep(checkData) - // if (checkUpkeep.upkeepNeeded) { - // const performData = ethers.utils.toUtf8Bytes('') - // const performUpkeep = await upkeep.connect(owner).performUpkeep(performData, { gasLimit: 5000000 }) - // await performUpkeep.wait() - // } }() \ No newline at end of file diff --git a/contracts/ethereum/scripts/upgrade.ts b/contracts/ethereum/scripts/upgrade-all.ts similarity index 93% rename from contracts/ethereum/scripts/upgrade.ts rename to contracts/ethereum/scripts/upgrade-all.ts index 59e1f92ca..5331f6228 100644 --- a/contracts/ethereum/scripts/upgrade.ts +++ b/contracts/ethereum/scripts/upgrade-all.ts @@ -4,13 +4,14 @@ import { ethers, upgrades } from 'hardhat' * Upgrade ethereum contracts */ void async function () { + // Redeploying functions billing registry for updates + // if (!process.env.FUNCTIONS_BILLING_REGISTRY_ADDRESS) throw new Error('No functions billing registry address provided') if (!process.env.MANAGER_BEACON_ADDRESS) throw new Error('No manager beacon address provided') if (!process.env.POOL_BEACON_ADDRESS) throw new Error('No pool beacon address provided') if (!process.env.REGISTRY_BEACON_ADDRESS) throw new Error('No registry beacon address provided') if (!process.env.UPKEEP_BEACON_ADDRESS) throw new Error('No upkeep beacon address provided') if (!process.env.VIEWS_BEACON_ADDRESS) throw new Error('No views address provided') if (!process.env.FACTORY_ADDRESS) throw new Error('No factory address provided') - // if (!process.env.FUNCTIONS_BILLING_REGISTRY_ADDRESS) throw new Error('No functions billing registry address provided') if (!process.env.KEEPER_REGISTRAR_ADDRESS) throw new Error('No keeper registrar address provided') if (!process.env.KEEPER_REGISTRY_ADDRESS) throw new Error('No keeper registry address provided') if (!process.env.LINK_TOKEN_ADDRESS) throw new Error('No link token address provided') @@ -32,7 +33,7 @@ void async function () { const deployNewOracleReceipt = await deployNewOracle.wait() if (!deployNewOracleReceipt.events) throw new Error('Functions oracle deployment failed') const functionsOracleAddress = deployNewOracleReceipt.events[1].args?.don as string - const functionsOracle = await ethers.getContractAt('FunctionsOraclePatched', functionsOracleAddress) + const functionsOracle = await ethers.getContractAt('FunctionsOracle', functionsOracleAddress) const acceptOwnership = await functionsOracle.acceptOwnership() await acceptOwnership.wait() console.log(`FunctionsOracle contract deployed to ${functionsOracle.address}`) @@ -138,10 +139,12 @@ void async function () { await factory.deployed() console.log(`CasimirFactory contract upgraded at ${factory.address}`) - await functionsBillingRegistry.setAuthorizedSenders([donTransmitter.address, functionsOracle.address]) - await functionsOracle.setRegistry(functionsBillingRegistry.address) - + const [managerId] = await factory.getManagerIds() const managerConfig = await factory.getManagerConfig(managerId) - await functionsOracle.addAuthorizedSenders([donTransmitter.address, managerConfig.upkeepAddress]) + const upkeep = await ethers.getContractAt('CasimirUpkeep', managerConfig.upkeepAddress) + await upkeep.setFunctionsOracle(functionsOracle.address) + await functionsOracle.setAuthorizedSenders([donTransmitter.address, managerConfig.managerAddress, managerConfig.upkeepAddress]) + await functionsBillingRegistry.setAuthorizedSenders([functionsOracle.address, donTransmitter.address]) + await functionsOracle.setRegistry(functionsBillingRegistry.address) }() \ No newline at end of file diff --git a/contracts/ethereum/scripts/upgrade-proxies.ts b/contracts/ethereum/scripts/upgrade-proxies.ts new file mode 100644 index 000000000..25b1ca07b --- /dev/null +++ b/contracts/ethereum/scripts/upgrade-proxies.ts @@ -0,0 +1,93 @@ +import { ethers, upgrades } from 'hardhat' + +/** + * Upgrade ethereum contracts + */ +void async function () { + // Redeploying functions billing registry for updates + if (!process.env.FUNCTIONS_BILLING_REGISTRY_ADDRESS) throw new Error('No functions billing registry address provided') + if (!process.env.BEACON_LIBRARY_ADDRESS) throw new Error('No beacon library address provided') + if (!process.env.MANAGER_BEACON_ADDRESS) throw new Error('No manager beacon address provided') + if (!process.env.POOL_BEACON_ADDRESS) throw new Error('No pool beacon address provided') + if (!process.env.REGISTRY_BEACON_ADDRESS) throw new Error('No registry beacon address provided') + if (!process.env.UPKEEP_BEACON_ADDRESS) throw new Error('No upkeep beacon address provided') + if (!process.env.VIEWS_BEACON_ADDRESS) throw new Error('No views address provided') + if (!process.env.FACTORY_ADDRESS) throw new Error('No factory address provided') + if (!process.env.KEEPER_REGISTRAR_ADDRESS) throw new Error('No keeper registrar address provided') + if (!process.env.KEEPER_REGISTRY_ADDRESS) throw new Error('No keeper registry address provided') + if (!process.env.LINK_TOKEN_ADDRESS) throw new Error('No link token address provided') + if (!process.env.SSV_NETWORK_ADDRESS) throw new Error('No ssv network address provided') + if (!process.env.SSV_TOKEN_ADDRESS) throw new Error('No ssv token address provided') + if (!process.env.SSV_VIEWS_ADDRESS) throw new Error('No ssv views address provided') + if (!process.env.SWAP_FACTORY_ADDRESS) throw new Error('No swap factory address provided') + if (!process.env.SWAP_ROUTER_ADDRESS) throw new Error('No swap router address provided') + if (!process.env.WETH_TOKEN_ADDRESS) throw new Error('No weth token address provided') + + const managerBeaconFactory = await ethers.getContractFactory('CasimirManager', { + libraries: { + CasimirBeacon: process.env.BEACON_LIBRARY_ADDRESS + } + }) + const managerBeacon = await upgrades.upgradeBeacon(process.env.MANAGER_BEACON_ADDRESS, managerBeaconFactory, { + constructorArgs: [ + process.env.FUNCTIONS_BILLING_REGISTRY_ADDRESS, + process.env.KEEPER_REGISTRAR_ADDRESS, + process.env.KEEPER_REGISTRY_ADDRESS, + process.env.LINK_TOKEN_ADDRESS, + process.env.SSV_NETWORK_ADDRESS, + process.env.SSV_TOKEN_ADDRESS, + process.env.SWAP_FACTORY_ADDRESS, + process.env.SWAP_ROUTER_ADDRESS, + process.env.WETH_TOKEN_ADDRESS + ], + unsafeAllow: ['external-library-linking'] + }) + await managerBeacon.deployed() + console.log(`CasimirManager beacon upgraded at ${managerBeacon.address}`) + + const poolBeaconFactory = await ethers.getContractFactory('CasimirPool') + const poolBeacon = await upgrades.upgradeBeacon(process.env.POOL_BEACON_ADDRESS, poolBeaconFactory, { + constructorArgs: [ + process.env.DEPOSIT_CONTRACT_ADDRESS + ] + }) + await poolBeacon.deployed() + console.log(`CasimirPool beacon upgraded at ${poolBeacon.address}`) + + const registryBeaconFactory = await ethers.getContractFactory('CasimirRegistry') + const registryBeacon = await upgrades.upgradeBeacon(process.env.REGISTRY_BEACON_ADDRESS, registryBeaconFactory, { + constructorArgs: [ + process.env.SSV_VIEWS_ADDRESS + ] + }) + await registryBeacon.deployed() + console.log(`CasimirRegistry beacon upgraded at ${registryBeacon.address}`) + + const upkeepBeaconFactory = await ethers.getContractFactory('CasimirUpkeep') + const upkeepBeacon = await upgrades.upgradeBeacon(process.env.UPKEEP_BEACON_ADDRESS, upkeepBeaconFactory) + await upkeepBeacon.deployed() + console.log(`CasimirUpkeep beacon upgraded at ${upkeepBeacon.address}`) + + const viewsBeaconFactory = await ethers.getContractFactory('CasimirViews') + const viewsBeacon = await upgrades.upgradeBeacon(process.env.VIEWS_BEACON_ADDRESS, viewsBeaconFactory) + await viewsBeacon.deployed() + console.log(`CasimirViews beacon upgraded at ${viewsBeacon.address}`) + + const factoryFactory = await ethers.getContractFactory('CasimirFactory', { + libraries: { + CasimirBeacon: process.env.BEACON_LIBRARY_ADDRESS + } + }) + const factory = await upgrades.upgradeProxy(process.env.FACTORY_ADDRESS, factoryFactory, { + constructorArgs: [ + managerBeacon.address, + poolBeacon.address, + registryBeacon.address, + upkeepBeacon.address, + viewsBeacon.address + ], + unsafeAllow: ['external-library-linking'] + }) + await factory.deployed() + console.log(`CasimirFactory contract upgraded at ${factory.address}`) +}() \ No newline at end of file diff --git a/contracts/ethereum/src/v1/CasimirManager.sol b/contracts/ethereum/src/v1/CasimirManager.sol index a164e5872..e8b8c2551 100644 --- a/contracts/ethereum/src/v1/CasimirManager.sol +++ b/contracts/ethereum/src/v1/CasimirManager.sol @@ -644,6 +644,12 @@ contract CasimirManager is ICasimirManager, CasimirCore, Initializable, OwnableU emit ExitCompleted(poolId); } + /// @inheritdoc ICasimirManager + function resetFunctions() external { + onlyFactoryOwner(); + functionsId = 0; + } + /// @inheritdoc ICasimirManager function withdrawClusterBalance( uint64[] memory operatorIds, diff --git a/contracts/ethereum/src/v1/interfaces/ICasimirManager.sol b/contracts/ethereum/src/v1/interfaces/ICasimirManager.sol index 814af8684..6375e3bed 100644 --- a/contracts/ethereum/src/v1/interfaces/ICasimirManager.sol +++ b/contracts/ethereum/src/v1/interfaces/ICasimirManager.sol @@ -207,6 +207,11 @@ interface ICasimirManager is ICasimirCore { ISSVNetworkCore.Cluster memory cluster ) external; + /** + * @notice Reset functions subscription + */ + function resetFunctions() external; + /** * @notice Withdraw cluster balance * @param operatorIds Operator IDs diff --git a/contracts/ethereum/src/v1/mock/AuthorizedOriginReceiver.sol b/contracts/ethereum/src/v1/mock/AuthorizedOriginReceiver.sol deleted file mode 100644 index bada53758..000000000 --- a/contracts/ethereum/src/v1/mock/AuthorizedOriginReceiver.sol +++ /dev/null @@ -1,164 +0,0 @@ -// SPDX-License-Identifier: Apache -pragma solidity 0.8.18; - -import "@chainlink/contracts/src/v0.8/dev/vendor/openzeppelin-solidity/v.4.8.0/contracts/utils/structs/EnumerableSet.sol"; - -/** - * @notice Modified AuthorizedReciever abstract for use on the FunctionsOracle contract to limit usage - */ - -abstract contract AuthorizedOriginReceiver { - using EnumerableSet for EnumerableSet.AddressSet; - - event AuthorizedSendersChanged(address[] senders, address changedBy); - event AuthorizedSendersActive(address account); - event AuthorizedSendersDeactive(address account); - - error EmptySendersList(); - error UnauthorizedSender(); - error NotAllowedToSetSenders(); - error AlreadySet(); - - bool private _active; - EnumerableSet.AddressSet private s_authorizedSenders; - address[] private s_authorizedSendersList; - - /** - * @dev Initializes the contract in active state. - */ - constructor() { - _active = true; - } - - /** - * @dev Returns true if the contract is paused, and false otherwise. - */ - function authorizedReceiverActive() public view virtual returns (bool) { - return _active; - } - - /** - * @dev Triggers AuthorizedOriginReceiver usage to block unuthorized senders. - * - * Requirements: - * - * - The contract must not be deactive. - */ - function activateAuthorizedReceiver() external validateAuthorizedSenderSetter { - if (authorizedReceiverActive()) { - revert AlreadySet(); - } - _active = true; - emit AuthorizedSendersActive(msg.sender); - } - - /** - * @dev Triggers AuthorizedOriginReceiver usage to allow all senders. - * - * Requirements: - * - * - The contract must be active. - */ - function deactivateAuthorizedReceiver() external validateAuthorizedSenderSetter { - if (!authorizedReceiverActive()) { - revert AlreadySet(); - } - _active = false; - emit AuthorizedSendersDeactive(msg.sender); - } - - /** - * @notice Sets the permission to request for the given wallet(s). - * @param senders The addresses of the wallet addresses to grant access - */ - function addAuthorizedSenders(address[] calldata senders) external validateAuthorizedSenderSetter { - if (senders.length == 0) { - revert EmptySendersList(); - } - for (uint256 i = 0; i < senders.length; i++) { - bool success = s_authorizedSenders.add(senders[i]); - if (success) { - s_authorizedSendersList.push(senders[i]); - } - } - emit AuthorizedSendersChanged(senders, msg.sender); - } - - /** - * @notice Remove the permission to request for the given wallet(s). - * @param senders The addresses of the wallet addresses to revoke access - */ - function removeAuthorizedSenders(address[] calldata senders) external validateAuthorizedSenderSetter { - if (senders.length == 0) { - revert EmptySendersList(); - } - for (uint256 i = 0; i < senders.length; i++) { - bool success = s_authorizedSenders.remove(senders[i]); - if (success) { - // Remove from s_authorizedSendersList - for (uint256 j = 0; j < s_authorizedSendersList.length; j++) { - if (s_authorizedSendersList[j] == senders[i]) { - address last = s_authorizedSendersList[s_authorizedSendersList.length - 1]; - // Copy last element and overwrite senders[i] to be deleted with it - s_authorizedSendersList[i] = last; - s_authorizedSendersList.pop(); - } - } - } - } - emit AuthorizedSendersChanged(senders, msg.sender); - } - - /** - * @notice Retrieve a list of authorized senders - * @return array of addresses - */ - function getAuthorizedSenders() public view returns (address[] memory) { - return s_authorizedSendersList; - } - - /** - * @notice Use this to check if a node is authorized for fulfilling requests - * @param sender The address of the Chainlink node - * @return The authorization status of the node - */ - function isAuthorizedSender(address sender) public view returns (bool) { - if (!authorizedReceiverActive()) { - return true; - } - return s_authorizedSenders.contains(sender); - } - - /** - * @notice customizable guard of who can update the authorized sender list - * @return bool whether sender can update authorized sender list - */ - function _canSetAuthorizedSenders() internal virtual returns (bool); - - /** - * @notice validates the sender is an authorized sender - */ - function _validateIsAuthorizedSender() internal view { - if (!isAuthorizedSender(msg.sender)) { - revert UnauthorizedSender(); - } - } - - /** - * @notice prevents non-authorized addresses from calling this method - */ - modifier validateAuthorizedSender() { - _validateIsAuthorizedSender(); - _; - } - - /** - * @notice prevents non-authorized addresses from calling this method - */ - modifier validateAuthorizedSenderSetter() { - if (!_canSetAuthorizedSenders()) { - revert NotAllowedToSetSenders(); - } - _; - } -} diff --git a/contracts/ethereum/src/v1/mock/FunctionsBillingRegistry.sol b/contracts/ethereum/src/v1/mock/FunctionsBillingRegistry.sol index e2d69c0d0..b4e4111e9 100644 --- a/contracts/ethereum/src/v1/mock/FunctionsBillingRegistry.sol +++ b/contracts/ethereum/src/v1/mock/FunctionsBillingRegistry.sol @@ -1,4 +1,819 @@ // SPDX-License-Identifier: Apache pragma solidity 0.8.18; -import "@chainlink/contracts/src/v0.8/dev/functions/FunctionsBillingRegistry.sol"; \ No newline at end of file +import "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol"; +import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; +import "@chainlink/contracts/src/v0.8/dev/interfaces/FunctionsBillingRegistryInterface.sol"; +import "@chainlink/contracts/src/v0.8/dev/interfaces/FunctionsOracleInterface.sol"; +import "@chainlink/contracts/src/v0.8/dev/interfaces/FunctionsClientInterface.sol"; +import "@chainlink/contracts/src/v0.8/interfaces/TypeAndVersionInterface.sol"; +import "@chainlink/contracts/src/v0.8/interfaces/ERC677ReceiverInterface.sol"; +import "@chainlink/contracts/src/v0.8/dev/interfaces/AuthorizedOriginReceiverInterface.sol"; +import "@chainlink/contracts/src/v0.8/ConfirmedOwner.sol"; +import "@chainlink/contracts/src/v0.8/dev/AuthorizedReceiver.sol"; +import "@chainlink/contracts/src/v0.8/dev/vendor/openzeppelin-solidity/v.4.8.0/contracts/utils/SafeCast.sol"; +import "@chainlink/contracts/src/v0.8/dev/vendor/openzeppelin-solidity/v.4.8.0/contracts/security/Pausable.sol"; + +contract FunctionsBillingRegistry is + ConfirmedOwner, + Pausable, + FunctionsBillingRegistryInterface, + ERC677ReceiverInterface, + AuthorizedReceiver +{ + LinkTokenInterface public immutable LINK; + AggregatorV3Interface public immutable LINK_ETH_FEED; + AuthorizedReceiverInterface private immutable ORACLE_WITH_ALLOWLIST; + + // We need to maintain a list of consuming addresses. + // This bound ensures we are able to loop over them as needed. + // Should a user require more consumers, they can use multiple subscriptions. + uint16 public constant MAX_CONSUMERS = 100; + + error TooManyConsumers(); + error InsufficientBalance(); + error InvalidConsumer(uint64 subscriptionId, address consumer); + error InvalidSubscription(); + error OnlyCallableFromLink(); + error InvalidCalldata(); + error MustBeSubOwner(address owner); + error PendingRequestExists(); + error MustBeRequestedOwner(address proposedOwner); + error BalanceInvariantViolated(uint256 internalBalance, uint256 externalBalance); // Should never happen + event FundsRecovered(address to, uint256 amount); + + struct Subscription { + // There are only 1e9*1e18 = 1e27 juels in existence, so the balance can fit in uint96 (2^96 ~ 7e28) + uint96 balance; // Common LINK balance that is controlled by the Registry to be used for all consumer requests. + uint96 blockedBalance; // LINK balance that is reserved to pay for pending consumer requests. + } + // We use the config for the mgmt APIs + struct SubscriptionConfig { + address owner; // Owner can fund/withdraw/cancel the sub. + address requestedOwner; // For safely transferring sub ownership. + // Maintains the list of keys in s_consumers. + // We do this for 2 reasons: + // 1. To be able to clean up all keys from s_consumers when canceling a subscription. + // 2. To be able to return the list of all consumers in getSubscription. + // Note that we need the s_consumers map to be able to directly check if a + // consumer is valid without reading all the consumers from storage. + address[] consumers; + } + // Note a nonce of 0 indicates an the consumer is not assigned to that subscription. + mapping(address => mapping(uint64 => uint64)) /* consumer */ /* subscriptionId */ /* nonce */ private s_consumers; + mapping(uint64 => SubscriptionConfig) /* subscriptionId */ /* subscriptionConfig */ private s_subscriptionConfigs; + mapping(uint64 => Subscription) /* subscriptionId */ /* subscription */ private s_subscriptions; + // We make the sub count public so that its possible to + // get all the current subscriptions via getSubscription. + uint64 private s_currentsubscriptionId; + // s_totalBalance tracks the total link sent to/from + // this contract through onTokenTransfer, cancelSubscription and oracleWithdraw. + // A discrepancy with this contract's link balance indicates someone + // sent tokens using transfer and so we may need to use recoverFunds. + uint96 private s_totalBalance; + event SubscriptionCreated(uint64 indexed subscriptionId, address owner); + event SubscriptionFunded(uint64 indexed subscriptionId, uint256 oldBalance, uint256 newBalance); + event SubscriptionConsumerAdded(uint64 indexed subscriptionId, address consumer); + event SubscriptionConsumerRemoved(uint64 indexed subscriptionId, address consumer); + event SubscriptionCanceled(uint64 indexed subscriptionId, address to, uint256 amount); + event SubscriptionOwnerTransferRequested(uint64 indexed subscriptionId, address from, address to); + event SubscriptionOwnerTransferred(uint64 indexed subscriptionId, address from, address to); + + error GasLimitTooBig(uint32 have, uint32 want); + error InvalidLinkWeiPrice(int256 linkWei); + error IncorrectRequestID(); + error PaymentTooLarge(); + error Reentrant(); + + mapping(address => uint96) /* oracle node */ /* LINK balance */ private s_withdrawableTokens; + struct Commitment { + uint64 subscriptionId; + address client; + uint32 gasLimit; + uint256 gasPrice; + address don; + uint96 donFee; + uint96 registryFee; + uint96 estimatedCost; + uint256 timestamp; + } + mapping(bytes32 => Commitment) /* requestID */ /* Commitment */ private s_requestCommitments; + event BillingStart(bytes32 indexed requestId, Commitment commitment); + struct ItemizedBill { + uint96 signerPayment; + uint96 transmitterPayment; + uint96 totalCost; + } + event BillingEnd( + bytes32 indexed requestId, + uint64 subscriptionId, + uint96 signerPayment, + uint96 transmitterPayment, + uint96 totalCost, + bool success + ); + event RequestTimedOut(bytes32 indexed requestId); + + struct Config { + // Maxiumum amount of gas that can be given to a request's client callback + uint32 maxGasLimit; + // Reentrancy protection. + bool reentrancyLock; + // stalenessSeconds is how long before we consider the feed price to be stale + // and fallback to fallbackWeiPerUnitLink. + uint32 stalenessSeconds; + // Gas to cover transmitter oracle payment after we calculate the payment. + // We make it configurable in case those operations are repriced. + uint256 gasAfterPaymentCalculation; + // Represents the average gas execution cost. Used in estimating cost beforehand. + uint32 gasOverhead; + // how many seconds it takes before we consider a request to be timed out + uint32 requestTimeoutSeconds; + } + int256 private s_fallbackWeiPerUnitLink; + Config private s_config; + event ConfigSet( + uint32 maxGasLimit, + uint32 stalenessSeconds, + uint256 gasAfterPaymentCalculation, + int256 fallbackWeiPerUnitLink, + uint32 gasOverhead + ); + + constructor(address link, address linkEthFeed, address oracle) ConfirmedOwner(msg.sender) { + LINK = LinkTokenInterface(link); + LINK_ETH_FEED = AggregatorV3Interface(linkEthFeed); + ORACLE_WITH_ALLOWLIST = AuthorizedReceiverInterface(oracle); + } + + /** + * @notice Sets the configuration of the Chainlink Functions billing registry + * @param maxGasLimit global max for request gas limit + * @param stalenessSeconds if the eth/link feed is more stale then this, use the fallback price + * @param gasAfterPaymentCalculation gas used in doing accounting after completing the gas measurement + * @param fallbackWeiPerUnitLink fallback eth/link price in the case of a stale feed + * @param gasOverhead average gas execution cost used in estimating total cost + * @param requestTimeoutSeconds e2e timeout after which user won't be charged + */ + function setConfig( + uint32 maxGasLimit, + uint32 stalenessSeconds, + uint256 gasAfterPaymentCalculation, + int256 fallbackWeiPerUnitLink, + uint32 gasOverhead, + uint32 requestTimeoutSeconds + ) external onlyOwner { + if (fallbackWeiPerUnitLink <= 0) { + revert InvalidLinkWeiPrice(fallbackWeiPerUnitLink); + } + s_config = Config({ + maxGasLimit: maxGasLimit, + stalenessSeconds: stalenessSeconds, + gasAfterPaymentCalculation: gasAfterPaymentCalculation, + reentrancyLock: false, + gasOverhead: gasOverhead, + requestTimeoutSeconds: requestTimeoutSeconds + }); + s_fallbackWeiPerUnitLink = fallbackWeiPerUnitLink; + emit ConfigSet(maxGasLimit, stalenessSeconds, gasAfterPaymentCalculation, fallbackWeiPerUnitLink, gasOverhead); + } + + /** + * @notice Gets the configuration of the Chainlink Functions billing registry + * @return maxGasLimit global max for request gas limit + * @return stalenessSeconds if the eth/link feed is more stale then this, use the fallback price + * @return gasAfterPaymentCalculation gas used in doing accounting after completing the gas measurement + * @return fallbackWeiPerUnitLink fallback eth/link price in the case of a stale feed + * @return gasOverhead average gas execution cost used in estimating total cost + */ + function getConfig() + external + view + returns ( + uint32 maxGasLimit, + uint32 stalenessSeconds, + uint256 gasAfterPaymentCalculation, + int256 fallbackWeiPerUnitLink, + uint32 gasOverhead + ) + { + return ( + s_config.maxGasLimit, + s_config.stalenessSeconds, + s_config.gasAfterPaymentCalculation, + s_fallbackWeiPerUnitLink, + s_config.gasOverhead + ); + } + + function pause() external onlyOwner { + _pause(); + } + + function unpause() external onlyOwner { + _unpause(); + } + + function getTotalBalance() external view returns (uint256) { + return s_totalBalance; + } + + /** + * @notice Owner cancel subscription, sends remaining link directly to the subscription owner. + * @param subscriptionId subscription id + * @dev notably can be called even if there are pending requests, outstanding ones may fail onchain + */ + function ownerCancelSubscription(uint64 subscriptionId) external onlyOwner { + address owner = s_subscriptionConfigs[subscriptionId].owner; + if (owner == address(0)) { + revert InvalidSubscription(); + } + cancelSubscriptionHelper(subscriptionId, owner); + } + + /** + * @notice Recover link sent with transfer instead of transferAndCall. + * @param to address to send link to + */ + function recoverFunds(address to) external onlyOwner { + uint256 externalBalance = LINK.balanceOf(address(this)); + uint256 internalBalance = uint256(s_totalBalance); + if (internalBalance > externalBalance) { + revert BalanceInvariantViolated(internalBalance, externalBalance); + } + if (internalBalance < externalBalance) { + uint256 amount = externalBalance - internalBalance; + LINK.transfer(to, amount); + emit FundsRecovered(to, amount); + } + // If the balances are equal, nothing to be done. + } + + /** + * @inheritdoc FunctionsBillingRegistryInterface + */ + function getRequestConfig() external view override returns (uint32, address[] memory) { + return (s_config.maxGasLimit, getAuthorizedSenders()); + } + + /** + * @inheritdoc FunctionsBillingRegistryInterface + */ + function getRequiredFee( + bytes calldata /* data */, + FunctionsBillingRegistryInterface.RequestBilling memory /* billing */ + ) public pure override returns (uint96) { + // NOTE: Optionally, compute additional fee here + return 0; + } + + /** + * @inheritdoc FunctionsBillingRegistryInterface + */ + function estimateCost( + uint32 gasLimit, + uint256 gasPrice, + uint96 donFee, + uint96 registryFee + ) public view override returns (uint96) { + int256 weiPerUnitLink; + weiPerUnitLink = getFeedData(); + if (weiPerUnitLink <= 0) { + revert InvalidLinkWeiPrice(weiPerUnitLink); + } + uint256 executionGas = s_config.gasOverhead + s_config.gasAfterPaymentCalculation + gasLimit; + // (1e18 juels/link) (wei/gas * gas) / (wei/link) = juels + uint256 paymentNoFee = (1e18 * gasPrice * executionGas) / uint256(weiPerUnitLink); + uint256 fee = uint256(donFee) + uint256(registryFee); + if (paymentNoFee > (1e27 - fee)) { + revert PaymentTooLarge(); // Payment + fee cannot be more than all of the link in existence. + } + return uint96(paymentNoFee + fee); + } + + /** + * @inheritdoc FunctionsBillingRegistryInterface + */ + function startBilling( + bytes calldata data, + RequestBilling calldata billing + ) external override validateAuthorizedSender nonReentrant whenNotPaused returns (bytes32) { + // Input validation using the subscription storage. + if (s_subscriptionConfigs[billing.subscriptionId].owner == address(0)) { + revert InvalidSubscription(); + } + // It's important to ensure that the consumer is in fact who they say they + // are, otherwise they could use someone else's subscription balance. + // A nonce of 0 indicates consumer is not allocated to the sub. + uint64 currentNonce = s_consumers[billing.client][billing.subscriptionId]; + if (currentNonce == 0) { + revert InvalidConsumer(billing.subscriptionId, billing.client); + } + // No lower bound on the requested gas limit. A user could request 0 + // and they would simply be billed for the gas and computation. + if (billing.gasLimit > s_config.maxGasLimit) { + revert GasLimitTooBig(billing.gasLimit, s_config.maxGasLimit); + } + + // Check that subscription can afford the estimated cost + uint96 oracleFee = FunctionsOracleInterface(msg.sender).getRequiredFee(data, billing); + uint96 registryFee = getRequiredFee(data, billing); + uint96 estimatedCost = estimateCost(billing.gasLimit, billing.gasPrice, oracleFee, registryFee); + uint96 effectiveBalance = s_subscriptions[billing.subscriptionId].balance - + s_subscriptions[billing.subscriptionId].blockedBalance; + if (effectiveBalance < estimatedCost) { + revert InsufficientBalance(); + } + + uint64 nonce = currentNonce + 1; + bytes32 requestId = computeRequestId(msg.sender, billing.client, billing.subscriptionId, nonce); + + Commitment memory commitment = Commitment( + billing.subscriptionId, + billing.client, + billing.gasLimit, + billing.gasPrice, + msg.sender, + oracleFee, + registryFee, + estimatedCost, + block.timestamp + ); + s_requestCommitments[requestId] = commitment; + s_subscriptions[billing.subscriptionId].blockedBalance += estimatedCost; + + emit BillingStart(requestId, commitment); + s_consumers[billing.client][billing.subscriptionId] = nonce; + return requestId; + } + + function computeRequestId( + address don, + address client, + uint64 subscriptionId, + uint64 nonce + ) private pure returns (bytes32) { + return keccak256(abi.encode(don, client, subscriptionId, nonce)); + } + + /** + * @dev calls target address with exactly gasAmount gas and data as calldata + * or reverts if at least gasAmount gas is not available. + */ + function callWithExactGas(uint256 gasAmount, address target, bytes memory data) private returns (bool success) { + // solhint-disable-next-line no-inline-assembly + assembly { + let g := gas() + // GAS_FOR_CALL_EXACT_CHECK = 5000 + // Compute g -= GAS_FOR_CALL_EXACT_CHECK and check for underflow + // The gas actually passed to the callee is min(gasAmount, 63//64*gas available). + // We want to ensure that we revert if gasAmount > 63//64*gas available + // as we do not want to provide them with less, however that check itself costs + // gas. GAS_FOR_CALL_EXACT_CHECK ensures we have at least enough gas to be able + // to revert if gasAmount > 63//64*gas available. + if lt(g, 5000) { + revert(0, 0) + } + g := sub(g, 5000) + // if g - g//64 <= gasAmount, revert + // (we subtract g//64 because of EIP-150) + if iszero(gt(sub(g, div(g, 64)), gasAmount)) { + revert(0, 0) + } + // solidity calls check that a contract actually exists at the destination, so we do the same + if iszero(extcodesize(target)) { + revert(0, 0) + } + // call and return whether we succeeded. ignore return data + // call(gas,addr,value,argsOffset,argsLength,retOffset,retLength) + success := call(gasAmount, target, 0, add(data, 0x20), mload(data), 0, 0) + } + return success; + } + + /** + * @inheritdoc FunctionsBillingRegistryInterface + */ + function fulfillAndBill( + bytes32 requestId, + bytes calldata response, + bytes calldata err, + address transmitter, + address[31] memory signers, + uint8 signerCount, + uint256 reportValidationGas, + uint256 initialGas + ) external override validateAuthorizedSender nonReentrant whenNotPaused returns (bool success) { + Commitment memory commitment = s_requestCommitments[requestId]; + if (commitment.don == address(0)) { + revert IncorrectRequestID(); + } + delete s_requestCommitments[requestId]; + + bytes memory callback = abi.encodeWithSelector( + FunctionsClientInterface.handleOracleFulfillment.selector, + requestId, + response, + err + ); + // Call with explicitly the amount of callback gas requested + // Important to not let them exhaust the gas budget and avoid payment. + // Do not allow any non-view/non-pure coordinator functions to be called + // during the consumers callback code via reentrancyLock. + // NOTE: that callWithExactGas will revert if we do not have sufficient gas + // to give the callee their requested amount. + s_config.reentrancyLock = true; + success = callWithExactGas(commitment.gasLimit, commitment.client, callback); + s_config.reentrancyLock = false; + + // We want to charge users exactly for how much gas they use in their callback. + // The gasAfterPaymentCalculation is meant to cover these additional operations where we + // decrement the subscription balance and increment the oracle's withdrawable balance. + ItemizedBill memory bill = calculatePaymentAmount( + initialGas, + s_config.gasAfterPaymentCalculation, + commitment.donFee, + signerCount, + commitment.registryFee, + reportValidationGas, + tx.gasprice + ); + if (s_subscriptions[commitment.subscriptionId].balance < bill.totalCost) { + revert InsufficientBalance(); + } + s_subscriptions[commitment.subscriptionId].balance -= bill.totalCost; + // Pay out signers their portion of the DON fee + for (uint256 i = 0; i < signerCount; i++) { + if (signers[i] != transmitter) { + s_withdrawableTokens[signers[i]] += bill.signerPayment; + } + } + // Pay out the registry fee + s_withdrawableTokens[owner()] += commitment.registryFee; + // Reimburse the transmitter for the execution gas cost + pay them their portion of the DON fee + s_withdrawableTokens[transmitter] += bill.transmitterPayment; + // Remove blocked balance + s_subscriptions[commitment.subscriptionId].blockedBalance -= commitment.estimatedCost; + // Include payment in the event for tracking costs. + emit BillingEnd( + requestId, + commitment.subscriptionId, + bill.signerPayment, + bill.transmitterPayment, + bill.totalCost, + success + ); + } + + // Determine the cost breakdown for payment + function calculatePaymentAmount( + uint256 startGas, + uint256 gasAfterPaymentCalculation, + uint96 donFee, + uint8 signerCount, + uint96 registryFee, + uint256 reportValidationGas, + uint256 weiPerUnitGas + ) private view returns (ItemizedBill memory) { + int256 weiPerUnitLink; + weiPerUnitLink = getFeedData(); + if (weiPerUnitLink <= 0) { + revert InvalidLinkWeiPrice(weiPerUnitLink); + } + // (1e18 juels/link) (wei/gas * gas) / (wei/link) = juels + uint256 paymentNoFee = (1e18 * + weiPerUnitGas * + (reportValidationGas + gasAfterPaymentCalculation + startGas - gasleft())) / uint256(weiPerUnitLink); + uint256 fee = uint256(donFee) + uint256(registryFee); + if (paymentNoFee > (1e27 - fee)) { + revert PaymentTooLarge(); // Payment + fee cannot be more than all of the link in existence. + } + uint96 signerPayment = donFee / uint96(signerCount); + uint96 transmitterPayment = uint96(paymentNoFee) + signerPayment; + uint96 totalCost = SafeCast.toUint96(paymentNoFee + fee); + return ItemizedBill(signerPayment, transmitterPayment, totalCost); + } + + function getFeedData() private view returns (int256) { + uint32 stalenessSeconds = s_config.stalenessSeconds; + bool staleFallback = stalenessSeconds > 0; + (, int256 weiPerUnitLink, , uint256 timestamp, ) = LINK_ETH_FEED.latestRoundData(); + // solhint-disable-next-line not-rely-on-time + if (staleFallback && stalenessSeconds < block.timestamp - timestamp) { + weiPerUnitLink = s_fallbackWeiPerUnitLink; + } + return weiPerUnitLink; + } + + /* + * @notice Oracle withdraw LINK earned through fulfilling requests + * @notice If amount is 0 the full balance will be withdrawn + * @param recipient where to send the funds + * @param amount amount to withdraw + */ + function oracleWithdraw(address recipient, uint96 amount) external nonReentrant whenNotPaused { + if (amount == 0) { + amount = s_withdrawableTokens[msg.sender]; + } + if (s_withdrawableTokens[msg.sender] < amount) { + revert InsufficientBalance(); + } + s_withdrawableTokens[msg.sender] -= amount; + s_totalBalance -= amount; + if (!LINK.transfer(recipient, amount)) { + revert InsufficientBalance(); + } + } + + function onTokenTransfer( + address /* sender */, + uint256 amount, + bytes calldata data + ) external override nonReentrant whenNotPaused { + if (msg.sender != address(LINK)) { + revert OnlyCallableFromLink(); + } + if (data.length != 32) { + revert InvalidCalldata(); + } + uint64 subscriptionId = abi.decode(data, (uint64)); + if (s_subscriptionConfigs[subscriptionId].owner == address(0)) { + revert InvalidSubscription(); + } + // We do not check that the msg.sender is the subscription owner, + // anyone can fund a subscription. + uint256 oldBalance = s_subscriptions[subscriptionId].balance; + s_subscriptions[subscriptionId].balance += uint96(amount); + s_totalBalance += uint96(amount); + emit SubscriptionFunded(subscriptionId, oldBalance, oldBalance + amount); + } + + function getCurrentsubscriptionId() external view returns (uint64) { + return s_currentsubscriptionId; + } + + /** + * @notice Get details about a subscription. + * @param subscriptionId - ID of the subscription + * @return balance - LINK balance of the subscription in juels. + * @return owner - owner of the subscription. + * @return consumers - list of consumer address which are able to use this subscription. + */ + function getSubscription( + uint64 subscriptionId + ) external view returns (uint96 balance, address owner, address[] memory consumers) { + if (s_subscriptionConfigs[subscriptionId].owner == address(0)) { + revert InvalidSubscription(); + } + return ( + s_subscriptions[subscriptionId].balance, + s_subscriptionConfigs[subscriptionId].owner, + s_subscriptionConfigs[subscriptionId].consumers + ); + } + + /** + * @notice Create a new subscription. + * @return subscriptionId - A unique subscription id. + * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer. + * @dev Note to fund the subscription, use transferAndCall. For example + * @dev LINKTOKEN.transferAndCall( + * @dev address(REGISTRY), + * @dev amount, + * @dev abi.encode(subscriptionId)); + */ + function createSubscription() external nonReentrant whenNotPaused onlyAuthorizedUsers returns (uint64) { + s_currentsubscriptionId++; + uint64 currentsubscriptionId = s_currentsubscriptionId; + address[] memory consumers = new address[](0); + s_subscriptions[currentsubscriptionId] = Subscription({balance: 0, blockedBalance: 0}); + s_subscriptionConfigs[currentsubscriptionId] = SubscriptionConfig({ + owner: msg.sender, + requestedOwner: address(0), + consumers: consumers + }); + + emit SubscriptionCreated(currentsubscriptionId, msg.sender); + return currentsubscriptionId; + } + + /** + * @notice Gets subscription owner. + * @param subscriptionId - ID of the subscription + * @return owner - owner of the subscription. + */ + function getSubscriptionOwner(uint64 subscriptionId) external view override returns (address owner) { + if (s_subscriptionConfigs[subscriptionId].owner == address(0)) { + revert InvalidSubscription(); + } + return s_subscriptionConfigs[subscriptionId].owner; + } + + /** + * @notice Request subscription owner transfer. + * @param subscriptionId - ID of the subscription + * @param newOwner - proposed new owner of the subscription + */ + function requestSubscriptionOwnerTransfer( + uint64 subscriptionId, + address newOwner + ) external onlySubOwner(subscriptionId) nonReentrant whenNotPaused { + // Proposing to address(0) would never be claimable so don't need to check. + if (s_subscriptionConfigs[subscriptionId].requestedOwner != newOwner) { + s_subscriptionConfigs[subscriptionId].requestedOwner = newOwner; + emit SubscriptionOwnerTransferRequested(subscriptionId, msg.sender, newOwner); + } + } + + /** + * @notice Request subscription owner transfer. + * @param subscriptionId - ID of the subscription + * @dev will revert if original owner of subscriptionId has + * not requested that msg.sender become the new owner. + */ + function acceptSubscriptionOwnerTransfer( + uint64 subscriptionId + ) external nonReentrant whenNotPaused onlyAuthorizedUsers { + if (s_subscriptionConfigs[subscriptionId].owner == address(0)) { + revert InvalidSubscription(); + } + if (s_subscriptionConfigs[subscriptionId].requestedOwner != msg.sender) { + revert MustBeRequestedOwner(s_subscriptionConfigs[subscriptionId].requestedOwner); + } + address oldOwner = s_subscriptionConfigs[subscriptionId].owner; + s_subscriptionConfigs[subscriptionId].owner = msg.sender; + s_subscriptionConfigs[subscriptionId].requestedOwner = address(0); + emit SubscriptionOwnerTransferred(subscriptionId, oldOwner, msg.sender); + } + + /** + * @notice Remove a consumer from a Chainlink Functions subscription. + * @param subscriptionId - ID of the subscription + * @param consumer - Consumer to remove from the subscription + */ + function removeConsumer( + uint64 subscriptionId, + address consumer + ) external onlySubOwner(subscriptionId) nonReentrant whenNotPaused { + if (s_consumers[consumer][subscriptionId] == 0) { + revert InvalidConsumer(subscriptionId, consumer); + } + // Note bounded by MAX_CONSUMERS + address[] memory consumers = s_subscriptionConfigs[subscriptionId].consumers; + uint256 lastConsumerIndex = consumers.length - 1; + for (uint256 i = 0; i < consumers.length; i++) { + if (consumers[i] == consumer) { + address last = consumers[lastConsumerIndex]; + // Storage write to preserve last element + s_subscriptionConfigs[subscriptionId].consumers[i] = last; + // Storage remove last element + s_subscriptionConfigs[subscriptionId].consumers.pop(); + break; + } + } + delete s_consumers[consumer][subscriptionId]; + emit SubscriptionConsumerRemoved(subscriptionId, consumer); + } + + /** + * @notice Add a consumer to a Chainlink Functions subscription. + * @param subscriptionId - ID of the subscription + * @param consumer - New consumer which can use the subscription + */ + function addConsumer( + uint64 subscriptionId, + address consumer + ) external onlySubOwner(subscriptionId) nonReentrant whenNotPaused { + // Already maxed, cannot add any more consumers. + if (s_subscriptionConfigs[subscriptionId].consumers.length == MAX_CONSUMERS) { + revert TooManyConsumers(); + } + if (s_consumers[consumer][subscriptionId] != 0) { + // Idempotence - do nothing if already added. + // Ensures uniqueness in s_subscriptions[subscriptionId].consumers. + return; + } + // Initialize the nonce to 1, indicating the consumer is allocated. + s_consumers[consumer][subscriptionId] = 1; + s_subscriptionConfigs[subscriptionId].consumers.push(consumer); + + emit SubscriptionConsumerAdded(subscriptionId, consumer); + } + + /** + * @notice Cancel a subscription + * @param subscriptionId - ID of the subscription + * @param to - Where to send the remaining LINK to + */ + function cancelSubscription( + uint64 subscriptionId, + address to + ) external onlySubOwner(subscriptionId) nonReentrant whenNotPaused { + if (pendingRequestExists(subscriptionId)) { + revert PendingRequestExists(); + } + cancelSubscriptionHelper(subscriptionId, to); + } + + function cancelSubscriptionHelper(uint64 subscriptionId, address to) private nonReentrant { + SubscriptionConfig memory subConfig = s_subscriptionConfigs[subscriptionId]; + uint96 balance = s_subscriptions[subscriptionId].balance; + // Note bounded by MAX_CONSUMERS; + // If no consumers, does nothing. + for (uint256 i = 0; i < subConfig.consumers.length; i++) { + delete s_consumers[subConfig.consumers[i]][subscriptionId]; + } + delete s_subscriptionConfigs[subscriptionId]; + delete s_subscriptions[subscriptionId]; + s_totalBalance -= balance; + if (!LINK.transfer(to, uint256(balance))) { + revert InsufficientBalance(); + } + emit SubscriptionCanceled(subscriptionId, to, balance); + } + + /** + * @notice Check to see if there exists a request commitment for all consumers for a given sub. + * @param subscriptionId - ID of the subscription + * @return true if there exists at least one unfulfilled request for the subscription, false + * otherwise. + * @dev Looping is bounded to MAX_CONSUMERS*(number of DONs). + * @dev Used to disable subscription canceling while outstanding request are present. + */ + + function pendingRequestExists(uint64 subscriptionId) public view returns (bool) { + address[] memory consumers = s_subscriptionConfigs[subscriptionId].consumers; + address[] memory authorizedSendersList = getAuthorizedSenders(); + for (uint256 i = 0; i < consumers.length; i++) { + for (uint256 j = 0; j < authorizedSendersList.length; j++) { + bytes32 requestId = computeRequestId( + authorizedSendersList[j], + consumers[i], + subscriptionId, + s_consumers[consumers[i]][subscriptionId] + ); + if (s_requestCommitments[requestId].don != address(0)) { + return true; + } + } + } + return false; + } + + /** + * @notice Time out all expired requests: unlocks funds and removes the ability for the request to be fulfilled + * @param requestIdsToTimeout - A list of request IDs to time out + */ + + function timeoutRequests(bytes32[] calldata requestIdsToTimeout) external whenNotPaused { + for (uint256 i = 0; i < requestIdsToTimeout.length; i++) { + bytes32 requestId = requestIdsToTimeout[i]; + Commitment memory commitment = s_requestCommitments[requestId]; + + // Check that the message sender is the subscription owner + if (msg.sender != s_subscriptionConfigs[commitment.subscriptionId].owner) { + revert MustBeSubOwner(s_subscriptionConfigs[commitment.subscriptionId].owner); + } + + if (commitment.timestamp + s_config.requestTimeoutSeconds > block.timestamp) { + // Decrement blocked balance + s_subscriptions[commitment.subscriptionId].blockedBalance -= commitment.estimatedCost; + // Delete commitment + delete s_requestCommitments[requestId]; + emit RequestTimedOut(requestId); + } + } + } + + /** + * @dev The allow list is kept on the Oracle contract. This modifier checks if a user is authorized from there. + */ + modifier onlyAuthorizedUsers() { + if (!ORACLE_WITH_ALLOWLIST.isAuthorizedSender(msg.sender)) { + revert UnauthorizedSender(); + } + _; + } + + modifier onlySubOwner(uint64 subscriptionId) { + address owner = s_subscriptionConfigs[subscriptionId].owner; + if (owner == address(0)) { + revert InvalidSubscription(); + } + if (msg.sender != owner) { + revert MustBeSubOwner(owner); + } + _; + } + + modifier nonReentrant() { + if (s_config.reentrancyLock) { + revert Reentrant(); + } + _; + } + + function _canSetAuthorizedSenders() internal view override onlyOwner returns (bool) { + return true; + } +} diff --git a/contracts/ethereum/src/v1/mock/FunctionsOraclePatched.sol b/contracts/ethereum/src/v1/mock/FunctionsOracle.sol similarity index 98% rename from contracts/ethereum/src/v1/mock/FunctionsOraclePatched.sol rename to contracts/ethereum/src/v1/mock/FunctionsOracle.sol index e3a2a6ca6..b538c96b3 100644 --- a/contracts/ethereum/src/v1/mock/FunctionsOraclePatched.sol +++ b/contracts/ethereum/src/v1/mock/FunctionsOracle.sol @@ -3,14 +3,14 @@ pragma solidity 0.8.18; import "@chainlink/contracts/src/v0.8/dev/interfaces/FunctionsOracleInterface.sol"; import "@chainlink/contracts/src/v0.8/dev/ocr2/OCR2Base.sol"; -import "./AuthorizedOriginReceiver.sol"; +import "@chainlink/contracts/src/v0.8/dev/AuthorizedReceiver.sol"; /** * @title Functions Oracle contract * @notice Contract that nodes of a Decentralized Oracle Network (DON) interact with * @dev THIS CONTRACT HAS NOT GONE THROUGH ANY SECURITY REVIEW. DO NOT USE IN PROD. */ -contract FunctionsOraclePatched is FunctionsOracleInterface, OCR2Base, AuthorizedOriginReceiver { +contract FunctionsOracle is FunctionsOracleInterface, OCR2Base, AuthorizedReceiver { event OracleRequest( bytes32 indexed requestId, address requestingContract, diff --git a/contracts/ethereum/src/v1/mock/FunctionsOracleFactory.sol b/contracts/ethereum/src/v1/mock/FunctionsOracleFactory.sol index ea9e7f9dd..e5f7887b6 100644 --- a/contracts/ethereum/src/v1/mock/FunctionsOracleFactory.sol +++ b/contracts/ethereum/src/v1/mock/FunctionsOracleFactory.sol @@ -1,4 +1,48 @@ // SPDX-License-Identifier: Apache pragma solidity 0.8.18; -import "@chainlink/contracts/src/v0.8/dev/functions/FunctionsOracleFactory.sol"; \ No newline at end of file +import "./FunctionsOracle.sol"; +import "@chainlink/contracts/src/v0.8/interfaces/TypeAndVersionInterface.sol"; + +/** + * @title The Functions Decentralized Oracle Network (Oracle) Factory + * @dev THIS CONTRACT HAS NOT GONE THROUGH ANY SECURITY REVIEW. DO NOT USE IN PROD. + * @notice Creates FunctionsOracle contracts of a specific version + */ +contract FunctionsOracleFactory is TypeAndVersionInterface { + using EnumerableSet for EnumerableSet.AddressSet; + + EnumerableSet.AddressSet private s_created; + + event OracleCreated(address indexed don, address indexed owner, address indexed sender); + + /** + * @notice The type and version of this contract + * @return Type and version string + */ + function typeAndVersion() external pure override returns (string memory) { + return "FunctionsOracleFactory 0.0.0"; + } + + /** + * @notice creates a new Oracle contract with the msg.sender as the proposed owner + * @notice msg.sender will still need to call Oracle.acceptOwnership() + * @return address Address of a newly deployed Oracle + */ + function deployNewOracle() external returns (address) { + FunctionsOracle don = new FunctionsOracle(); + don.transferOwnership(msg.sender); + s_created.add(address(don)); + emit OracleCreated(address(don), msg.sender, msg.sender); + return address(don); + } + + /** + * @notice Verifies whether this factory deployed an address + * @param OracleAddress The Oracle address in question + * @return bool True if an Oracle has been created at that address + */ + function created(address OracleAddress) external view returns (bool) { + return s_created.contains(OracleAddress); + } +} diff --git a/package-lock.json b/package-lock.json index 5db08e74c..8f8354545 100644 --- a/package-lock.json +++ b/package-lock.json @@ -277,7 +277,6 @@ }, "contracts/ethereum": { "name": "@casimir/ethereum", - "hasInstallScript": true, "dependencies": { "@chainlink/contracts": "^0.6.1", "@openzeppelin/contracts": "^4.9.3", @@ -290,7 +289,6 @@ "@nomicfoundation/hardhat-toolbox": "^2.0.2", "@nomiclabs/hardhat-ethers": "^2.0.6", "@openzeppelin/hardhat-upgrades": "^1.28.0", - "@tenderly/hardhat-tenderly": "^1.7.7", "@typechain/ethers-v5": "^10.1.0", "@typechain/hardhat": "^6.1.2", "@types/chai": "^4.3.1", @@ -571,9 +569,9 @@ } }, "node_modules/@aws-cdk/asset-awscli-v1": { - "version": "2.2.200", - "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.200.tgz", - "integrity": "sha512-Kf5J8DfJK4wZFWT2Myca0lhwke7LwHcHBo+4TvWOGJrFVVKVuuiLCkzPPRBQQVDj0Vtn2NBokZAz8pfMpAqAKg==" + "version": "2.2.201", + "resolved": "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.201.tgz", + "integrity": "sha512-INZqcwDinNaIdb5CtW3ez5s943nX5stGBQS6VOP2JDlOFP81hM3fds/9NDknipqfUkZM43dx+HgVvkXYXXARCQ==" }, "node_modules/@aws-cdk/asset-kubectl-v20": { "version": "2.1.2", @@ -689,15 +687,16 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-sdk/client-athena": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-athena/-/client-athena-3.433.0.tgz", - "integrity": "sha512-RRh5CqZLz3Ed8pvP+LHaneHnjjipjVv2qKGV7/asd7Abe79O+ewN6tWFKCmd1EXXv2BWuXd0QCG05/EiPffCaA==", + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-athena/-/client-athena-3.437.0.tgz", + "integrity": "sha512-eFk8eh17LmvvoAF4id09/k3+N1+zQ80UWA8elZwImyHfwMXhwicPbxCdK6ugJ41nlA0y5mGPrFRLsfSazVhlkw==", "peer": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.433.0", - "@aws-sdk/credential-provider-node": "3.433.0", + "@aws-sdk/client-sts": "3.437.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.437.0", "@aws-sdk/middleware-host-header": "3.433.0", "@aws-sdk/middleware-logger": "3.433.0", "@aws-sdk/middleware-recursion-detection": "3.433.0", @@ -707,7 +706,7 @@ "@aws-sdk/types": "3.433.0", "@aws-sdk/util-endpoints": "3.433.0", "@aws-sdk/util-user-agent-browser": "3.433.0", - "@aws-sdk/util-user-agent-node": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", "@smithy/config-resolver": "^2.0.16", "@smithy/fetch-http-handler": "^2.2.4", "@smithy/hash-node": "^2.0.12", @@ -738,14 +737,15 @@ } }, "node_modules/@aws-sdk/client-cognito-identity": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.433.0.tgz", - "integrity": "sha512-42znkBhcLweedtcp+k0Vz4As9FavThrYYGtvuleW82GQqtwyOXSifinXw7xfY2JngqCuCEenFQPsf1hudOWzyw==", + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.437.0.tgz", + "integrity": "sha512-7mI0WT21ru2H6T13J5xNHMIE/dXj1tEeObvwAvUcwQl1J1ZKzFFM/fth3AHX+KACJJ/B5WD+xiTuv62/SXE7AA==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.433.0", - "@aws-sdk/credential-provider-node": "3.433.0", + "@aws-sdk/client-sts": "3.437.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.437.0", "@aws-sdk/middleware-host-header": "3.433.0", "@aws-sdk/middleware-logger": "3.433.0", "@aws-sdk/middleware-recursion-detection": "3.433.0", @@ -755,7 +755,7 @@ "@aws-sdk/types": "3.433.0", "@aws-sdk/util-endpoints": "3.433.0", "@aws-sdk/util-user-agent-browser": "3.433.0", - "@aws-sdk/util-user-agent-node": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", "@smithy/config-resolver": "^2.0.16", "@smithy/fetch-http-handler": "^2.2.4", "@smithy/hash-node": "^2.0.12", @@ -785,14 +785,15 @@ } }, "node_modules/@aws-sdk/client-secrets-manager": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.433.0.tgz", - "integrity": "sha512-dovFUtsl0uJuW3/XywP4jyL6iiT5+/+thGLpXHZbbXf/5188SBJXIfTr9FRyWiCK67XaPAGWdsq+6CCknL9ZZA==", + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.437.0.tgz", + "integrity": "sha512-ZRNdI3yHeAjVA67PpjLSYm0w47fbzy2H5mVT+xfyp/NWGw2HmpA6PP1Ns4p0tU5lMU6AcAUMGABo+MbKae1iDQ==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.433.0", - "@aws-sdk/credential-provider-node": "3.433.0", + "@aws-sdk/client-sts": "3.437.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.437.0", "@aws-sdk/middleware-host-header": "3.433.0", "@aws-sdk/middleware-logger": "3.433.0", "@aws-sdk/middleware-recursion-detection": "3.433.0", @@ -802,7 +803,7 @@ "@aws-sdk/types": "3.433.0", "@aws-sdk/util-endpoints": "3.433.0", "@aws-sdk/util-user-agent-browser": "3.433.0", - "@aws-sdk/util-user-agent-node": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", "@smithy/config-resolver": "^2.0.16", "@smithy/fetch-http-handler": "^2.2.4", "@smithy/hash-node": "^2.0.12", @@ -833,12 +834,13 @@ } }, "node_modules/@aws-sdk/client-sso": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.433.0.tgz", - "integrity": "sha512-L7ksMP7UnYH+w52ly+m+s5vk8662VtyqJ+UduFEMPqKUHTFEm7w+CCw4Xfk3hl5GlVvqPvYWqBqv8eLKSHpCEQ==", + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.437.0.tgz", + "integrity": "sha512-AxlLWz9ec3b8Bt+RqRb2Q1ucGQtKrLdKDna+UTjz7AouB/jpoMiegV9NHXVX64N6YFnQnvB0UEGigXiOQE+y/g==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.436.0", "@aws-sdk/middleware-host-header": "3.433.0", "@aws-sdk/middleware-logger": "3.433.0", "@aws-sdk/middleware-recursion-detection": "3.433.0", @@ -847,7 +849,7 @@ "@aws-sdk/types": "3.433.0", "@aws-sdk/util-endpoints": "3.433.0", "@aws-sdk/util-user-agent-browser": "3.433.0", - "@aws-sdk/util-user-agent-node": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", "@smithy/config-resolver": "^2.0.16", "@smithy/fetch-http-handler": "^2.2.4", "@smithy/hash-node": "^2.0.12", @@ -877,13 +879,14 @@ } }, "node_modules/@aws-sdk/client-sts": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.433.0.tgz", - "integrity": "sha512-hQ+NLIcA1KRJ2qPdrtkJ3fOEVnehLLMlnB/I5mjg9K2UKjuiOufLao6tc5SyW9fseIL9AdX3fjJ8Unhg+y1RWg==", + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.437.0.tgz", + "integrity": "sha512-ilLcrCVwH81UbKNpB9Vax1Fw/mNx2d/bWXkCNXPvrExO+K39VFGS/VijOuSrru2iBq844NlG3uQV8DL/nbiKdA==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/credential-provider-node": "3.433.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.437.0", "@aws-sdk/middleware-host-header": "3.433.0", "@aws-sdk/middleware-logger": "3.433.0", "@aws-sdk/middleware-recursion-detection": "3.433.0", @@ -894,7 +897,7 @@ "@aws-sdk/types": "3.433.0", "@aws-sdk/util-endpoints": "3.433.0", "@aws-sdk/util-user-agent-browser": "3.433.0", - "@aws-sdk/util-user-agent-node": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", "@smithy/config-resolver": "^2.0.16", "@smithy/fetch-http-handler": "^2.2.4", "@smithy/hash-node": "^2.0.12", @@ -924,12 +927,23 @@ "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/core": { + "version": "3.436.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.436.0.tgz", + "integrity": "sha512-vX5/LjXvCejC2XUY6TSg1oozjqK6BvkE75t0ys9dgqyr5PlZyZksMoeAFHUlj0sCjhT3ziWCujP1oiSpPWY9hg==", + "dependencies": { + "@smithy/smithy-client": "^2.1.12" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@aws-sdk/credential-provider-cognito-identity": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.433.0.tgz", - "integrity": "sha512-zBTrVbruYkPY4/YrUNP11mHbuVwGx7lxfo/Hlul7iUFhRbVhd/Xg3EYi6fgdTojEWEhY4SltFwVFUrzVAm8V5g==", + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.437.0.tgz", + "integrity": "sha512-XCIb6yfX9YlEc7Hn4dfSkLny31OMpekA7usFsXEnoOn3geCKC1xFvrpa9LhHbxkMqLTVzWPGji2DGlJAb2xxpw==", "dependencies": { - "@aws-sdk/client-cognito-identity": "3.433.0", + "@aws-sdk/client-cognito-identity": "3.437.0", "@aws-sdk/types": "3.433.0", "@smithy/property-provider": "^2.0.0", "@smithy/types": "^2.4.0", @@ -954,9 +968,9 @@ } }, "node_modules/@aws-sdk/credential-provider-http": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.433.0.tgz", - "integrity": "sha512-HA3Op+tT/EvJnRTzeURFbygNUX5wx5wlD84h4RgWpDa6x3G0lhI1wxCUR5/+qzIpF5vC7E3Q9/yu7ln07RmZlg==", + "version": "3.435.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.435.0.tgz", + "integrity": "sha512-i07YSy3+IrXwAzp3goCMo2OYzAwqRGIWPNMUX5ziFgA1eMlRWNC2slnbqJzax6xHrU8HdpNESAfflnQvUVBqYQ==", "dependencies": { "@aws-sdk/types": "3.433.0", "@smithy/fetch-http-handler": "^2.2.4", @@ -965,6 +979,7 @@ "@smithy/protocol-http": "^3.0.8", "@smithy/smithy-client": "^2.1.12", "@smithy/types": "^2.4.0", + "@smithy/util-stream": "^2.0.17", "tslib": "^2.5.0" }, "engines": { @@ -972,13 +987,13 @@ } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.433.0.tgz", - "integrity": "sha512-T+YhCOORyA4+i4T86FfFCmi/jPsmLOP6GAtScHp/K8XzB9XuVvJSZ+T8SUKeW6/9G9z3Az7dqeBVLcMdC6fFDA==", + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.437.0.tgz", + "integrity": "sha512-UybiJxYPvdwok5OcI9LakaHmaWZBdkX0gY8yU2n7TomYgWOwDJ88MpQgjXUJJ249PH+9/+How5H3vnFp0xJ0uQ==", "dependencies": { "@aws-sdk/credential-provider-env": "3.433.0", "@aws-sdk/credential-provider-process": "3.433.0", - "@aws-sdk/credential-provider-sso": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.437.0", "@aws-sdk/credential-provider-web-identity": "3.433.0", "@aws-sdk/types": "3.433.0", "@smithy/credential-provider-imds": "^2.0.0", @@ -992,14 +1007,14 @@ } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.433.0.tgz", - "integrity": "sha512-uOTBJszqGJIX5SrH2YdN501cv9rW4ghuSkasxI9DL+sVV5YRMd/bwu6I3PphRyK7z4dosDEbJ1xoIuVR/W04HQ==", + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.437.0.tgz", + "integrity": "sha512-FMtgEe/me68xZQsymEpMcw7OuuiHaHx/Tp5EqZP5FC0Yv1yX3qr/ncIWU2zY3a9K0iLERmzQI1g3CMd8r4sy8A==", "dependencies": { "@aws-sdk/credential-provider-env": "3.433.0", - "@aws-sdk/credential-provider-ini": "3.433.0", + "@aws-sdk/credential-provider-ini": "3.437.0", "@aws-sdk/credential-provider-process": "3.433.0", - "@aws-sdk/credential-provider-sso": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.437.0", "@aws-sdk/credential-provider-web-identity": "3.433.0", "@aws-sdk/types": "3.433.0", "@smithy/credential-provider-imds": "^2.0.0", @@ -1028,12 +1043,12 @@ } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.433.0.tgz", - "integrity": "sha512-vuc2X7q/1HUAO/NowfnNMpRDoHw8H2lyZZzUc0lmamy6PDrEFBi/VTm1nStGPuS9egCFrYlkRHsfp50ukYGa5w==", + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.437.0.tgz", + "integrity": "sha512-kijtnyyA6/+ipOef4KACsLDUTFWDZ97DSWKU0hJFyGEfelaon6o7NNVufuVOWrBNyklNWZqvPLuwWWQCxb6fuQ==", "dependencies": { - "@aws-sdk/client-sso": "3.433.0", - "@aws-sdk/token-providers": "3.433.0", + "@aws-sdk/client-sso": "3.437.0", + "@aws-sdk/token-providers": "3.437.0", "@aws-sdk/types": "3.433.0", "@smithy/property-provider": "^2.0.0", "@smithy/shared-ini-file-loader": "^2.0.6", @@ -1059,20 +1074,20 @@ } }, "node_modules/@aws-sdk/credential-providers": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.433.0.tgz", - "integrity": "sha512-GKsdnFiab+uiwUCzEZKRVa0/h2Ov/Lft/69DJQtFqkM+RHT/XXhAOA9noZmCOyta6UlRbj3P5ep28oQOTc1czw==", - "dependencies": { - "@aws-sdk/client-cognito-identity": "3.433.0", - "@aws-sdk/client-sso": "3.433.0", - "@aws-sdk/client-sts": "3.433.0", - "@aws-sdk/credential-provider-cognito-identity": "3.433.0", + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.437.0.tgz", + "integrity": "sha512-aLgwo45dTDxAO2Gtx+9y4CfiEhvvGfWz2M+IMS48dQ2gmp1z+GXMiJv1zBhoidL2AvQMOpkgO0bl+qFlC4Cmmw==", + "dependencies": { + "@aws-sdk/client-cognito-identity": "3.437.0", + "@aws-sdk/client-sso": "3.437.0", + "@aws-sdk/client-sts": "3.437.0", + "@aws-sdk/credential-provider-cognito-identity": "3.437.0", "@aws-sdk/credential-provider-env": "3.433.0", - "@aws-sdk/credential-provider-http": "3.433.0", - "@aws-sdk/credential-provider-ini": "3.433.0", - "@aws-sdk/credential-provider-node": "3.433.0", + "@aws-sdk/credential-provider-http": "3.435.0", + "@aws-sdk/credential-provider-ini": "3.437.0", + "@aws-sdk/credential-provider-node": "3.437.0", "@aws-sdk/credential-provider-process": "3.433.0", - "@aws-sdk/credential-provider-sso": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.437.0", "@aws-sdk/credential-provider-web-identity": "3.433.0", "@aws-sdk/types": "3.433.0", "@smithy/credential-provider-imds": "^2.0.0", @@ -1187,9 +1202,9 @@ } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.433.0.tgz", - "integrity": "sha512-Q6aYVaQKB+CkBLHQQlN8MHVpOzZv9snRfVz7SxIpdbHkRuGEHiLliCY3fg6Sonvu3AKEPERPuHcaC75tnNpOBw==", + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.437.0.tgz", + "integrity": "sha512-nV9qIuG0+6XJb7hWpCC+/K7RoY3PZUWndP8BRQv7PQhhpd8tG/I5Kxb0V83h2XFBXyyjnv0aOHO8ehz3Kfcv2Q==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -1197,10 +1212,11 @@ "@aws-sdk/middleware-logger": "3.433.0", "@aws-sdk/middleware-recursion-detection": "3.433.0", "@aws-sdk/middleware-user-agent": "3.433.0", + "@aws-sdk/region-config-resolver": "3.433.0", "@aws-sdk/types": "3.433.0", "@aws-sdk/util-endpoints": "3.433.0", "@aws-sdk/util-user-agent-browser": "3.433.0", - "@aws-sdk/util-user-agent-node": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", "@smithy/config-resolver": "^2.0.16", "@smithy/fetch-http-handler": "^2.2.4", "@smithy/hash-node": "^2.0.12", @@ -1278,9 +1294,9 @@ } }, "node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.433.0.tgz", - "integrity": "sha512-yT1tO4MbbsUBLl5+S+jVv8wxiAtP5TKjKib9B2KQ2x0OtWWTrIf2o+IZK8va+zQqdV4MVMjezdxdE20hOdB4yQ==", + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.437.0.tgz", + "integrity": "sha512-JVEcvWaniamtYVPem4UthtCNoTBCfFTwYj7Y3CrWZ2Qic4TqrwLkAfaBGtI2TGrhIClVr77uzLI6exqMTN7orA==", "dependencies": { "@aws-sdk/types": "3.433.0", "@smithy/node-config-provider": "^2.1.3", @@ -2560,9 +2576,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.1.tgz", - "integrity": "sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -5023,9 +5039,9 @@ "integrity": "sha512-z0zMCjyhhp4y7XKAcDAi3Vgms4T2PstwBdahiO0+9NaGICQKjynK3wduSRplTgk4LXmoO1yfDGO5RbjKYxtuxA==" }, "node_modules/@openzeppelin/defender-base-client": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/@openzeppelin/defender-base-client/-/defender-base-client-1.49.0.tgz", - "integrity": "sha512-nG2jslaAUbo2ZW9yBStstxTPscAchN/vRdJ16M34whuZRtUp1bccCBVLdv3oiPOdjwFaa1OBXJkheN+eF8alzA==", + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/defender-base-client/-/defender-base-client-1.50.0.tgz", + "integrity": "sha512-V5uJ4t3kr9ex1RrqGH2DwsHuyW7/hl3VK0sSkq3VVbAewtcsW3cdg/UkXd5ITu6mtz76RoYkvUBHtkYUm0nb+w==", "dev": true, "dependencies": { "amazon-cognito-identity-js": "^6.0.1", @@ -6160,71 +6176,6 @@ "node": ">=14.16" } }, - "node_modules/@tenderly/hardhat-tenderly": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/@tenderly/hardhat-tenderly/-/hardhat-tenderly-1.7.7.tgz", - "integrity": "sha512-p/jLzRPpoD7J0LGvUFEQjgniDzmP5AzfTgy41qqzyjhOsW0voe7wZI8lXjadl5MEr7rAXN1iH3VncT13qG6+Zw==", - "dev": true, - "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@nomiclabs/hardhat-ethers": "^2.1.1", - "axios": "^0.27.2", - "ethers": "^5.7.0", - "fs-extra": "^10.1.0", - "hardhat-deploy": "^0.11.14", - "js-yaml": "^4.1.0", - "tenderly": "^0.5.3", - "tslog": "^4.3.1" - }, - "peerDependencies": { - "hardhat": "^2.10.2" - } - }, - "node_modules/@tenderly/hardhat-tenderly/node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - } - }, - "node_modules/@tenderly/hardhat-tenderly/node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@tenderly/hardhat-tenderly/node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@tenderly/hardhat-tenderly/node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/@trezor/analytics": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@trezor/analytics/-/analytics-1.0.8.tgz", @@ -6966,11 +6917,11 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.8.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz", - "integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==", + "version": "20.8.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.9.tgz", + "integrity": "sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg==", "dependencies": { - "undici-types": "~5.25.1" + "undici-types": "~5.26.4" } }, "node_modules/@types/pbkdf2": { @@ -7400,63 +7351,64 @@ } }, "node_modules/@volar/language-core": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-1.10.4.tgz", - "integrity": "sha512-Na69qA6uwVIdA0rHuOc2W3pHtVQQO8hCNim7FOaKNpRJh0oAFnu5r9i7Oopo5C4cnELZkPNjTrbmpcCTiW+CMQ==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-1.10.7.tgz", + "integrity": "sha512-6+WI7HGqWCsKJ/bms4V45WP7eDeoGxDtLjYPrHB7QkIWVkRLIeGPzzBoonZz9kERM+Kld3W89Y+IlICejVAKhA==", "dev": true, "dependencies": { - "@volar/source-map": "1.10.4" + "@volar/source-map": "1.10.7" } }, "node_modules/@volar/source-map": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-1.10.4.tgz", - "integrity": "sha512-RxZdUEL+pV8p+SMqnhVjzy5zpb1QRZTlcwSk4bdcBO7yOu4rtEWqDGahVCEj4CcXour+0yJUMrMczfSCpP9Uxg==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-1.10.7.tgz", + "integrity": "sha512-anA254XO0lmmeu0p/kvgPOCkrVpqNIHWMvEkPX70PSk4ntg0iBzN/f0Kip6deXvibl6v14Q3Z8RihWrZwdZEEQ==", "dev": true, "dependencies": { "muggle-string": "^0.3.1" } }, "node_modules/@volar/typescript": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-1.10.4.tgz", - "integrity": "sha512-BCCUEBASBEMCrz7qmNSi2hBEWYsXD0doaktRKpmmhvb6XntM2sAWYu6gbyK/MluLDgluGLFiFRpWgobgzUqolg==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-1.10.7.tgz", + "integrity": "sha512-2hvA3vjXVUn1vOpsP/nWLnE5DUmY6YKQhvDRoZVfBrnWwIo0ySxdTUP4XieXGGgSk43xJaeU1zqQS/3Wfm7QgA==", "dev": true, "dependencies": { - "@volar/language-core": "1.10.4" + "@volar/language-core": "1.10.7", + "path-browserify": "^1.0.1" } }, "node_modules/@vue/compiler-core": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.6.tgz", - "integrity": "sha512-2JNjemwaNwf+MkkatATVZi7oAH1Hx0B04DdPH3ZoZ8vKC1xZVP7nl4HIsk8XYd3r+/52sqqoz9TWzYc3yE9dqA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.7.tgz", + "integrity": "sha512-pACdY6YnTNVLXsB86YD8OF9ihwpolzhhtdLVHhBL6do/ykr6kKXNYABRtNMGrsQXpEXXyAdwvWWkuTbs4MFtPQ==", "dependencies": { "@babel/parser": "^7.23.0", - "@vue/shared": "3.3.6", + "@vue/shared": "3.3.7", "estree-walker": "^2.0.2", "source-map-js": "^1.0.2" } }, "node_modules/@vue/compiler-dom": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.6.tgz", - "integrity": "sha512-1MxXcJYMHiTPexjLAJUkNs/Tw2eDf2tY3a0rL+LfuWyiKN2s6jvSwywH3PWD8bKICjfebX3GWx2Os8jkRDq3Ng==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.7.tgz", + "integrity": "sha512-0LwkyJjnUPssXv/d1vNJ0PKfBlDoQs7n81CbO6Q0zdL7H1EzqYRrTVXDqdBVqro0aJjo/FOa1qBAPVI4PGSHBw==", "dependencies": { - "@vue/compiler-core": "3.3.6", - "@vue/shared": "3.3.6" + "@vue/compiler-core": "3.3.7", + "@vue/shared": "3.3.7" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.6.tgz", - "integrity": "sha512-/Kms6du2h1VrXFreuZmlvQej8B1zenBqIohP0690IUBkJjsFvJxY0crcvVRJ0UhMgSR9dewB+khdR1DfbpArJA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.7.tgz", + "integrity": "sha512-7pfldWy/J75U/ZyYIXRVqvLRw3vmfxDo2YLMwVtWVNew8Sm8d6wodM+OYFq4ll/UxfqVr0XKiVwti32PCrruAw==", "dependencies": { "@babel/parser": "^7.23.0", - "@vue/compiler-core": "3.3.6", - "@vue/compiler-dom": "3.3.6", - "@vue/compiler-ssr": "3.3.6", - "@vue/reactivity-transform": "3.3.6", - "@vue/shared": "3.3.6", + "@vue/compiler-core": "3.3.7", + "@vue/compiler-dom": "3.3.7", + "@vue/compiler-ssr": "3.3.7", + "@vue/reactivity-transform": "3.3.7", + "@vue/shared": "3.3.7", "estree-walker": "^2.0.2", "magic-string": "^0.30.5", "postcss": "^8.4.31", @@ -7464,12 +7416,12 @@ } }, "node_modules/@vue/compiler-ssr": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.6.tgz", - "integrity": "sha512-QTIHAfDCHhjXlYGkUg5KH7YwYtdUM1vcFl/FxFDlD6d0nXAmnjizka3HITp8DGudzHndv2PjKVS44vqqy0vP4w==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.7.tgz", + "integrity": "sha512-TxOfNVVeH3zgBc82kcUv+emNHo+vKnlRrkv8YvQU5+Y5LJGJwSNzcmLUoxD/dNzv0bhQ/F0s+InlgV0NrApJZg==", "dependencies": { - "@vue/compiler-dom": "3.3.6", - "@vue/shared": "3.3.6" + "@vue/compiler-dom": "3.3.7", + "@vue/shared": "3.3.7" } }, "node_modules/@vue/devtools-api": { @@ -7496,13 +7448,13 @@ } }, "node_modules/@vue/language-core": { - "version": "1.8.20", - "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-1.8.20.tgz", - "integrity": "sha512-vNJaqjCTSrWEr+erSq6Rq0CqDC8MOAwyxirxwK8esOxd+1LmAUJUTG2p7I84Mj1Izy5uHiHQAkRTVR2QxMBY+A==", + "version": "1.8.22", + "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-1.8.22.tgz", + "integrity": "sha512-bsMoJzCrXZqGsxawtUea1cLjUT9dZnDsy5TuZ+l1fxRMzUGQUG9+Ypq4w//CqpWmrx7nIAJpw2JVF/t258miRw==", "dev": true, "dependencies": { - "@volar/language-core": "~1.10.4", - "@volar/source-map": "~1.10.4", + "@volar/language-core": "~1.10.5", + "@volar/source-map": "~1.10.5", "@vue/compiler-dom": "^3.3.0", "@vue/shared": "^3.3.0", "computeds": "^0.0.1", @@ -7544,70 +7496,60 @@ } }, "node_modules/@vue/reactivity": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.6.tgz", - "integrity": "sha512-gtChAumfQz5lSy5jZXfyXbKrIYPf9XEOrIr6rxwVyeWVjFhJwmwPLtV6Yis+M9onzX++I5AVE9j+iPH60U+B8Q==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.7.tgz", + "integrity": "sha512-cZNVjWiw00708WqT0zRpyAgduG79dScKEPYJXq2xj/aMtk3SKvL3FBt2QKUlh6EHBJ1m8RhBY+ikBUzwc7/khg==", "dependencies": { - "@vue/shared": "3.3.6" + "@vue/shared": "3.3.7" } }, "node_modules/@vue/reactivity-transform": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.6.tgz", - "integrity": "sha512-RlJl4dHfeO7EuzU1iJOsrlqWyJfHTkJbvYz/IOJWqu8dlCNWtxWX377WI0VsbAgBizjwD+3ZjdnvSyyFW1YVng==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.7.tgz", + "integrity": "sha512-APhRmLVbgE1VPGtoLQoWBJEaQk4V8JUsqrQihImVqKT+8U6Qi3t5ATcg4Y9wGAPb3kIhetpufyZ1RhwbZCIdDA==", "dependencies": { "@babel/parser": "^7.23.0", - "@vue/compiler-core": "3.3.6", - "@vue/shared": "3.3.6", + "@vue/compiler-core": "3.3.7", + "@vue/shared": "3.3.7", "estree-walker": "^2.0.2", "magic-string": "^0.30.5" } }, "node_modules/@vue/runtime-core": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.6.tgz", - "integrity": "sha512-qp7HTP1iw1UW2ZGJ8L3zpqlngrBKvLsDAcq5lA6JvEXHmpoEmjKju7ahM9W2p/h51h0OT5F2fGlP/gMhHOmbUA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.7.tgz", + "integrity": "sha512-LHq9du3ubLZFdK/BP0Ysy3zhHqRfBn80Uc+T5Hz3maFJBGhci1MafccnL3rpd5/3wVfRHAe6c+PnlO2PAavPTQ==", "dependencies": { - "@vue/reactivity": "3.3.6", - "@vue/shared": "3.3.6" + "@vue/reactivity": "3.3.7", + "@vue/shared": "3.3.7" } }, "node_modules/@vue/runtime-dom": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.6.tgz", - "integrity": "sha512-AoX3Cp8NqMXjLbIG9YR6n/pPLWE9TiDdk6wTJHFnl2GpHzDFH1HLBC9wlqqQ7RlnvN3bVLpzPGAAH00SAtOxHg==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.7.tgz", + "integrity": "sha512-PFQU1oeJxikdDmrfoNQay5nD4tcPNYixUBruZzVX/l0eyZvFKElZUjW4KctCcs52nnpMGO6UDK+jF5oV4GT5Lw==", "dependencies": { - "@vue/runtime-core": "3.3.6", - "@vue/shared": "3.3.6", + "@vue/runtime-core": "3.3.7", + "@vue/shared": "3.3.7", "csstype": "^3.1.2" } }, "node_modules/@vue/server-renderer": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.6.tgz", - "integrity": "sha512-kgLoN43W4ERdZ6dpyy+gnk2ZHtcOaIr5Uc/WUP5DRwutgvluzu2pudsZGoD2b7AEJHByUVMa9k6Sho5lLRCykw==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.7.tgz", + "integrity": "sha512-UlpKDInd1hIZiNuVVVvLgxpfnSouxKQOSE2bOfQpBuGwxRV/JqqTCyyjXUWiwtVMyeRaZhOYYqntxElk8FhBhw==", "dependencies": { - "@vue/compiler-ssr": "3.3.6", - "@vue/shared": "3.3.6" + "@vue/compiler-ssr": "3.3.7", + "@vue/shared": "3.3.7" }, "peerDependencies": { - "vue": "3.3.6" + "vue": "3.3.7" } }, "node_modules/@vue/shared": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.6.tgz", - "integrity": "sha512-Xno5pEqg8SVhomD0kTSmfh30ZEmV/+jZtyh39q6QflrjdJCXah5lrnOLi9KB6a5k5aAHXMXjoMnxlzUkCNfWLQ==" - }, - "node_modules/@vue/typescript": { - "version": "1.8.20", - "resolved": "https://registry.npmjs.org/@vue/typescript/-/typescript-1.8.20.tgz", - "integrity": "sha512-F0XX1wK71Fo9ewtzLSCSo5dfOuwKrSi/dR2AlI00iTJ4Bfk0wq1BNTRgnlvfx4kz/vQovaGXqwpIkif14W9KrA==", - "dev": true, - "dependencies": { - "@volar/typescript": "~1.10.4", - "@vue/language-core": "1.8.20" - } + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.7.tgz", + "integrity": "sha512-N/tbkINRUDExgcPTBvxNkvHGu504k8lzlNQRITVnm6YjOjwa4r0nnbd4Jb01sNpur5hAllyRJzSK5PvB9PPwRg==" }, "node_modules/@vueuse/core": { "version": "10.5.0", @@ -7790,9 +7732,9 @@ } }, "node_modules/@walletconnect/core": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.10.2.tgz", - "integrity": "sha512-JQz/xp3SLEpTeRQctdck2ugSBVEpMxoSE+lFi2voJkZop1hv6P+uqr6E4PzjFluAjeAnKlT1xvra0aFWjPWVcw==", + "version": "2.10.4", + "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.10.4.tgz", + "integrity": "sha512-MGdw5a4dIlQFPxVHEw2neIpHPAw3gtrsJYyUqm6rI+1c1SfmZyOPCaYTr6zPU2cnoWQUjv2ePMLeO/JKy3Yh5g==", "dependencies": { "@walletconnect/heartbeat": "1.2.1", "@walletconnect/jsonrpc-provider": "1.0.13", @@ -7805,8 +7747,8 @@ "@walletconnect/relay-auth": "^1.0.4", "@walletconnect/safe-json": "^1.0.2", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.10.2", - "@walletconnect/utils": "2.10.2", + "@walletconnect/types": "2.10.4", + "@walletconnect/utils": "2.10.4", "events": "^3.3.0", "lodash.isequal": "4.5.0", "uint8arrays": "^3.1.0" @@ -7826,18 +7768,18 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@walletconnect/ethereum-provider": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/@walletconnect/ethereum-provider/-/ethereum-provider-2.10.2.tgz", - "integrity": "sha512-QMYFZ6+rVq2CJLdIPdKK0j1Qm66UA27oQU5V2SrL8EVwl7wFfm0Bq7fnL+qAWeDpn612dNeNErpk/ROa1zWlWg==", + "version": "2.10.4", + "resolved": "https://registry.npmjs.org/@walletconnect/ethereum-provider/-/ethereum-provider-2.10.4.tgz", + "integrity": "sha512-t8Utp3GOk4p1X//tRgLDdTh/+nmb5SwvmrMpfHzcDvYjetqtTWfZcXt2xj7DOsnvwaxi8MPf+0FqlTiZnrnNWQ==", "dependencies": { "@walletconnect/jsonrpc-http-connection": "^1.0.7", "@walletconnect/jsonrpc-provider": "^1.0.13", "@walletconnect/jsonrpc-types": "^1.0.3", "@walletconnect/jsonrpc-utils": "^1.0.8", - "@walletconnect/sign-client": "2.10.2", - "@walletconnect/types": "2.10.2", - "@walletconnect/universal-provider": "2.10.2", - "@walletconnect/utils": "2.10.2", + "@walletconnect/sign-client": "2.10.4", + "@walletconnect/types": "2.10.4", + "@walletconnect/universal-provider": "2.10.4", + "@walletconnect/utils": "2.10.4", "events": "^3.3.0" }, "peerDependencies": { @@ -8089,18 +8031,18 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@walletconnect/sign-client": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.10.2.tgz", - "integrity": "sha512-vviSLV3f92I0bReX+OLr1HmbH0uIzYEQQFd1MzIfDk9PkfFT/LLAHhUnDaIAMkIdippqDcJia+5QEtT4JihL3Q==", + "version": "2.10.4", + "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.10.4.tgz", + "integrity": "sha512-C5VHkK59/DQNrJS91UXLn5OSr0drXHkKjajhl2a9hb3h6kxuSdlWbyC0yRPKT1sD0fQho8+EWZHBiV063yBePw==", "dependencies": { - "@walletconnect/core": "2.10.2", + "@walletconnect/core": "2.10.4", "@walletconnect/events": "^1.0.1", "@walletconnect/heartbeat": "1.2.1", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/logger": "^2.0.1", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.10.2", - "@walletconnect/utils": "2.10.2", + "@walletconnect/types": "2.10.4", + "@walletconnect/utils": "2.10.4", "events": "^3.3.0" } }, @@ -8118,9 +8060,9 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@walletconnect/types": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.10.2.tgz", - "integrity": "sha512-luNV+07Wdla4STi9AejseCQY31tzWKQ5a7C3zZZaRK/di+rFaAAb7YW04OP4klE7tw/mJRGPTlekZElmHxO8kQ==", + "version": "2.10.4", + "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.10.4.tgz", + "integrity": "sha512-eQpOElyiwJp3tepuOS3TS9dXTl9jVVlrC3iVA8bytnbLagkAUxmiv/s7PyDFx+ndXwQVh8PFBkWg1oxGwgCSBA==", "dependencies": { "@walletconnect/events": "^1.0.1", "@walletconnect/heartbeat": "1.2.1", @@ -8131,25 +8073,25 @@ } }, "node_modules/@walletconnect/universal-provider": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.10.2.tgz", - "integrity": "sha512-wFgI0LbQ3D56sgaUMsgOHCM5m8WLxiC71BGuCKQfApgsbNMVKugYVy2zWHyUyi8sqTQHI+uSaVpDev4UHq9LEw==", + "version": "2.10.4", + "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.10.4.tgz", + "integrity": "sha512-f9uhRQX9iExoMz1V4JT13OpqvpoJYhE9GLvuwNWposhDS35vVKfQfmPxQCcsdw7IpMr+UdpA8K2ShPh8g9wT4g==", "dependencies": { "@walletconnect/jsonrpc-http-connection": "^1.0.7", "@walletconnect/jsonrpc-provider": "1.0.13", "@walletconnect/jsonrpc-types": "^1.0.2", "@walletconnect/jsonrpc-utils": "^1.0.7", "@walletconnect/logger": "^2.0.1", - "@walletconnect/sign-client": "2.10.2", - "@walletconnect/types": "2.10.2", - "@walletconnect/utils": "2.10.2", + "@walletconnect/sign-client": "2.10.4", + "@walletconnect/types": "2.10.4", + "@walletconnect/utils": "2.10.4", "events": "^3.3.0" } }, "node_modules/@walletconnect/utils": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.10.2.tgz", - "integrity": "sha512-syxXRpc2yhSknMu3IfiBGobxOY7fLfLTJuw+ppKaeO6WUdZpIit3wfuGOcc0Ms3ZPFCrGfyGOoZsCvgdXtptRg==", + "version": "2.10.4", + "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.10.4.tgz", + "integrity": "sha512-XbrKgnQ0hC9DC9wjFb468MEYMoJxnCVmOj2gi01DA4FSr8fJi7wwNRUnlnZzLWrUWrHuaPReYe4PgBAgIv363g==", "dependencies": { "@stablelib/chacha20poly1305": "1.0.1", "@stablelib/hkdf": "1.0.1", @@ -8159,7 +8101,7 @@ "@walletconnect/relay-api": "^1.0.9", "@walletconnect/safe-json": "^1.0.2", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.10.2", + "@walletconnect/types": "2.10.4", "@walletconnect/window-getters": "^1.0.1", "@walletconnect/window-metadata": "^1.0.1", "detect-browser": "5.3.0", @@ -8315,9 +8257,9 @@ } }, "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", "bin": { "acorn": "bin/acorn" }, @@ -8335,9 +8277,9 @@ } }, "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz", + "integrity": "sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==", "engines": { "node": ">=0.4.0" } @@ -8761,8 +8703,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -8868,9 +8808,9 @@ } }, "node_modules/aws-cdk": { - "version": "2.102.0", - "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.102.0.tgz", - "integrity": "sha512-q+FQSeX/25QvZ1/Fxjr7GydMY/WR/+iTif2EiaN7rUlEEZx27o0I5k1p9YmTNUGiBl13ZvggIJjwTRmnL7E/lg==", + "version": "2.103.1", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.103.1.tgz", + "integrity": "sha512-5DXPlMi8Gf/a6fMqwY6uVwuR21PDDNGkAGkMVTTuaiulc4RsMjQUGq8I4xaPIYQRvR+VHFU+JQ5j5PnI5/gBrA==", "dev": true, "bin": { "cdk": "bin/cdk" @@ -9236,9 +9176,9 @@ "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" }, "node_modules/axios": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", - "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -9364,8 +9304,7 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/base-x": { "version": "3.0.9", @@ -9842,7 +9781,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -10226,9 +10164,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001553", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001553.tgz", - "integrity": "sha512-N0ttd6TrFfuqKNi+pMgWJTb9qrdJu4JSpgPFLe/lrD19ugC6fZgF0pUewRowDwzdDnb9V41mFcdlYgl/PyKf4A==", + "version": "1.0.30001555", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001555.tgz", + "integrity": "sha512-NzbUFKUnJ3DTcq6YyZB6+qqhfD112uR3uoEnkmfzm2wVzUNsFkU7AwBjKQ654Sp5cau0JxhFyRSn/tQZ+XfygA==", "dev": true, "funding": [ { @@ -10258,7 +10196,6 @@ "version": "1.6.3", "resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz", "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==", - "dev": true, "engines": { "node": ">= 0.8.0" } @@ -11016,8 +10953,7 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/concat-stream": { "version": "1.6.2", @@ -11316,9 +11252,9 @@ } }, "node_modules/crypto-js": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", - "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" }, "node_modules/crypto-random-string": { "version": "4.0.0", @@ -12653,9 +12589,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.564", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.564.tgz", - "integrity": "sha512-bGAx9+teIzL5I4esQwCMtiXtb78Ysc8xOKTPOvmafbJZ4SQ40kDO1ym3yRcGSkfaBtV81fGgHOgPoe6DsmpmkA==", + "version": "1.4.569", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.569.tgz", + "integrity": "sha512-LsrJjZ0IbVy12ApW3gpYpcmHS3iRxH4bkKOW98y1/D+3cvDUWGcbzbsFinfUS8knpcZk/PG/2p/RnkMCYN7PVg==", "dev": true }, "node_modules/elkjs": { @@ -14561,15 +14497,6 @@ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, - "node_modules/fmix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/fmix/-/fmix-0.1.0.tgz", - "integrity": "sha512-Y6hyofImk9JdzU8k5INtTXX1cu8LDlePWDFU5sftm9H+zKCr5SGrVjdhkvsim646cw5zD0nADj8oHyXMZmCZ9w==", - "dev": true, - "dependencies": { - "imul": "^1.0.0" - } - }, "node_modules/focus-trap": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.4.tgz", @@ -14701,7 +14628,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, "dependencies": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", @@ -15338,9 +15264,9 @@ } }, "node_modules/hardhat": { - "version": "2.18.2", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.18.2.tgz", - "integrity": "sha512-lUVmJg7DsKcUCDpqv57CJl6vHqo/1PeHSfM3+WIa8UtRKmXyVTj1qQK01TDiuetkZBVg9Dn52qU+ZwaJQynaKA==", + "version": "2.18.3", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.18.3.tgz", + "integrity": "sha512-JuYaTG+4ZHVjEHCW5Hn6jCHH3LpO75dtgznZpM/dLv12RcSlw/xHbeQh3FAsGahQr1epKryZcZEMHvztVZHe0g==", "dev": true, "dependencies": { "@ethersproject/abi": "^5.1.2", @@ -15438,82 +15364,6 @@ "hardhat": "^2.0.0" } }, - "node_modules/hardhat-deploy": { - "version": "0.11.43", - "resolved": "https://registry.npmjs.org/hardhat-deploy/-/hardhat-deploy-0.11.43.tgz", - "integrity": "sha512-D760CjDtinwjOCpKOvdyRtIJYLQIYXmhfgkFe+AkxlYM9bPZ/T4tZ/xIB2tR89ZT+z0hF1YuZFBXIL3/G/9T5g==", - "dev": true, - "dependencies": { - "@ethersproject/abi": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/contracts": "^5.7.0", - "@ethersproject/providers": "^5.7.2", - "@ethersproject/solidity": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/wallet": "^5.7.0", - "@types/qs": "^6.9.7", - "axios": "^0.21.1", - "chalk": "^4.1.2", - "chokidar": "^3.5.2", - "debug": "^4.3.2", - "enquirer": "^2.3.6", - "ethers": "^5.7.0", - "form-data": "^4.0.0", - "fs-extra": "^10.0.0", - "match-all": "^1.2.6", - "murmur-128": "^0.2.1", - "qs": "^6.9.4", - "zksync-web3": "^0.14.3" - } - }, - "node_modules/hardhat-deploy/node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, - "node_modules/hardhat-deploy/node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/hardhat-deploy/node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/hardhat-deploy/node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/hardhat-gas-reporter": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz", @@ -16092,15 +15942,6 @@ "url": "https://github.com/sponsors/typicode" } }, - "node_modules/hyperlinker": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hyperlinker/-/hyperlinker-1.0.0.tgz", - "integrity": "sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/iconoir": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/iconoir/-/iconoir-5.5.2.tgz", @@ -16159,7 +16000,6 @@ "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, "engines": { "node": ">= 4" } @@ -16213,15 +16053,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/imul": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/imul/-/imul-1.0.1.tgz", - "integrity": "sha512-WFAgfwPLAjU66EKt6vRdTlKj4nAgIDQzh29JonLa4Bqtl6D8JrIMvWjCnx7xEjVNmP3U0fM5o8ZObk7d0f62bA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -17916,8 +17747,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", - "dev": true, - "peer": true, "engines": { "node": "*" } @@ -18195,9 +18024,9 @@ } }, "node_modules/libphonenumber-js": { - "version": "1.10.48", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.48.tgz", - "integrity": "sha512-Vvcgt4+o8+puIBJZLdMshPYx9nRN3/kTT7HPtOyfYrSQuN9PGBF1KUv0g07fjNzt4E4GuA7FnsLb+WeAMzyRQg==" + "version": "1.10.49", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.49.tgz", + "integrity": "sha512-gvLtyC3tIuqfPzjvYLH9BmVdqzGDiSi4VjtWe2fAgSdBf0yt8yPmbNnRIHNbR5IdtVkm0ayGuzwQKTWmU0hdjQ==" }, "node_modules/lilconfig": { "version": "2.1.0", @@ -18651,9 +18480,7 @@ "node_modules/lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true, - "peer": true + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==" }, "node_modules/lodash.uniqby": { "version": "4.7.0", @@ -18932,12 +18759,6 @@ "dev": true, "peer": true }, - "node_modules/match-all": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/match-all/-/match-all-1.2.6.tgz", - "integrity": "sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ==", - "dev": true - }, "node_modules/mathjax-full": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/mathjax-full/-/mathjax-full-3.2.2.tgz", @@ -19075,9 +18896,9 @@ "integrity": "sha512-XrNQvUbn1DL5hKNe46Ccs+Tu3/PYOlrcZILuGUhb95oKBPjc/nmIC8D462PQkipVDGKRvwhn+QFg2cCdIvmDJA==" }, "node_modules/mermaid": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.5.1.tgz", - "integrity": "sha512-+4mkGW5PptHDSae4YZ/Jw1pEOf0irrB/aCL6BwZcJPhr5+84UJBrQnHTvyPqCUz67tXkrDvSzWv4B+J2hLO78g==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.6.0.tgz", + "integrity": "sha512-Hcti+Q2NiWnb2ZCijSX89Bn2i7TCUwosBdIn/d+u63Sz7y40XU6EKMctT4UX4qZuZGfKGZpfOeim2/KTrdR7aQ==", "dev": true, "dependencies": { "@braintree/sanitize-url": "^6.0.1", @@ -19661,7 +19482,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -19687,9 +19507,9 @@ } }, "node_modules/minisearch": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/minisearch/-/minisearch-6.1.0.tgz", - "integrity": "sha512-PNxA/X8pWk+TiqPbsoIYH0GQ5Di7m6326/lwU/S4mlo4wGQddIcf/V//1f9TB0V4j59b57b+HZxt8h3iMROGvg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/minisearch/-/minisearch-6.2.0.tgz", + "integrity": "sha512-BECkorDF1TY2rGKt9XHdSeP9TP29yUbrAaCh/C03wpyf1vx3uYcP/+8XlMcpTkgoU0rBVnHMAOaP83Rc9Tm+TQ==", "dev": true }, "node_modules/minizlib": { @@ -20012,17 +19832,6 @@ "buffer": "^5.5.0" } }, - "node_modules/murmur-128": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/murmur-128/-/murmur-128-0.2.1.tgz", - "integrity": "sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg==", - "dev": true, - "dependencies": { - "encode-utf8": "^1.0.2", - "fmix": "^0.1.0", - "imul": "^1.0.0" - } - }, "node_modules/mute-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", @@ -20803,6 +20612,12 @@ "node": ">= 0.8" } }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -22615,7 +22430,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -23108,9 +22922,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sass": { - "version": "1.69.4", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.4.tgz", - "integrity": "sha512-+qEreVhqAy8o++aQfCJwp0sklr2xyEzkm9Pp/Igu9wNPoe7EZEQ8X/MBvvXggI2ql607cxKg/RKOwDj6pp2XDA==", + "version": "1.69.5", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz", + "integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==", "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -24899,8 +24713,6 @@ "version": "6.8.1", "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", - "dev": true, - "peer": true, "dependencies": { "ajv": "^8.0.1", "lodash.truncate": "^4.4.2", @@ -24949,8 +24761,6 @@ "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -24966,8 +24776,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -24975,16 +24783,12 @@ "node_modules/table/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "peer": true + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/table/node_modules/slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "peer": true, "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -24998,9 +24802,9 @@ } }, "node_modules/tailwindcss": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz", - "integrity": "sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz", + "integrity": "sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==", "dev": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", @@ -25008,10 +24812,10 @@ "chokidar": "^3.5.3", "didyoumean": "^1.2.2", "dlv": "^1.1.3", - "fast-glob": "^3.2.12", + "fast-glob": "^3.3.0", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", - "jiti": "^1.18.2", + "jiti": "^1.19.1", "lilconfig": "^2.1.0", "micromatch": "^4.0.5", "normalize-path": "^3.0.0", @@ -25051,95 +24855,6 @@ "node": ">=4.5" } }, - "node_modules/tenderly": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/tenderly/-/tenderly-0.5.3.tgz", - "integrity": "sha512-sR+sbZKZzt3b2+moXJsrkBvbava1/4mGulIfuZw8bwr2OpCH8N00dME1t89JC8RjVnQjy4VewVFHyWANdn5zYQ==", - "dev": true, - "dependencies": { - "axios": "^0.27.2", - "cli-table3": "^0.6.2", - "commander": "^9.4.0", - "express": "^4.18.1", - "hyperlinker": "^1.0.0", - "js-yaml": "^4.1.0", - "open": "^8.4.0", - "prompts": "^2.4.2", - "tslog": "^4.4.0" - }, - "peerDependencies": { - "ts-node": "*", - "typescript": "*" - }, - "peerDependenciesMeta": { - "ts-node": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, - "node_modules/tenderly/node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" - } - }, - "node_modules/tenderly/node_modules/commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", - "dev": true, - "engines": { - "node": "^12.20.0 || >=14" - } - }, - "node_modules/tenderly/node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/tenderly/node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/tenderly/node_modules/open": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", - "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", - "dev": true, - "dependencies": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -25530,18 +25245,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, - "node_modules/tslog": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/tslog/-/tslog-4.9.2.tgz", - "integrity": "sha512-wBM+LRJoNl34Bdu8mYEFxpvmOUedpNUwMNQB/NcuPIZKwdDde6xLHUev3bBjXQU7gdurX++X/YE7gLH8eXYsiQ==", - "dev": true, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/fullstack-build/tslog?sponsor=1" - } - }, "node_modules/tsort": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", @@ -25931,9 +25634,9 @@ } }, "node_modules/ua-parser-js": { - "version": "1.0.36", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.36.tgz", - "integrity": "sha512-znuyCIXzl8ciS3+y3fHJI/2OhQIXbXw9MWC/o3qwyR+RGppjZHrM27CGFSKCJXi2Kctiz537iOu2KnXs1lMQhw==", + "version": "1.0.37", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz", + "integrity": "sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==", "funding": [ { "type": "opencollective", @@ -26000,9 +25703,9 @@ } }, "node_modules/undici": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.5.tgz", - "integrity": "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.27.0.tgz", + "integrity": "sha512-l3ydWhlhOJzMVOYkymLykcRRXqbUaQriERtR70B9LzNkZ4bX52Fc8wbTDneMiwo8T+AemZXvXaTx+9o5ROxrXg==", "dev": true, "dependencies": { "@fastify/busboy": "^2.0.0" @@ -26012,9 +25715,9 @@ } }, "node_modules/undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==" + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, "node_modules/unfetch": { "version": "4.2.0", @@ -26592,14 +26295,15 @@ } }, "node_modules/vitepress": { - "version": "1.0.0-rc.23", - "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-rc.23.tgz", - "integrity": "sha512-0YoBt8aFgbRt2JtYaCeTqq4W21q5lbGso+g1ZwkYYS35ExJxORssRJunhFuUcby8QeN4BP/88QDgsVSIVLAfXQ==", + "version": "1.0.0-rc.24", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-rc.24.tgz", + "integrity": "sha512-RpnL8cnOGwiRlBbrYQUm9sYkJbtyOt/wYXk2diTcokY4yvks/5lq9LuSt+MURWB6ZqwpSNHvTmxgaSfLoG0/OA==", "dev": true, "dependencies": { "@docsearch/css": "^3.5.2", "@docsearch/js": "^3.5.2", "@types/markdown-it": "^13.0.4", + "@vitejs/plugin-vue": "4.3.1", "@vue/devtools-api": "^6.5.1", "@vueuse/core": "^10.5.0", "@vueuse/integrations": "^10.5.0", @@ -26649,6 +26353,19 @@ "@types/mdurl": "*" } }, + "node_modules/vitepress/node_modules/@vitejs/plugin-vue": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-4.3.1.tgz", + "integrity": "sha512-tUBEtWcF7wFtII7ayNiLNDTCE1X1afySEo+XNVMNkFXaThENyCowIEX095QqbJZGTgoOcSVDJGlnde2NG4jtbQ==", + "dev": true, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.0.0", + "vue": "^3.2.25" + } + }, "node_modules/vitest": { "version": "0.25.8", "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.25.8.tgz", @@ -26733,15 +26450,15 @@ "dev": true }, "node_modules/vue": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.6.tgz", - "integrity": "sha512-jJIDETeWJnoY+gfn4ZtMPMS5KtbP4ax+CT4dcQFhTnWEk8xMupFyQ0JxL28nvT/M4+p4a0ptxaV2WY0LiIxvRg==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.7.tgz", + "integrity": "sha512-YEMDia1ZTv1TeBbnu6VybatmSteGOS3A3YgfINOfraCbf85wdKHzscD6HSS/vB4GAtI7sa1XPX7HcQaJ1l24zA==", "dependencies": { - "@vue/compiler-dom": "3.3.6", - "@vue/compiler-sfc": "3.3.6", - "@vue/runtime-dom": "3.3.6", - "@vue/server-renderer": "3.3.6", - "@vue/shared": "3.3.6" + "@vue/compiler-dom": "3.3.7", + "@vue/compiler-sfc": "3.3.7", + "@vue/runtime-dom": "3.3.7", + "@vue/server-renderer": "3.3.7", + "@vue/shared": "3.3.7" }, "peerDependencies": { "typescript": "*" @@ -26835,13 +26552,13 @@ } }, "node_modules/vue-tsc": { - "version": "1.8.20", - "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-1.8.20.tgz", - "integrity": "sha512-bIADlyxJl+1ZWQQHAi47NZoi2iTiw/lBwQLL98wXROcQlUuGVtyroAIiqvto9pJotcyhtU0JbGvsHN6JN0fYfg==", + "version": "1.8.22", + "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-1.8.22.tgz", + "integrity": "sha512-j9P4kHtW6eEE08aS5McFZE/ivmipXy0JzrnTgbomfABMaVKx37kNBw//irL3+LlE3kOo63XpnRigyPC3w7+z+A==", "dev": true, "dependencies": { - "@vue/language-core": "1.8.20", - "@vue/typescript": "1.8.20", + "@volar/typescript": "~1.10.5", + "@vue/language-core": "1.8.22", "semver": "^7.5.4" }, "bin": { @@ -28014,7 +27731,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", - "dev": true, "engines": { "node": ">= 14" } @@ -28111,15 +27827,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/zksync-web3": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/zksync-web3/-/zksync-web3-0.14.3.tgz", - "integrity": "sha512-hT72th4AnqyLW1d5Jlv8N2B/qhEnl2NePK2A3org7tAa24niem/UAaHMkEvmWI3SF9waYUPtqAtjpf+yvQ9zvQ==", - "dev": true, - "peerDependencies": { - "ethers": "^5.7.0" - } - }, "node_modules/zx": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/zx/-/zx-7.2.3.tgz", @@ -28150,10 +27857,13 @@ } }, "node_modules/zx/node_modules/@types/node": { - "version": "18.18.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.6.tgz", - "integrity": "sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==", - "dev": true + "version": "18.18.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.7.tgz", + "integrity": "sha512-bw+lEsxis6eqJYW8Ql6+yTqkE6RuFtsQPSe5JxXbqYRFQEER5aJA9a5UH9igqDWm3X4iLHIKOHlnAXLM4mi7uQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/zx/node_modules/chalk": { "version": "5.3.0", diff --git a/scripts/ethereum/upgrade.ts b/scripts/ethereum/upgrade.ts index 941af397c..f3ec37f3d 100644 --- a/scripts/ethereum/upgrade.ts +++ b/scripts/ethereum/upgrade.ts @@ -20,5 +20,8 @@ void async function () { console.log(`Using ${networkName} network from ${process.env.ETHEREUM_RPC_URL}`) - run(`npm run upgrade --workspace @casimir/ethereum -- --network ${networkName}`) + run(`npm run upgrade:proxies --workspace @casimir/ethereum -- --network ${networkName}`) + + // Instead to upgrade all contracts including mocks and libraries + // run(`npm run upgrade:all --workspace @casimir/ethereum -- --network ${networkName}`) }() \ No newline at end of file diff --git a/services/oracle/src/providers/handlers.ts b/services/oracle/src/providers/handlers.ts index d7c73e36f..9450b0dde 100644 --- a/services/oracle/src/providers/handlers.ts +++ b/services/oracle/src/providers/handlers.ts @@ -53,7 +53,7 @@ export async function depositFunctionsBalanceHandler(input: HandlerInput) { }) const feeAmount = ethers.utils.parseEther((refundBalance * price).toPrecision(9)) - const minTokenAmount = ethers.utils.parseEther((refundBalance * 0.99).toPrecision(9)) + const minTokenAmount = ethers.utils.parseEther((refundBalance * 0.9).toPrecision(9)) const depositFunctionsBalance = await manager.connect(signer).depositFunctionsBalance( feeAmount, @@ -73,8 +73,8 @@ export async function depositUpkeepBalanceHandler(input: HandlerInput) { const manager = new ethers.Contract(managerAddress, ICasimirManagerAbi, signer) as ethers.Contract & CasimirManager const keeperRegistry = new ethers.Contract(config.keeperRegistryAddress, IAutomationRegistryAbi, provider) as ethers.Contract & IAutomationRegistry - const minimumBalance = 0.2 - const refundBalance = 5 + const minimumBalance = 6.5 + const refundBalance = 13 const upkeepId = await manager.upkeepId() let balance = 0 if (upkeepId.gt(0)) { @@ -98,7 +98,7 @@ export async function depositUpkeepBalanceHandler(input: HandlerInput) { }) const feeAmount = ethers.utils.parseEther((refundBalance * price).toPrecision(9)) - const minTokenAmount = ethers.utils.parseEther((refundBalance * 0.99).toPrecision(9)) + const minTokenAmount = ethers.utils.parseEther((refundBalance * 0.9).toPrecision(9)) const depositUpkeepBalance = await manager.connect(signer).depositUpkeepBalance( feeAmount,