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

Refactor to ERC20Ubiquity #644

Closed
4 tasks done
eugenioclrc opened this issue May 18, 2023 · 16 comments · Fixed by #649
Closed
4 tasks done

Refactor to ERC20Ubiquity #644

eugenioclrc opened this issue May 18, 2023 · 16 comments · Fixed by #649
Assignees

Comments

@eugenioclrc
Copy link
Contributor

eugenioclrc commented May 18, 2023

There are a few things to solve in ERC20Ubiquity

  • Import of ERC20Burnable is not used
  • OZ already have an ERC20Permit implementation, ERC20Ubiquity could use it to have a simpler contract
  • _tokenName and _symbol is already set in the ERC20 it should be redefined
  • name and symbol should not change, also if the admin change it, it will create conflicts with the DOMAIN_SEPARATOR see ERC20Ubiquity.sol#L64

I would also recommend to implement solmate ERC20 implementation, is more gas efficient and it has ERC20Permit by default but you will have to do a deeper refactor.

@0x4007
Copy link
Member

0x4007 commented May 18, 2023

Could you provide a rough time estimate for implementation? I'm assuming it can be done within a day.


name and symbol should not change, also if the admin change it, it will create conflicts with the DOMAIN_SEPARATOR see ERC20Ubiquity.sol#L64

We wanted to preserve the ability to rename. Is there a way to prioritize this while not breaking the functionality of DOMAIN_SEPARATOR? I don't even know what that is used for to be honest.


@zgorizzo69 what do you think about this proposal?

@eugenioclrc
Copy link
Contributor Author

All these tasks can indeed be accomplished within a day. However, i would recommend a separate task for the refactoring to use solmate. This should be addressed after initial refactor, and it could require additional time.

@eugenioclrc
Copy link
Contributor Author

eugenioclrc commented May 18, 2023

@pavlovcik The DOMAIN_SEPARATOR is part of the EIP712 and in this case is use for the ERC20Permit see OZ Implementation

@eugenioclrc
Copy link
Contributor Author

this issue should be resolved before this refactor;
#643

@0x4007
Copy link
Member

0x4007 commented May 19, 2023

However, i would recommend a separate task for the refactoring to use solmate. This should be addressed after initial refactor, and it could require additional time.

Please feel free to create the bounty when you're ready.

@zgorizzo69
Copy link
Contributor

Yep valid points thanks @eugenioclrc

@eugenioclrc
Copy link
Contributor Author

eugenioclrc commented May 19, 2023

/start

1 similar comment
@eugenioclrc
Copy link
Contributor Author

eugenioclrc commented May 19, 2023

/start

@ubiquibot
Copy link

ubiquibot bot commented May 19, 2023

Skipping /start since the issue is closed

@eugenioclrc
Copy link
Contributor Author

@pavlovcik @zgorizzo69 im having some issues here, with this refactor i have remove multiple lines, that means that coverage metrics will get lower (the ERC20Permit lib is excluded from coverage), thats why its not passing the coverage task in the github actions.
Got any suggestions?

@eugenioclrc
Copy link
Contributor Author

@pavlovcik @zgorizzo69 im having some issues here, with this refactor i have remove multiple lines, that means that coverage metrics will get lower (the ERC20Permit lib is excluded from coverage), thats why its not passing the coverage task in the github actions. Got any suggestions?

nevermind, i solved, it seems that somehow the coverage thought that the method unpaused wasnt test it... i solved adding a extra test condition;
71cf980

@ubiquibot
Copy link

ubiquibot bot commented May 24, 2023

Do you have any updates @eugenioclrc? If you would like to release the bounty back to the DevPool, please comment /unassign

@eugenioclrc
Copy link
Contributor Author

Do you have any updates @eugenioclrc? If you would like to release the bounty back to the DevPool, please comment /unassign

@pavlovcik @zgorizzo69 the work is ready, why the bot is asking if I have finished?

@eugenioclrc
Copy link
Contributor Author

#649

@0x4007
Copy link
Member

0x4007 commented May 25, 2023

My apologies. Unfortunately @zgorizzo69 hasn't had the time to review yet and their review is required to merge pull requests on this repository. I sent them a message to check soon. Thanks for your patience!

In the future the bot will check for the review status to not follow up with the bounty hunter unless needed.

@rndquu rndquu reopened this May 26, 2023
@rndquu rndquu closed this as completed May 26, 2023
@ubiquibot
Copy link

ubiquibot bot commented May 26, 2023

[ CLAIM 200 DAI ]

0xD75943B...5282d2AD

@ubiquibot ubiquibot bot added the Paid label May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants