BlindexDAO / locking-contract

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MEDIUM HEADER 1500x750px_

Locking Contract

This contract is separated from the Blindex's protocol contracts as it's meant to be a contract to hold the code contributors/maintainers in a dedicated contract with a well-defined tokens time locking system.

This makes sure Blindex will always have people helping push it forward and reach the community's goals.

Blindex belongs to no one except its community.

The BDLockingContract is used to hold funds given for a certain amount of time with a cliff period. There is also an option for the owner of the contract to withdraw back all the still locked funds - this option exists to allow a DAO/the owner to change the decision on the amount of locked funds during the cliff period. After that, the DAO cannot change the allocation to the team. Once the cliff period is over, any of the defined beneficiaries can invoke the release() function which will split the freed funds fairly between all the beneficiaries.

Documentation

An automated documentation is being generated by our CI process based on the solidity docs comments in the contracts. You can find all the documentation in the docs folder.

Setup

Environment variables

Create a .env file in your root folder and make sure you have the following environment variables in it:

CMC_TOKEN=<your_coinmarketcap_token_for_gas_reports>
DEPLOYER_PRIVATE_KEY=...
TREASURY_PRIVATE_KEY=...
USER1_PRIVATE_KEY=...
USER2_PRIVATE_KEY=...
USER3_PRIVATE_KEY=...

You can get your free tier CMC token here.

Node.js

Please use the Node.js version mentioned in the .nmvrc file. We recommand using nvm for that.

And then run:

npm install

Run

Local

Please run the hardhat local network:

npm run node

Tests

And in a seperate terminal run, lease run:

npm test
Test your gas usage

You can use your tests to see how much gas your contract functions cost by running:

npm run test:gas

Useful links

RSK Testnet

Join us

💻 Website

📱 App

📜 Docs

♣️ Discord

💬 Telegram

🤳 Twitter

About

License:MIT License


Languages

Language:TypeScript 80.4%Language:Solidity 19.5%Language:Shell 0.1%