TimeLockWallet
Nitin Jain, PCE
Description
Time-Locked Wallet with Delayed Withdrawals
š Overview
This smart contract implements a simple time-locked wallet where funds can only be withdrawn after a fixed delay of 7 days. The contract is designed with minimal setup and does not require any inputs during deployment.
š Features
š One-Time Initialization: The first caller of
initialize()
becomes the owner.ā³ Timed Withdrawal: The owner can only withdraw funds after 7 days.
š° ETH Deposits: Anyone can send ETH to the contract.
ā± Check Remaining Time: A function to check how much time is left before withdrawal is allowed.
š View Balance: A function to check the contractās balance.
ā How It Works
Deployment: Deploy the contract (no constructor arguments needed).
Initialization: The owner must call
initialize()
once to set their address and the unlock time.Deposit ETH: The owner or anyone else can send ETH to the contract.
Wait for 7 Days: The contract holds the funds until the unlock time.
Withdraw: Once the lock period is over, the owner can withdraw all funds.
š Security Considerations
One-Time Initialization: Prevents re-initialization and ownership changes.
Owner-Only Withdrawal: Ensures only the assigned owner can access the funds.
No Input During Deployment: Eliminates potential parameter manipulation.
Progress During Hackathon
70
Tech Stack
Fundraising Status
no