feat(vault): add UnbondingPeriodAuthorizer#17
Conversation
| import {Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol"; | ||
| import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; | ||
| import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; |
There was a problem hiding this comment.
Imports are not sorted, but should be (according to our Solidity Style Guide, sections 8.B and 8.C)
There was a problem hiding this comment.
Good point! Thanks
| function authorize( | ||
| address owner, | ||
| address token, | ||
| uint256 // amount - not used | ||
| ) public view override returns (bool) { |
There was a problem hiding this comment.
When implementing an interface function, the style guide recommends not using the override keyword.
Style Guide, section 2.A: "Do not use override keyword when implementing an interface function."
| function completeUnbondingRequest(address token) external { | ||
| _completeUnbondingRequest(msg.sender, token); | ||
| } |
There was a problem hiding this comment.
According to the Operational Advice section (3.A.2: "Avoid using msg.sender for permissionless functions.") this function should take an explicit address account parameter to improve interoperability.
There was a problem hiding this comment.
This function is not permissionless as a user should be able to complete only their own unbonding requests.
There was a problem hiding this comment.
I think I will modify the clarify the formulation of "permissionless functions" in Operational Advice.
No description provided.