lev-vesting

module
v0.0.0-...-c2006ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2020 License: Apache-2.0

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 you will need to use the one deployed to mainnet or deploy it manually.

Gas Costs

The 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.

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 the

After 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.

Directories

Path Synopsis
bindings

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL