Notes
- Ethereum wallet addresses are in hex [0-9A-F]*. While the address itself is case-insensitive (
A
is the same asa
to the network)
Features
- Deposit
- Withdraw
- Manager(Owner)
- Register
- Withdraw (Faucet)
- getContractBalance → should only called by owner
- setInterest → only called by manager
- Transfer
- Split Faucet to another smart contract
Requirements
說明:各組繳交10頁以內之說明文件,內容包括:
- 首頁註明成員之學號與姓名
- 程式說明(程式結構及流程等),不要附上原始程式碼!
- 執行結果(相關截圖)與說明
- 遭遇的困難與解決方法
Better including the following features/functions in the contract:
- Constructor and Selfdestruct (deprecated)
- Function Modifiers
- Contract Inheritance
- Error Handling (assert, require, revert)
- Events
- Calling Other Contracts
Refs
https://docs.soliditylang.org/en/v0.8.25/solidity-by-example.html
Furthermore, instead of destroying the contract by calling selfdestruct, which is currently deprecated, we will disable the contract’s functionalities by freezing it, resulting in the reversion of any call after it being frozen.