- Setup your dev environment. It's recommended you use
yarnas a package manager andhardhatas your Blockchain framework. It's ok to use truffle if you prefer it here. - Complete the escrow smart contract described below
- Write Javascript unit tests for each function
- Confirm that the GitHub test workflow action runs your unit tests and they pass
- The Escrow smart contract has the
depositFor()andrelease()functions specified below and they work - There's 100% code coverage
- All smart contract tests are run by GitHub actions CI on each push to GitHub and they are all passing
- Code shouuld be readable and maintainable
- When the function is called it takes the deposited amount of ETH from the
payeraccount that calleddepositFor(). - Sets the
payeeaddress. - The ETH is held by the smart contract in "escrow" for the
payee. - Sets a separate releaser account that will release the transfer to the receiver. This third account will be a different account than the depositing account or the receiver.
- This function can be called by anyone to create their own escrow. The contract can manage multiple escrows for different
payer,payeeandreleaseraccounts with separate ETH deposit amounts. - Write tests for each of thes conditions.
- Transfers the tokens to the receiver address that was specified when the escrow was created with the
depositForfunction call releasecan only be called by the releaser account that was specified when the escrow was created with thedepositForfunction call- Write tests for each of thes conditions.