I want to create a BuyMeACoffee contract where the tippers can withdraw the amount they tipped before 24hours of transactions, but I also want the owner to be able to access (or withdraw) these tokens after those 24hours of time.
What I thought of is to build a struct with the timestamp and tippers address and make them call the function before the 24 hours using the timestamp.
But I am not able to get how shall I implement for the owner, that we can only access those tokens after a period of time.
For Example=> If the owner already got tips of 100 dollars before and got another one of 20 dollars today then he should be able to withdraw 100 dollars only today and 120 dollars tomorrow.
I hope I made myself clear regarding my query.