Closed horsefacts closed 1 year ago
Coverage after merging horsefacts/ir-kr-review into main will be
98.75% |
---|
File | Stmts | Branches | Funcs | Lines | Uncovered Lines |
---|---|---|---|---|---|
src | |||||
Bundler.sol | 100% | 100% | 100% | 100% | |
FnameResolver.sol | 100% | 100% | 100% | 100% | |
IdRegistry.sol | 100% | 100% | 100% | 100% | |
KeyRegistry.sol | 100% | 100% | 100% | 100% | |
StorageRegistry.sol | 100% | 100% | 100% | 100% | |
src/lib | |||||
Signatures.sol | 100% | 100% | 100% | 100% | |
TransferHelper.sol | 0% | 0% | 0% | 0% | 12, 17, 20, 20, 20 |
TrustedCaller.sol | 100% | 100% | 100% | 100% |
Two things to consider, but I don't think either need immediate fixes.
1) The fact that FID transfers preserve the registered recovery address could be unexpected behavior for some users. This is by design, but could be a surprise if e.g. someone sells their FID to another address but the recovery settings persist. I think this is OK, since a FID doesn't really have much value separate from an associated name, but we should make this behavior clear to end users. (In fact, doing so probably discourages selling FIDs).
2) I don't like that it's possible to register an invalid or malformed key in the key registry, but there's not really a way to validate against every scheme. Again, this is more of a sharp point to warn about: consumers of the key registry should know that users can register whatever bytes
they want as a key and it's up to the caller to validate.
Good callouts, some thoughts:
The original design used to reset the recovery but users may not expect this and forget to configure recovery again after they recover. Since we don't really want people to be trading fids, accepting a little badness in that case for better protection against users seems like the right tradeoff.
Agree, I wish we could validate but will become impractical if we want to make it extensible in the future.
Change Summary
Clean up comments and natspec. Use simple
expectEmit()
, which checks all indexed params and event data.Merge Checklist
Choose all relevant options below by adding an
x
now or at any time before submitting for reviewAdditional Context
If this is a relatively large or complex change, provide more details here that will help reviewers.
PR-Codex overview
This PR focuses on improving the clarity and accuracy of code comments and function parameter names.
Detailed summary
_owner
parameter to_initialOwner
inTrustedCaller
andFnameResolver
constructors.StorageRegistry
andKeyRegistry
functions to improve clarity.owner
parameter to_initialOwner
inBundler
constructor.owner
parameter to_initialOwner
inKeyRegistry
constructor.KeyRegistry
functions to improve clarity.