-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Most adapters in the system are not configurable and do not require factory authorization, but currently they are unconditionally authorized/unauthorized causing higher gas costs of factory upgrades (or anything that iterates over all factory targets).
It might make sense to add a second overloading of allowAdapter with additional argument bool configurable here:
permissionless/contracts/factories/CreditFactory.sol
Lines 148 to 157 in f660f1a
| } else if (selector == ICreditConfigureActions.allowAdapter.selector) { | |
| DeployParams memory params = abi.decode(callData[4:], (DeployParams)); | |
| address adapter = _deployAdapter(msg.sender, creditManager, params); | |
| address oldAdapter = ICreditManagerV3(creditManager).contractToAdapter(IAdapter(adapter).targetContract()); | |
| Call memory unauthorizeCall = _unauthorizeFactory(msg.sender, creditManager, oldAdapter); | |
| Call memory authorizeCall = _authorizeFactory(msg.sender, creditManager, adapter); | |
| Call memory allowCall = _allowAdapter(_creditConfigurator(creditManager), adapter); | |
| return oldAdapter != address(0) | |
| ? CallBuilder.build(unauthorizeCall, authorizeCall, allowCall) | |
| : CallBuilder.build(authorizeCall, allowCall); |
The other option might be including the skipConfiguration getter in the adapter itself to avoid changes in the factory interface.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request