Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Vesting Lock Contract

The Vesting Lock smart contract is a module that overlays in addition to the core hedgey Vesting Plans contracts, adding additional functionality.
The additional functionality is the ability to layer on a lockup schedule to a vesting plan. The purpose of this is that a vesting plan may have a more restrictive lockup schedule based on token sales and other legal requirements, whereby even when tokens are vested they are still subject to an additiona lockup period. This module adds that functionality.
The additional functionality is the ability to layer on a lockup schedule to a vesting plan. The purpose of this is that a vesting plan may have a more restrictive lockup schedule based on token sales and other legal requirements, whereby even when tokens are vested they are still subject to an additional lockup period. This module adds that functionality.

The purpose is to still allow the core vesting functionality to exist, but where the Vesting Lock contract can redeem vested tokens into it, and then as those tokens unlock, the beneficiary can unlock the vested and unlocked tokens.

There are two core ways to create a vesting plan with an additional lockup;
1. The vesting admin can use our BatchCreator contract to simultaneously create a new vesting plan and immediately add the lockup layer ontop, where the beneficiary receives their combined vestingLock plan NFT in the single transaction.
2. Alternativley, for vesting plans that have been already created, a vesting admin can transfer the plans into the correct vesting lock contract, and then call the create function individually to add the lockup schedule onto the existing vesting plans.
2. Alternatively, for vesting plans that have been already created, a vesting admin can transfer the plans into the correct vesting lock contract, and then call the create function individually to add the lockup schedule onto the existing vesting plans.


Refernce the existing code base of Hedgey at 'https://github.com/hedgey-finance/Locked_VestingTokenPlans' for details on the Vesting contracts.

## Testing

Clone repistory
Clone repository

``` bash
npm install
Expand All @@ -23,7 +23,7 @@ npx hardhat test
```

## Deployment
To deploy the VestingLock contracts and BatchCreator, create a .env file in the main directory with your private key(s), network RPCs and etherscan API keys. Update the ./scripts/deploy.js file with the information required by the constructor arguments (name and symbol, exsting vesting plan contract addresses), and then you can use hardhat to deploy and verify the contract using the command:
To deploy the VestingLock contracts and BatchCreator, create a .env file in the main directory with your private key(s), network RPCs and etherscan API keys. Update the ./scripts/deploy.js file with the information required by the constructor arguments (name and symbol, existing vesting plan contract addresses), and then you can use hardhat to deploy and verify the contract using the command:

``` bash
npx hardhat run scripts/deploy.js --network <network-name>
Expand All @@ -40,4 +40,4 @@ BatchCreator Contract deployed to: `0x54E16a6e3A37036Ee8e4389E909566CC769A35ce`

VestingLockup contract attached to vesting contract `0x2CDE9919e81b20B4B33DD562a48a84b54C48F00C` deployed at: `0x3A2Ac19Ac5Aaae8493eD1F31C17e5c82CA49bca7`
VotingVestingLockup contract attached to vesting contract `0x1bb64AF7FE05fc69c740609267d2AbE3e119Ef82` deployed at: `0x4755b9F00bFa5A912236d93b2CC05E460ADD31BD`
Batch Creator contract deployed at: `0xABecEB00c040a40d2c06c3f61AF38c2e4B422bbe`
Batch Creator contract deployed at: `0xABecEB00c040a40d2c06c3f61AF38c2e4B422bbe`