Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bonedaddy/lev-vesting
https://github.com/bonedaddy/lev-vesting
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/bonedaddy/lev-vesting
- Owner: bonedaddy
- License: apache-2.0
- Created: 2020-11-19T23:55:31.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-20T07:53:00.000Z (almost 4 years ago)
- Last Synced: 2024-10-15T18:08:23.284Z (29 days ago)
- Language: Go
- Size: 9.63 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LEV Vesting
Vesting contract for the $LEV token
# Vesting Stats
75% of team tokens vested for 12 months, released every month
# Date Time Contract
The contract uses a newer version of [BokkyPooBahsDateTimeLibrary](https://github.com/bokkypoobah/BokkyPooBahsDateTimeLibrary) you will need to use the one deployed to mainnet or deploy it manually.
# Gas CostsThe following values are logged from unit tests which use go-ethereum simulated backend
| Action | Cost |
|--------|------|
| Date Time deployment | 1090857 |
| Vesting deployment | 492694 |
| Vest preparation | 455530 |
| Vest release | 77157 |# Development
## Dependencies
* Linux 64-bit OS
* Go 1.15
* Make## Testing
Testing of the vesting contract is done using the go-ethereum simulated backend, and testing of the smart contract via autogenerated contract bindings in the Golang language. For more information about go-etherum bindings [see github](https://github.com/ethereum/go-ethereum/wiki/Native-DApps:-Go-bindings-to-Ethereum-contracts).
## Compilation
* `make compile`
* Compiles the Leverage token (note this is just used for testing)
* Compiles DateTime contracts
* Compiles vesting contract
* Generates JSON ABI files for all contracts in `bin`## Golang Bindings Update
Updates the golang code bindings for the smart contracts
* `make abigen`
## Flattening
Flattens the Vesting contract into a single file, suitable for etherscan verification, usage with any solidity development environment, etc...
* `make flatten`
## All Of The Above
* `make all`
# Deployment
Take `flattened/Vesting_Flattened.sol` and use whatever preferred deployment system or development environment (truffle, hardhat, etc..). It should be compiled using Solidity 0.7.3, however you can manually adjust the compiler versiont to 0.7.x as desired.
The Vesting contract requires three arguments during deployment, and they are:
* The address of the LEV token contract
* The address of the BokkyPooBahsDateTimeLibrary contract version `v1.00`
* The address of the owner which will be used to provision the contract
After deployment you must approve the Vesting contract to spend funds on behalf of theAfter the contract is deployed the `prepare` function must be called by the contract owner. It takes two arguments
* The amount of tokens (denominated in wei) to vest
* The address of the wallet that will receive the tokens (this should be the team wallet)Once the `prepare` transaction is mined, every month following from the timestamp of the block it was included you may call the `release` function to withdraw the alloted amount from the Vesting contract. The tokens will be deposited into the `receiver` address when invoking the `prepare` function.