CoMakery / comakery-eos-vesting

CoMakery compatible token vesting contract for EOS / Telos
MIT License
0 stars 3 forks source link

Add additional automated test scenario for Vesting & Lockup Together #2

Open aquabu opened 3 years ago

aquabu commented 3 years ago

Acceptance

Testing Scenario: Vesting & Lockup Together

The employee received a 100 day vesting with a 100 day lockup for 100 tokens. The start date is set to 50 days ago, The employee is fired and the remaining vesting is canceled. The admin reclaims the 50 unvested tokens. The employee owns 50 tokens but they are still locked until the lockup period is over. The admin tries to claim the 50 vested employee owned tokens but the reclaim fails. 99 days from the start date the employee tries to transfer 50 tokens but the transfer fails because they are still locked. 100 days from the start date the tokens unlock and the ex-employee transfers their 50 tokens successfully.

Possible additional changes

If it's not possible to set both the Vesting & Lockup at the same as specified in the scenario, modify the contract to be able to set them separately.