Update ERC20 Token with Decimals & Permit support #220
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: the old ERC20 token contract didn't allow for changing the decimals, when passed on the contract deployment. This has been showcasted here even if it looks like we pass a value, it always defaults to 4. This problematic, as we need the ability to set the decimals in order to test different cases (i.e. tokens with 0 decimals).
Furthermore, having an ERC20 with Permit support, will allow us to test the Permit signature flow end-to-end. The previous Permit signature work has already been done here.
Lastly, since we didn't have the source contract, we could not actually see any of these missing properties, until it has been manually checked. So, having the contract source is convenient.
What: this PR updates the ERC20 token contract with 3 improvements:
4
decimals are not hardcoded anymorer
,s
andv
values. Introduced already herecontracts
folderHow: the ERC20 with Permit support has been created using the Open Zeppelin wizard, to make sure we are following the standards.
The decimal support on the constructor has been modified on the ERC20 contract base from open-zeppelin.