You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should make these names and symbols configurable.
The desired names and symbols should be passed as arguments in the constructor and then used in lines 46 and 47.
Note that there is a limit in the number of arguments that a function, including a constructor, can have. If adding 4 more arguments in teh constructor will make us exceed this limit, we will need to find a workaround. A one-time setup function to be called once after the constructor could be a solution.
The text was updated successfully, but these errors were encountered:
@ceilican , this can be done by changing the constructor's argument grouping
->"address _treasury, uint256 _initialTreasuryFee, uint256 _treasuryRevenueTarget",
->"uint256 _reserveRatioMin, uint256 _reserveRatioMax,"
-> and ....(other similar arguments)
using struct and then we can add two new args that will take {"Stablecoin", "SC"} and {"Reservecoin", "RC"} as input.
Having many arguments for a function is not considered a good practice. This will also solve that.
your suggestion "A one-time setup function to be called once after the constructor could be a solution.". is not clear to me. you or anyone else can explain what this means. how will we allow the external program to input "Stablecoin", "SC", "Reservecoin", "RC" in the new function?
If you agree with my approach, I can work on this issue
In lines 46 and 47 of Djed.sol (https://github.com/DjedAlliance/Djed-Solidity/blob/main/src/Djed.sol), the satablecoin and the reservecoin are given fixed and hard-coded names and symbols: "Stablecoin", "SC", "Reservecoin", "RC".
We should make these names and symbols configurable.
The desired names and symbols should be passed as arguments in the constructor and then used in lines 46 and 47.
Note that there is a limit in the number of arguments that a function, including a constructor, can have. If adding 4 more arguments in teh constructor will make us exceed this limit, we will need to find a workaround. A one-time setup function to be called once after the constructor could be a solution.
The text was updated successfully, but these errors were encountered: