scroll-tech / scroll-contract-deploy-demo

This project demonstrates how to use hardhat or foundry to deploy a contract to Scroll's zkEVM rollup
https://scroll.io
MIT License
514 stars 304 forks source link

Update Lock.sol #30

Open destinyae opened 4 months ago

destinyae commented 4 months ago

You may consider adding access control modifiers to the withdraw function to restrict who can call it. Additionally, you can consider adding event logging for all state changes to make the contract more transparent. Finally, you might want to add error handling to the contract to provide better feedback to users when transactions fail.

committed changes:

  1. Access control modifier.
  2. Event logging for state changes
  3. Error handling for transactions

What do you think?