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

✨ ERC20P related to issue #735 #935

Closed
wants to merge 0 commits into from
Closed

Conversation

wh173-c47
Copy link
Contributor

Description

Created "ERC20P" related to issue #735, I don't know if it's still meaningful, but thought it would be convenient in some cases.
Changes are:

  • Isolated ERC20 storage related constants.
  • Isolated EIP2612 such that it can be implemented or not.
  • Added ERC20P, very similar to actual ERC20 (but still added it in order to avoid messing up with current audited code), additions here are:
    • Upper bit packing of balances slots (arbitrarily u128 size, seems decent even for memecoins and their huge supplies), note I wondered about packing allowances too, there could be few needs, but due to allowance flow this would anyway add significant overhead gas).
    • An internal function to be able to set extra-data.
    • An internal function to be able to get extra-data.

Test has also been added (updated version of current ERC20).

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Ran forge fmt?
  • Ran forge snapshot?
  • Ran forge test?

Pull requests with an incomplete checklist will be thrown out.

@Vectorized
Copy link
Owner

Thanks for the great efforts. But may or may not merge. It’s my OCD to have it all in one file as much as possible, with zero cost abstraction.

@wh173-c47
Copy link
Contributor Author

No problem, I get it, I have mine too.

Anyway it was pleasant to work on it and I might find some uses for it.

Thanks for you time and feedback.

@Vectorized
Copy link
Owner

@wh173-c47 tysm!!!

@wh173-c47
Copy link
Contributor Author

wh173-c47 commented May 20, 2024

Have to say this before I leave, but I have much respect and admiration for solady repo and your work, really. Thank you for that, for those snippet, for this inexhaustible source of knowledge.

I'm pretty busy, but someday I end up with free time so I feel the need to tell you, but I would really be honored to help, to contribute.

So feel free to reach me if any help is needed / specific taks are needed in priority, will always do my best and answer whenever I can.

Again thank you.

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 this pull request may close these issues.

None yet

2 participants