As a developer creating new DN404 token with custom base unit, I want to have built in compatibility to set base unit (WAD) value for my project rather than using the default WAD=10**18 value.
Why
I was building a DN404 token and I realized that my requires base unit to be set as 10**24 instead of the default value.
Status Quo
Currently, I cannot override the value of _WAD as it is a constant value used in multiple functions
Potential Solution
Instead of using _WAD as a constant variable, create a view function that can be overwritten by developers.
Note: The choice for view function over pure is to allow community to create factory contracts for DN404 where the base unit can be set as a state variable which is then used inside _WAD internal function.
User story
As a developer creating new DN404 token with custom base unit, I want to have built in compatibility to set base unit (
WAD
) value for my project rather than using the defaultWAD=10**18
value.Why
I was building a DN404 token and I realized that my requires base unit to be set as
10**24
instead of the default value.Status Quo
Currently, I cannot override the value of
_WAD
as it is a constant value used in multiple functionsPotential Solution
Instead of using
_WAD
as a constant variable, create aview
function that can be overwritten by developers.Note: The choice for
view
function overpure
is to allow community to create factory contracts for DN404 where the base unit can be set as a state variable which is then used inside_WAD
internal function.