-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
I think it's OK that the Registrar Fees setup doesn't have the same flexibility. At the end of the day:
While we're thinking about Fees and refactoring, wdyt about removing UPDATES: Made the changes to
struct EndowmentFee {
address payoutAddress;
uint256 percentage;
} |
I like the idea of removing the I think we can actually extend this one step further and use the same EndowmentFee struct in the Registrar's mapping: mapping(Fees => EndowmentFee) FeeRateByFees; I'm also a fan of renaming some things for clarity. Perhaps:
|
@stevieraykatz I agree with all your suggested changes! That'll unify everything nicely and clarifies what things are and how they can be used. 💯 Those suggestions have been captured in 921f83b. |
@SovereignAndrey should be ready for review and merge |
Ticket(s):
We currently store and track fees in three different places using three different mechanisms. This PR will unify the way we track and store fees.
Explanation of the solution
We can implement an ENUM in the LocalRegistrar that acts as a key set for all Fees. In the storage of the LocalRegistrar, we can employ a new mapping which stores the fee rate per enumerated Fee.
Some limitations with the way that I have it written now:
EndowmentFee
struct provides:However, looking through our code, it doesn't look like we take advantage of the struct's feature set anywhere so maybe we don't need that granular level of control?
Instructions on making this work
yarn
oryarn install
to install npm dependenciesyarn test
to verify all tests still pass