Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/abdelstark/token-vesting-contracts

ERC20 token vesting smart contracts 💰⏳
https://github.com/abdelstark/token-vesting-contracts

erc20 ethereum forge foundry smart-contracts solidity solmate vesting

Last synced: 16 days ago
JSON representation

ERC20 token vesting smart contracts 💰⏳

Awesome Lists containing this project

README

        

[![Actions Status](https://github.com/abdelhamidbakhta/token-vesting-contracts/workflows/test/badge.svg)](https://github.com/abdelhamidbakhta/token-vesting-contracts/actions/workflows/test.yml)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![npm version](https://badge.fury.io/js/erc20-token-vesting.svg)](https://badge.fury.io/js/erc20-token-vesting)

# Token Vesting Contracts

## Overview

On-Chain vesting scheme enabled by smart contracts.

`TokenVesting` contract can release its token balance gradually like a typical vesting scheme, with a cliff and vesting period.
The vesting schedules are optionally revocable by the owner.

## 🎭🧑‍💻 Security audits

- [Security audit](https://github.com/abdelhamidbakhta/token-vesting-contracts/blob/main/audits/hacken_audit_report.pdf) from [Hacken](https://hacken.io)

This repository is compatible with both Forge and Hardhat.
Forge needs to be ran (install and build) before Hardhat is used in order to load dependency contracts.
You can find the specific instructions for each tool below.

### Forge

#### 📦 Installation

```console
forge install
```

#### ⛏️ Compile

```console
forge build
```

#### 🌡️ Testing

```console
$ forge test
```

### Hardhat

#### 📦 Installation

```console
$ yarn
```

#### ⛏️ Compile

```console
$ yarn compile
```

This task will compile all smart contracts in the `contracts` directory.
ABI files will be automatically exported in `build/abi` directory.

#### 📚 Documentation

Documentation is auto-generated after each build in `docs` directory.

The generated output is a static website containing smart contract documentation.

#### 🌡️ Testing

Note: make sure to have ran forge build and compile before you run tests.

```console
$ yarn test
```

#### 📊 Code coverage

```console
$ yarn coverage
```

The report will be printed in the console and a static website containing full report will be generated in `coverage` directory.

#### ✨ Code style

```console
$ yarn prettier
```

#### 🐱‍💻 Verify & Publish contract source code

```console
$ npx hardhat verify --network mainnet $CONTRACT_ADDRESS $CONSTRUCTOR_ARGUMENTS
```

## 📄 License

**Token Vesting Contracts** is released under the [Apache-2.0](LICENSE).

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):



Abdel @ StarkWare
Abdel @ StarkWare

💻
Vaclav Pavlin
Vaclav Pavlin

💻
Brendan Baker
Brendan Baker

💻
Oren Gampel
Oren Gampel

💻

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!