Release tokens over time.
block.timestamp < startamount * (block.timestamp - start) / durationreleased +=// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract Vesting {
address payable public beneficiary;
uint256 public start; uint256 public duration; uint256 public amount; uint256 public released;
constructor(address payable b, uint256 s, uint256 d) payable { beneficiary = b; start = s; duration = d; amount = msg.value; }
function vested() public view returns (uint256) { /* TODO */ }
function release() external { /* TODO */ }
}