- AssociateProfitSplitter.sol -- Level 1
- TieredProfitSplitter.sol -- Level 2
- DeferredEquityPlan.sol -- Level 3
-
Before developing and testing the contracts, I have my blockchain network running in Ganache and MetaMask extension connected and pointing to
Localhost:8545
. -
In the
Deploy
tab in Remix IDE, I connected to my local Ganache chain by selectingInjected Web3
in theEnvironment
column. -
For each contract, I filled in the constructor parameters with the designated employee addresses before transacting and deploying.
This contract accepts Ether and divides it evenly between Associate-level employees. This allows the Human Resources department to pay employees quickly and efficiently.
In this contract rudimentary percentages are calculated for different tiers of employees (CEO, CTO, and Bob). The incoming Ether is distributed at different levels: CEO – 60%; CTO – 25%; Bob – 15%.
In This contract 1000 shares are automatically distributed over 4 years to the employee, deployed by HR.
For testing purposes, I created a new variable uint fakenow = now;
and utilized the function to fast forward by 100 days:
function fastforward() public {
fakenow += 100 days;
}