0

I have a smart contract, and I would like to send tokens to my holders, however I would like to put a time lock on these tokens, as the holder to keep them for 2 months in their wallet, before they will be able to swap, send or even sell them.

Is there any function to do this ?

  1. Any tokens coming from this wallet address, 2)To be locked for this time, 3)before they are unlocked)

Any one can advise me please?

Regards

1 Answer 1

0

You could use a vested dapp website, add modifier, or write a function. uint256 numbers are initialized to zero so the following code should work:

mapping(address => uint256) lockedAddress;
uint256 launch = block.timestamp;

modifier isLocked() {
     require(lockedAddress[msg.sender] < block.timestamp + 5184000);
}
3
  • Wonderful, many thanks, Btw, do you have the time to look into my contract and make the changes for a fee (if this site allows paid services) please. bscscan.com/address/…
    – Baitona
    Commented Feb 5, 2022 at 21:35
  • I'll look it over and create a new one, please message me on telegram to discuss further, @Anon_Grunt
    – FudgyDRS
    Commented Feb 5, 2022 at 23:57
  • okay, I sent it you a DM on telegram
    – Baitona
    Commented Feb 6, 2022 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.