Through the utilization of vesting contracts, organizations establish a mechanism to encourage employee retention by linking financial rewards to tenure. Let’s try it.
Your role: employer.
Step 1: Go to Vesting Contract - MeshJS
Step 2: Go to the “Deposit Fund” section. Connect your preprod wallet. Click on “Deposit”.
If you review the code, you will notice that you will deposit your employee 8 ADA.
Step 2.1: Copy the hash of the transaction returned in the “Result” field, and go to https://preprod.cardanoscan.io/. Once there, query the data of that Hash.
In the UTXOs section, you’ll notice that your 8 ADA went to the address addr_test1wzajzwc4dckvc5442xj03samj08w6kzspaspugne5h4wjcspkx9zy
. That is the address of the contract that locks the deposit of your employee.
Step 3: Once the Vesting period has passed (1 minute), you can unlock the deposit of your employee from the contract address. Refresh the page. Go to the “Withdraw Fund” section. Click on “Withdraw Fund”.
Would you like to take a look at the source code of the Aiken Vesting contract? For sure!
Go to mesh/packages/contracts/src/vesting at main · MeshJS/mesh · GitHub
Mesh: making life easier for developers