I want to be able to input 7 seconds or 300 days in a timelock smart contract after deploying the contract.
I don't want to hard code the time frame before deploying the contract.
Here's the code:
contract Timelock {
mapping(address => uint) balance;
mapping(address => uint) timelock;
function(uint string _time //not working) public payable {
balance[msg.sender] += msg.value;
timelock[meg.sender] = block.timestamp + _time
}
}
How do I input a parameter that will take both a uint and a string as one parameter?