1

I am developing an ERC20 token which needs to have a timelock on a certain wallet that unlocks a certain amount of tokens every month.

I am currently using the openzeppelin function:

function TokenTimelock(ERC20Basic _token, address _beneficiary, uint256 _releaseTime) public

However, this would release all tokens at once. I want to implement something that would unlock a percentage of tokens every month, until everything is unlocked. I also need to restrict the transfer of these unlocked tokens to whitelisted addresses only, is this doable?

0

Yes. You can have an array that contains all the release Times. every time that the function TokenTimelock is executed you increase a counter such that it points to the next release time.

As for the whitelisted addresses, you will also have to store them in a mapping or array so that when the users execute the function to transfer the tokens to their wallets the addresses are validated before the transfer.

Hope this helps

  • 1
    Thanks. I just found that the open zeppelin TokenVesting.sol contract does exactly what I need without using the above token timelock. – koukotsu Apr 20 '18 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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