diff --git a/deployments/534352/deployments.json b/deployments/534352/deployments.json index ed6c7c7..73e90c5 100644 --- a/deployments/534352/deployments.json +++ b/deployments/534352/deployments.json @@ -1,26 +1,26 @@ { "addresses": { - "cashDataProviderImpl": "0x3c73ac2A698F7b264A8a8b78a8022710aBB787cA", - "cashDataProviderProxy": "0x04238598eFFE31AB66F1fdeCbfBd59aa4117D69A", + "cashDataProviderImpl": "0xCeBbe0A1A9F880ABD5C51939980283E61719EB58", + "cashDataProviderProxy": "0x1c802B34691419a57212e68303783eaDbD8031bb", "debtManagerAdminImpl": "0x0000000000000000000000000000000000000000", "debtManagerCore": "0x0000000000000000000000000000000000000000", "debtManagerInitializer": "0x0000000000000000000000000000000000000000", "debtManagerProxy": "0x0000000000000000000000000000000000000000", "etherFiWallet": "0x7D829d50aAF400B8B29B3b311F4aD70aD819DC6E", "owner": "0x7D829d50aAF400B8B29B3b311F4aD70aD819DC6E", - "priceProvider": "0x38ea1a441Ab0328b164BD1CED4e9635AbF44b890", + "priceProvider": "0xE49d39598d0689a62929E15E94551932cC6ef6fc", "recoverySigner1": "0x7fEd99d0aA90423de55e238Eb5F9416FF7Cc58eF", "recoverySigner2": "0x24e311DA50784Cf9DB1abE59725e4A1A110220FA", - "settlementDispatcherImpl": "0xa276232f6A87bFc9C657ec0A679d9218E0D552b6", - "settlementDispatcherProxy": "0x395a6F029D018F1A52E42220a293215b73914dF9", - "swapper": "0x00B09BcE1eb66f414F4C5caAffA9cc61b4f95dA4", + "settlementDispatcherImpl": "0xB2012d7d1ddCe38F5482551f1879D83C18EA6398", + "settlementDispatcherProxy": "0xbb22B1fa06c33F5fd493a6990D57c10717D9EEC4", + "swapper": "0x60C81f0eF6FDc11D702D178c9b03c9D383Eb0AEA", "usdc": "0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4", - "userSafeCoreImpl": "0x07aCE651BA09318C6DfEeFc56066585780f62F18", - "userSafeEventEmitterImpl": "0xB48F11E55dC6EFF03f1e2DB5796fe118C527E67A", - "userSafeEventEmitterProxy": "0x0848D817157Bfe0e4d5625EB5E2cA0D3b83053FE", - "userSafeFactoryImpl": "0x8B4922B20bB259c3fB9273796622aa5DAfd641f6", - "userSafeFactoryProxy": "0x0c0B2Dfe0790790Af395dE23712e45e4C13fec57", - "userSafeSettersImpl": "0x83D75Ca3740Fd2d0f0Cdc9B97Ba1075aA45Adf38", + "userSafeCoreImpl": "0xA2c049d81Fc6a048D6EF005A947994A1fB9E1c7A", + "userSafeEventEmitterImpl": "0x7c8dCAA8C5733C373883458b6a1059943F8A2002", + "userSafeEventEmitterProxy": "0x1a329FaE0ab264328B3c07Eb7218775923E6fFAa", + "userSafeFactoryImpl": "0x9Cb88EfE476d3133B7ad48C4e5f625aCD812764b", + "userSafeFactoryProxy": "0x9ec8CaCc5f08AbDab75a430732dBCFD9b1b0a029", + "userSafeSettersImpl": "0x74c18bDe147074565853426D47BB410a39E0B3a8", "weETH": "0x01f0a31698C4d065659b9bdC21B3610292a1c506", "wrappedERC20Impl": "0x0000000000000000000000000000000000000000", "wrapperTokenFactory": "0x0000000000000000000000000000000000000000" diff --git a/script/user-safe/DeployUserSafe.s.sol b/script/user-safe/DeployUserSafe.s.sol index b4e09f3..7e5fe98 100644 --- a/script/user-safe/DeployUserSafe.s.sol +++ b/script/user-safe/DeployUserSafe.s.sol @@ -15,9 +15,6 @@ contract DeployUserSafe is Utils { uint256 collateralLimit = 10000e6; int256 timezoneOffset = 4 * 3600; // Dubai Timezone address ownerEoa; - address recoverySigner1 = 0x7fEd99d0aA90423de55e238Eb5F9416FF7Cc58eF; - address recoverySigner2 = 0x24e311DA50784Cf9DB1abE59725e4A1A110220FA; - function run() public { // Pulling deployer info from the environment @@ -51,8 +48,6 @@ contract DeployUserSafe is Utils { abi.encodeWithSelector( UserSafeCore.initialize.selector, cashDataProvider, - recoverySigner1, - recoverySigner2, abi.encode(ownerEoa), defaultDailySpendingLimit, defaultMonthlySpendingLimit, diff --git a/script/user-safe/MockSetup.s.sol b/script/user-safe/MockSetup.s.sol index d8db7e8..ca855d9 100644 --- a/script/user-safe/MockSetup.s.sol +++ b/script/user-safe/MockSetup.s.sol @@ -128,7 +128,7 @@ contract DeployMockUserSafeSetup is Utils { ) )); - CashDataProvider(address(cashDataProvider)).initialize( + CashDataProvider(address(cashDataProvider)).initialize(abi.encode( owner, uint64(delay), etherFiWallet, @@ -138,8 +138,10 @@ contract DeployMockUserSafeSetup is Utils { address(swapper), address(aaveAdapter), address(userSafeFactory), - address(userSafeEventEmitter) - ); + address(userSafeEventEmitter), + recoverySigner1, + recoverySigner2 + )); DebtManagerInitializer(address(debtManager)).initialize( owner, diff --git a/script/user-safe/Setup.s.sol b/script/user-safe/Setup.s.sol index c1b7957..bca677f 100644 --- a/script/user-safe/Setup.s.sol +++ b/script/user-safe/Setup.s.sol @@ -220,7 +220,7 @@ contract DeployUserSafeSetup is Utils { } function initializeCashDataProvider() internal { - CashDataProvider(address(cashDataProvider)).initialize( + CashDataProvider(address(cashDataProvider)).initialize(abi.encode( owner, uint64(delay), etherFiWallet, @@ -230,8 +230,10 @@ contract DeployUserSafeSetup is Utils { address(swapper), address(aaveV3Adapter), address(userSafeFactory), - address(userSafeEventEmitter) - ); + address(userSafeEventEmitter), + recoverySigner1, + recoverySigner2 + )); } function initializeDebtManager( diff --git a/src/interfaces/ICashDataProvider.sol b/src/interfaces/ICashDataProvider.sol index 3e21006..62081ce 100644 --- a/src/interfaces/ICashDataProvider.sol +++ b/src/interfaces/ICashDataProvider.sol @@ -13,10 +13,11 @@ interface ICashDataProvider { address newPriceProvider ); event SwapperUpdated(address oldSwapper, address newSwapper); - event EtherFiRecoverySafeUpdated(address oldSafe, address newSafe); event AaveAdapterUpdated(address oldAdapter, address newAdapter); event UserSafeFactoryUpdated(address oldFactory, address newFactory); event UserSafeEventEmitterUpdated(address oldEventEmitter, address newEventEmitter); + event EtherFiRecoverySignerUpdated(address oldSigner, address newSigner); + event ThirdPartyRecoverySignerUpdated(address oldSigner, address newSigner); event UserSafeWhitelisted(address userSafe); event EtherFiWalletAdded(address wallet); event EtherFiWalletRemoved(address wallet); @@ -25,6 +26,7 @@ interface ICashDataProvider { error OnlyUserSafeFactory(); error AlreadyAWhitelistedEtherFiWallet(); error NotAWhitelistedEtherFiWallet(); + error RecoverySignersCannotBeSame(); /** * @notice Function to fetch the timelock delay for tokens from User Safe @@ -81,6 +83,18 @@ interface ICashDataProvider { */ function userSafeEventEmitter() external view returns (address); + /** + * @notice Function to fetch the address of the EtherFi recovery signerr + * @return Address of the EtherFi recovery signer + */ + function etherFiRecoverySigner() external view returns (address); + + /** + * @notice Function to fetch the address of the third party recovery signerr + * @return Address of the third party recovery signer + */ + function thirdPartyRecoverySigner() external view returns (address); + /** * @notice Function to check if an account is a user safe * @param account Address of the account @@ -157,6 +171,19 @@ interface ICashDataProvider { */ function setUserSafeEventEmitter(address eventEmitter) external; + + /** + * @notice Function to set the addrss of the EtherFi recovery signer. + * @param recoverySigner Address of the EtherFi recovery signer + */ + function setEtherFiRecoverySigner(address recoverySigner) external; + + /** + * @notice Function to set the addrss of the third party recovery signer. + * @param recoverySigner Address of the third party recovery signer + */ + function setThirdPartyRecoverySigner(address recoverySigner) external; + /** * @notice Function to whitelist user safes * @notice Can only be called by the user safe factory diff --git a/src/user-safe/UserSafeCore.sol b/src/user-safe/UserSafeCore.sol index c819f8e..e842159 100644 --- a/src/user-safe/UserSafeCore.sol +++ b/src/user-safe/UserSafeCore.sol @@ -22,8 +22,6 @@ contract UserSafeCore is UserSafeStorage { function initialize( address __cashDataProvider, - address __etherFiRecoverySigner, - address __thirdPartyRecoverySigner, bytes calldata __owner, uint256 __dailySpendingLimit, uint256 __monthlySpendingLimit, @@ -31,10 +29,7 @@ contract UserSafeCore is UserSafeStorage { int256 __timezoneOffset ) external initializer { _cashDataProvider = ICashDataProvider(__cashDataProvider); - if (__etherFiRecoverySigner == __thirdPartyRecoverySigner) revert RecoverySignersCannotBeSame(); - _etherFiRecoverySigner = __etherFiRecoverySigner; - _thirdPartyRecoverySigner = __thirdPartyRecoverySigner; - + __ReentrancyGuardTransient_init(); _isRecoveryActive = true; _ownerBytes = __owner; @@ -97,8 +92,8 @@ contract UserSafeCore is UserSafeStorage { returns (OwnerLib.OwnerObject[3] memory signers) { signers[0] = _userRecoverySigner.getOwnerObject(); - signers[1] = _etherFiRecoverySigner.getOwnerObject(); - signers[2] = _thirdPartyRecoverySigner.getOwnerObject(); + signers[1] = _cashDataProvider.etherFiRecoverySigner().getOwnerObject(); + signers[2] = _cashDataProvider.thirdPartyRecoverySigner().getOwnerObject(); } function isRecoveryActive() external view returns (bool) { diff --git a/src/user-safe/UserSafeSetters.sol b/src/user-safe/UserSafeSetters.sol index fece772..da8c53c 100644 --- a/src/user-safe/UserSafeSetters.sol +++ b/src/user-safe/UserSafeSetters.sol @@ -226,12 +226,10 @@ contract UserSafeSetters is UserSafeStorage { uint8 index ) internal view returns (OwnerLib.OwnerObject memory) { if (index == 0) { - if (_userRecoverySigner == address(0)) - revert UserRecoverySignerIsUnsetCannotUseIndexZero(); - + if (_userRecoverySigner == address(0)) revert UserRecoverySignerIsUnsetCannotUseIndexZero(); return _userRecoverySigner.getOwnerObject(); - } else if (index == 1) return _etherFiRecoverySigner.getOwnerObject(); - else if (index == 2) return _thirdPartyRecoverySigner.getOwnerObject(); + } else if (index == 1) return _cashDataProvider.etherFiRecoverySigner().getOwnerObject(); + else if (index == 2) return _cashDataProvider.thirdPartyRecoverySigner().getOwnerObject(); else revert InvalidSignatureIndex(); } diff --git a/src/user-safe/UserSafeStorage.sol b/src/user-safe/UserSafeStorage.sol index 56775aa..a9786bc 100644 --- a/src/user-safe/UserSafeStorage.sol +++ b/src/user-safe/UserSafeStorage.sol @@ -60,10 +60,6 @@ contract UserSafeStorage is Initializable, ReentrancyGuardTransientUpgradeable { // Address of the Cash Data Provider ICashDataProvider internal _cashDataProvider; - // Address of the EtherFi Recovery Signer - address internal _etherFiRecoverySigner; - // Address of the Third Party Recovery Signer - address internal _thirdPartyRecoverySigner; // Address of the recovery signer set by the user address internal _userRecoverySigner; diff --git a/src/utils/CashDataProvider.sol b/src/utils/CashDataProvider.sol index ff4d8a5..fc993dc 100644 --- a/src/utils/CashDataProvider.sol +++ b/src/utils/CashDataProvider.sol @@ -11,11 +11,7 @@ import {UUPSUpgradeable, Initializable} from "openzeppelin-contracts-upgradeable * @author ether.fi [shivam@ether.fi] * @notice Contract which stores necessary data required for Cash contracts */ -contract CashDataProvider is - ICashDataProvider, - UUPSUpgradeable, - AccessControlDefaultAdminRulesUpgradeable -{ +contract CashDataProvider is ICashDataProvider, UUPSUpgradeable, AccessControlDefaultAdminRulesUpgradeable { bytes32 public constant ETHER_FI_WALLET_ROLE = keccak256("ETHER_FI_WALLET_ROLE"); bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); @@ -35,47 +31,53 @@ contract CashDataProvider is address private _userSafeFactory; // Address of user safe event emitter address private _userSafeEventEmitter; + // Address of the EtherFi Recovery Signer + address internal _etherFiRecoverySigner; + // Address of the Third Party Recovery Signer + address internal _thirdPartyRecoverySigner; + // Mapping of user safes mapping (address account => bool isUserSafe) private _isUserSafe; - function initialize( - address __owner, - uint64 __delay, - address __etherFiWallet, - address __settlementDispatcher, - address __etherFiCashDebtManager, - address __priceProvider, - address __swapper, - address __aaveAdapter, - address __userSafeFactory, - address __userSafeEventEmitter - ) external initializer { - _setInitialValues(__owner, __delay, __etherFiWallet, __settlementDispatcher, __etherFiCashDebtManager, __priceProvider, __swapper, __aaveAdapter, __userSafeFactory, __userSafeEventEmitter); - } + function initialize(bytes memory data) external initializer { + { + ( + address __owner, + uint64 __delay, + address __etherFiWallet, + address __settlementDispatcher, + address __etherFiCashDebtManager, + address __priceProvider + ) = abi.decode(data, (address, uint64, address, address, address, address)); + __AccessControlDefaultAdminRules_init_unchained(uint48(__delay), __owner); + _grantRole(ADMIN_ROLE, __owner); + _grantRole(ETHER_FI_WALLET_ROLE, __etherFiWallet); - function _setInitialValues( - address __owner, - uint64 __delay, - address __etherFiWallet, - address __settlementDispatcher, - address __etherFiCashDebtManager, - address __priceProvider, - address __swapper, - address __aaveAdapter, - address __userSafeFactory, - address __userSafeEventEmitter - ) internal { - __AccessControlDefaultAdminRules_init(uint48(__delay), __owner); - _grantRole(ADMIN_ROLE, __owner); - _grantRole(ETHER_FI_WALLET_ROLE, __etherFiWallet); - _delay = __delay; - _settlementDispatcher = __settlementDispatcher; - _etherFiCashDebtManager = __etherFiCashDebtManager; - _priceProvider = __priceProvider; - _swapper = __swapper; - _aaveAdapter = __aaveAdapter; - _userSafeFactory = __userSafeFactory; - _userSafeEventEmitter = __userSafeEventEmitter; + _delay = __delay; + _settlementDispatcher = __settlementDispatcher; + _etherFiCashDebtManager = __etherFiCashDebtManager; + _priceProvider = __priceProvider; + } + + { + ( + , , , , , , + address __swapper, + address __aaveAdapter, + address __userSafeFactory, + address __userSafeEventEmitter, + address __etherFiRecoverySigner, + address __thirdPartyRecoverySigner + ) = abi.decode(data, (address, uint64, address, address, address, address, address, address, address, address, address, address)); + + if (__etherFiRecoverySigner == address(0) || __thirdPartyRecoverySigner == address(0)) revert InvalidValue(); + _swapper = __swapper; + _aaveAdapter = __aaveAdapter; + _userSafeFactory = __userSafeFactory; + _userSafeEventEmitter = __userSafeEventEmitter; + _etherFiRecoverySigner = __etherFiRecoverySigner; + _thirdPartyRecoverySigner = __thirdPartyRecoverySigner; + } } function _authorizeUpgrade( @@ -144,6 +146,20 @@ contract CashDataProvider is function userSafeEventEmitter() external view returns (address) { return _userSafeEventEmitter; } + + /** + * @inheritdoc ICashDataProvider + */ + function etherFiRecoverySigner() external view returns (address) { + return _etherFiRecoverySigner; + } + + /** + * @inheritdoc ICashDataProvider + */ + function thirdPartyRecoverySigner() external view returns (address) { + return _thirdPartyRecoverySigner; + } /** * @inheritdoc ICashDataProvider @@ -247,6 +263,26 @@ contract CashDataProvider is emit UserSafeEventEmitterUpdated(_userSafeEventEmitter, eventEmitter); _userSafeEventEmitter = eventEmitter; } + + /** + * @inheritdoc ICashDataProvider + */ + function setEtherFiRecoverySigner(address recoverySigner) external onlyRole(ADMIN_ROLE) { + if (recoverySigner == address(0)) revert InvalidValue(); + if (_thirdPartyRecoverySigner == recoverySigner) revert RecoverySignersCannotBeSame(); + emit EtherFiRecoverySignerUpdated(_etherFiRecoverySigner, recoverySigner); + _etherFiRecoverySigner = recoverySigner; + } + + /** + * @inheritdoc ICashDataProvider + */ + function setThirdPartyRecoverySigner(address recoverySigner) external onlyRole(ADMIN_ROLE) { + if (recoverySigner == address(0)) revert InvalidValue(); + if (_etherFiRecoverySigner == recoverySigner) revert RecoverySignersCannotBeSame(); + emit ThirdPartyRecoverySignerUpdated(_thirdPartyRecoverySigner, recoverySigner); + _thirdPartyRecoverySigner = recoverySigner; + } /** * @inheritdoc ICashDataProvider diff --git a/test/CashDataProvider/CashDataProvider.t.sol b/test/CashDataProvider/CashDataProvider.t.sol index 7fa48c6..75d73f3 100644 --- a/test/CashDataProvider/CashDataProvider.t.sol +++ b/test/CashDataProvider/CashDataProvider.t.sol @@ -26,6 +26,8 @@ contract CashDataProviderTest is Test { address userSafeFactory = makeAddr("userSafeFactory"); address debtManager = makeAddr("debtManager"); address userSafeEventEmitter = makeAddr("userSafeEventEmitter"); + address recoverySigner1 = makeAddr("recoverySigner1"); + address recoverySigner2 = makeAddr("recoverySigner2"); function setUp() public { vm.startPrank(owner); @@ -36,6 +38,7 @@ contract CashDataProviderTest is Test { ); cashDataProvider.initialize( + abi.encode( owner, delay, etherFiWallet, @@ -45,8 +48,11 @@ contract CashDataProviderTest is Test { swapper, aaveAdapter, userSafeFactory, - userSafeEventEmitter - ); + userSafeEventEmitter, + recoverySigner1, + recoverySigner2 + )); + cashDataProvider.grantRole(ADMIN_ROLE, admin); diff --git a/test/DebtManager/DebtManagerSetup.t.sol b/test/DebtManager/DebtManagerSetup.t.sol index 796fe16..e08910e 100644 --- a/test/DebtManager/DebtManagerSetup.t.sol +++ b/test/DebtManager/DebtManagerSetup.t.sol @@ -188,7 +188,7 @@ contract DebtManagerSetup is Utils { userSafeFactory = address(1); address eventEmitter = address(1); - CashDataProvider(address(cashDataProvider)).initialize( + CashDataProvider(address(cashDataProvider)).initialize(abi.encode( owner, delay, etherFiWallet, @@ -198,8 +198,10 @@ contract DebtManagerSetup is Utils { address(swapper), address(aaveV3Adapter), userSafeFactory, - eventEmitter - ); + eventEmitter, + makeAddr("recoverySigner1"), + makeAddr("recoverySigner2") + )); DebtManagerInitializer(address(debtManager)).initialize( owner, diff --git a/test/IntegrationTest/IntegrationTestSetup.t.sol b/test/IntegrationTest/IntegrationTestSetup.t.sol index 50fc0b8..a17858c 100644 --- a/test/IntegrationTest/IntegrationTestSetup.t.sol +++ b/test/IntegrationTest/IntegrationTestSetup.t.sol @@ -245,7 +245,7 @@ contract IntegrationTestSetup is Utils { ) )); - CashDataProvider(address(cashDataProvider)).initialize( + CashDataProvider(address(cashDataProvider)).initialize(abi.encode( owner, delay, etherFiWallet, @@ -255,8 +255,10 @@ contract IntegrationTestSetup is Utils { address(swapper), address(aaveV3Adapter), address(factory), - address(eventEmitter) - ); + address(eventEmitter), + etherFiRecoverySigner, + thirdPartyRecoverySigner + )); DebtManagerInitializer(address(etherFiCashDebtManager)).initialize( owner, @@ -285,8 +287,6 @@ contract IntegrationTestSetup is Utils { abi.encodeWithSelector( UserSafeCore.initialize.selector, address(cashDataProvider), - etherFiRecoverySigner, - thirdPartyRecoverySigner, aliceBytes, defaultDailySpendingLimit, defaultMonthlySpendingLimit, diff --git a/test/TopUp/TopUpDest.t.sol b/test/TopUp/TopUpDest.t.sol index 985d153..02d046e 100644 --- a/test/TopUp/TopUpDest.t.sol +++ b/test/TopUp/TopUpDest.t.sol @@ -37,16 +37,20 @@ contract TopUpDestTest is Test { cashDataProviderImpl, abi.encodeWithSelector( CashDataProvider.initialize.selector, - owner, - 100, - address(0), - address(0), - address(0), - address(0), - address(0), - address(0), - userSafeFactory, - address(0) + abi.encode( + owner, + 100, + address(0), + address(0), + address(0), + address(0), + address(0), + address(0), + userSafeFactory, + address(0), + makeAddr("recoverySigner1"), + makeAddr("recoverySigner2") + ) ) ) )); diff --git a/test/UserSafe/Deploy.t.sol b/test/UserSafe/Deploy.t.sol index ce57239..5790a50 100644 --- a/test/UserSafe/Deploy.t.sol +++ b/test/UserSafe/Deploy.t.sol @@ -33,8 +33,6 @@ contract UserSafeDeployTest is UserSafeSetup { bytes memory initData = abi.encodeWithSelector( UserSafeCore.initialize.selector, address(cashDataProvider), - etherFiRecoverySigner, - thirdPartyRecoverySigner, bobBytes, defaultDailySpendingLimit, defaultMonthlySpendingLimit, @@ -55,8 +53,6 @@ contract UserSafeDeployTest is UserSafeSetup { bytes memory initData = abi.encodeWithSelector( UserSafeCore.initialize.selector, address(cashDataProvider), - etherFiRecoverySigner, - thirdPartyRecoverySigner, bobBytes, defaultDailySpendingLimit, defaultMonthlySpendingLimit, diff --git a/test/UserSafe/UserSafeFactory.t.sol b/test/UserSafe/UserSafeFactory.t.sol index fe12547..cdb9925 100644 --- a/test/UserSafe/UserSafeFactory.t.sol +++ b/test/UserSafe/UserSafeFactory.t.sol @@ -43,8 +43,6 @@ contract UserSafeFactoryTest is UserSafeSetup { abi.encodeWithSelector( UserSafeCore.initialize.selector, address(cashDataProvider), - etherFiRecoverySigner, - thirdPartyRecoverySigner, bobBytes, defaultDailySpendingLimit, defaultMonthlySpendingLimit, @@ -63,8 +61,6 @@ contract UserSafeFactoryTest is UserSafeSetup { abi.encodeWithSelector( UserSafeCore.initialize.selector, address(cashDataProvider), - etherFiRecoverySigner, - thirdPartyRecoverySigner, bobBytes, defaultDailySpendingLimit, defaultMonthlySpendingLimit, @@ -117,8 +113,6 @@ contract UserSafeFactoryTest is UserSafeSetup { abi.encodeWithSelector( UserSafeCore.initialize.selector, address(cashDataProvider), - etherFiRecoverySigner, - thirdPartyRecoverySigner, hex"112345", defaultDailySpendingLimit, defaultMonthlySpendingLimit, diff --git a/test/UserSafe/UserSafeSetup.t.sol b/test/UserSafe/UserSafeSetup.t.sol index b468884..2a0bc5d 100644 --- a/test/UserSafe/UserSafeSetup.t.sol +++ b/test/UserSafe/UserSafeSetup.t.sol @@ -244,7 +244,7 @@ contract UserSafeSetup is Utils { )); - CashDataProvider(address(cashDataProvider)).initialize( + CashDataProvider(address(cashDataProvider)).initialize(abi.encode( owner, delay, etherFiWallet, @@ -254,8 +254,10 @@ contract UserSafeSetup is Utils { address(swapper), address(aaveV3Adapter), address(factory), - address(eventEmitter) - ); + address(eventEmitter), + etherFiRecoverySigner, + thirdPartyRecoverySigner + )); DebtManagerInitializer(address(etherFiCashDebtManager)).initialize( owner, @@ -285,8 +287,6 @@ contract UserSafeSetup is Utils { abi.encodeWithSelector( UserSafeCore.initialize.selector, address(cashDataProvider), - etherFiRecoverySigner, - thirdPartyRecoverySigner, aliceBytes, defaultDailySpendingLimit, defaultMonthlySpendingLimit, diff --git a/test/UserSafe/WebAuthn.t.sol b/test/UserSafe/WebAuthn.t.sol index ca8ba07..98f07b5 100644 --- a/test/UserSafe/WebAuthn.t.sol +++ b/test/UserSafe/WebAuthn.t.sol @@ -29,8 +29,6 @@ contract UserSafeWebAuthnSignatureTest is UserSafeSetup { abi.encodeWithSelector( UserSafeCore.initialize.selector, address(cashDataProvider), - etherFiRecoverySigner, - thirdPartyRecoverySigner, passkeyOwner, defaultDailySpendingLimit, defaultMonthlySpendingLimit,