Skip to content

Instantly share code, notes, and snippets.

@ramyhardan
Created August 26, 2021 14:01
Show Gist options
  • Save ramyhardan/934a494cc047135239394218a0a6a762 to your computer and use it in GitHub Desktop.
Save ramyhardan/934a494cc047135239394218a0a6a762 to your computer and use it in GitHub Desktop.
using Arrays for uint256[];
// Number of seconds for 30, 60, 90, ... days
// [2592000, 5184000, 7776000, ..., 75168000, 77760000]
uint256[] private _vestingDays;
// Basis points (0.01%) made available within month 1,2,3,... after time of purchase.
// [0, 50, 100, ..., 9000, 10000]
uint256[] private _vestingBasisPoints;
constructor(
string memory name,
string memory symbol,
uint256 totalSupply,
uint256[] memory vestingDays,
uint256[] memory vestingBasisPoints
) payable Ownable() ERC20(name, symbol) {
_mint(owner(), totalSupply); // OpenZeppelin's _mint
_vestingDays = vestingDays;
_vestingBasisPoints = vestingBasisPoints;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment