Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the name and symbol of the Stablecoin and the Reservecoin configurable #18

Open
ceilican opened this issue Mar 19, 2024 · 1 comment
Labels
good first issue Good for newcomers

Comments

@ceilican
Copy link
Contributor

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.

@ceilican ceilican added the good first issue Good for newcomers label Mar 19, 2024
@keshav-nischal
Copy link
Contributor

keshav-nischal commented Mar 28, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants