// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; contract EthTimeVault { uint256 public constant LOCK_TIME = 5324355200; // ~Jan 1, 2140 bytes32 public merkleRoot; mapping(address => bool) public hasWithdrawn; constructor(bytes32 _merkleRoot) { merkleRoot = _merkleRoot; } function deposit() external payable { require(block.timestamp < LOCK_TIME, "Vault locked until 2140"); // Contributors send ETH; contract aggregates toward 6M ETH target } function withdraw(bytes32[] memory proof, uint256 amount) external { require(block.timestamp >= LOCK_TIME, "Vault still locked"); require(!hasWithdrawn[msg.sender], "Already withdrawn"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender, amount)); require(verifyProof(leaf, proof), "Invalid Merkle proof"); hasWithdrawn[msg.sender] = true; payable(msg.sender).transfer(amount); } function verifyProof(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = keccak256(abi.encodePacked(computedHash, proof[i])); } return computedHash == merkleRoot; } }