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

New ERC20 token #8

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

New ERC20 token #8

wants to merge 32 commits into from

Conversation

pmprete
Copy link

@pmprete pmprete commented Feb 7, 2023

This token is upgradable, pausable, mintable, supports eip-2612, creates snapshots and batch minting.
Remove deprecated etherlime, use hardhat instead.
Bump solidity version.
Deployment is deterministic

pmprete and others added 30 commits February 5, 2023 00:55
Etherlime is deprecated
Bump solidity version to 0.8
Update node version to 18
Use typescript and hardhat
Bump open zeppelin version
Use harhat OptimizedTransparentProxy for upgrade
Add automatic verification of contracts from etherscan
Add .env variables
remove BatchTransfer
We advise it to invoke super._mint instead and the _cap check to occur after the for loop by evaluating that the ERC20Upgradeable.totalSupply() is less-than-or-equal-to (<=) the value of _cap, significantly reducing the gas cost of the function.
[ABT-03C] Potential Batch Mint Optimization
We advise the increment / decrement operation to be performed in an unchecked code block as the last statement within the for loop to optimize its execution cost.
Also rename AllianceBlockTest.test.js to AllianceBlock.test.js
We advise the check to be relocated to the _beforeTokenTransfer function that is already validated, ensuring that both _mint and _transfer operations do not increase the balance of the contract itself.
ABT-02M: Insufficient Prevention of Contract Token Ownership
We advise a constructor to be introduced that invokes the initializer modifier of the Initializable contract to prevent the base implementation from ever being initialized.

Created TestProxy to test ERC20 without fixture
Imported @openzeppelin/contracts as @openzeppelin/contracts-upgreadables does not have transparent proxy
Close #11
[ABT-01M] Inexistent Initialization Protection of Base Implementation
We advise some basic sanitization to be put in place by ensuring that each address specified is non-zero.

Remove minter init argument as it wont be needed

Close #10
[ABT-02S] Inexistent Sanitization of Input Addresses
Recommendation:
We advise them to be set as calldata optimizing their read-access gas cost.
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