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

fix: Improve security and functionality of PreParaLink contract #2

Conversation

kentaurse
Copy link

  • Added multi-signature authorization in _authorizeUpgrade to restrict upgrades to authorized entities only, reducing unauthorized access risk.
  • Removed onlyOwner restriction on transfer, transferFrom, and approve functions to enable general transferability, aligning with ERC20 standards.
  • Introduced Initialized event in initialize function for improved transparency on initial token distribution.
  • Applied nonReentrant modifier to transfer functions to protect against reentrancy attacks.
  • Refactored deployment script to accept dynamic treasury address and validated deployment addresses for enhanced deployment flexibility and error prevention.

@hujw77
Copy link
Contributor

hujw77 commented Nov 8, 2024

  • The owner of the PREPLK contract is now governed by the safe wallet account, decoupling the mutisig logic from this contract is better.
  • The contract meets the initial requirements for the token, while future transferability enhancements will be managed through DAO governance.
  • The Initialized event is redundant, as the OwnershipTransferred event already exists. Since the token total supply is hardcoded, monitoring it is unnecessary.
  • While the scripting improvements are beneficial, a fixed code approach for token initialization is simpler and more conducive to auditing.

@hujw77 hujw77 closed this Nov 8, 2024
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