This guide assumes that you have Node.JS and the yarn package manager are installed.
Furthermore, for the deploy command requires Mist to be intalled and running either the mainnet or the testnet (ropsten).
Important commands:
yarnwill install all other necessary packagesyarn buildwill build the deployment code and the contract codeyarn deploywill deploy the contract to whatever networkMistis currently using.
Testing Guide:
-
Ensure that the variable
const antContractAddresson line 63 ofdeploy.tsis set to an address of an ERC token you wish to use as the ANT token. (rebuild if this needs to change) -
After deploying the contract to the mainnet and using
build/contracts/salary.sol:SalarySplitAgreement.abias the ABI forMisttry out the following:
- send Ether and some ANT token (the same token from step 1) to the contract. This will be used to pay any outstanding salaries
- make a salary proposal using the
Propose Salaryfunction - accept this proposal from an employee address using the
Accept Salary Function - notice the
Balance payable (eth | usd | ant)amount update for the employee address daily - at an interval of your choosing you can call the
Trigger Paymentfunction to close out the account
Notice how the employer can call the Terminate Contract function and the employee can call the Quit function.
Both of these functions will update the contract in a state where the next Trigger Payment will stop the Balance payable amount from updated further (meaning the contract is finished).
Notice how an event is created noting that a certain USD dollar payment is owed.