Token Vesting

I created some tokens to learn, but I stuck with my learning. I like to learn using examples, playing with them and modifying.... what I would like to do is token vesting for multiple addresses.

I would like to implement token vesting with current openzeppelin version of sol files.
May I start with https://docs.openzeppelin.com/contracts/3.x/api/token/erc20#TokenTimelock and use it with ERC20* from 4.3 version? Will it be safe?

May I ask what will be the easiest (to start) way to implement token vesting for multiple (let's say, to know the scale... 5 different addresses)?

:1234: Code to reproduce

n/a

:computer: Environment

Remix.

Will it be safe?

Yes, TokenTimelock uses SafeERC20.

May I ask what will be the easiest (to start) way to implement token vesting for multiple (let's say, to know the scale... 5 different addresses)?

You will need to change the variables into mappings so it can keep track of multiple beneficiaries and releaseTimes. https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/utils/TokenTimelock.sol

The PaymentSplitter contract will probably be a good reference for what you want to build.

Thank you @frangio and @STYJ finally I ended up with some structure that is holding information about beneficents, period time&counts as well start date :wink: and it seams to work in testnet. Thank you.

2 Likes