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

Add and check contract code formatting using forge fmt #48

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Philogy
Copy link

@Philogy Philogy commented Apr 30, 2024

PR also includes some other minor clean-up like simplifying the mock token and making imports explicit for the non-script contracts.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forget why exactly but if you look closely the mock token is not just the default OZ erc20 contract.
It's got weird behavior like minting on transfers. I think this was so that we don't need to approve or something... might be wrong. But I fear merging this will prob break some thing. :\

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean the tests seem to pass, but looking at it the old transferFrom function it didn't check the allowance vs. the standard OZ token which will. Just changed that, should be good.

Copy link
Collaborator

@samlaf samlaf May 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main problem is that I don't trust the tests in here :|
Do you mind removing this ERC20Mock changes from this PR, and let's make a separate one from that where we actually use the standard OZ token like you were proposing. Created this issue for it: #49

Also just merged #46 so you'll need to rebase your branch on top of master... sorry about that :(

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.

2 participants