@difof/lct
v1.1.0
Published
Lock any ERC20, release in periods!
Downloads
34
Maintainers
Readme
LinearCliffTimelock
Lock any ERC20, release in periods!
Usage
npm install @difof/lct
Then import in Solidity:
import "@difof/lct/contracts/LinearCliffTimelock.sol"
Or use the typechain in TypeScript:
import { LinearCliffTimelock } from '@difof/lct/typechain'
Build and test
Just
yarn install && yarn test
Deploy
Inherit and deploy the LinearCliffTimelock.sol.
NOTE The deployer will be granted
DEFAULT_ADMIN_ROLE
andINITIALIZE_ROLE
so that only the admin can call initialize function.Transfer funds to the timelock contract.
Call initialize to setup the vesting.
Anyone with WITHDRAW_ROLE
can call withdraw to transfer the claimable amount to the beneficiary.
Registry
The TLPublicRegistry contract is a registry for any deployed timelock to map beneficiaries to their timelocks for easier lookup. The contract is deployed on supported networks to be used by the LCT user interface.
Call the addTimelock
function of the registry to map a beneficiary to a timelock on same network.
Here is a list of registry addresses on supported networks:
| Network | Address | | :-------- | :----------------------------------------: | | Polygon | 0xFD6378CfFC8aD8036987835dd01Bf186d94e0268 | | Ethereum | TBD | | BNB Chain | TBD |
Notes
All of the timings are in seconds.
Vesting test will deploy MockTimelock.sol
instead of the timelock contract to have control over block.timestamp