A demo for Devcon IV presentation.
A one-time use escrow smart contract that works as follows:
- Seller deploys the contract and set the price
- Seller initiates the contract by staking the price
- Buyer initiates the contract by staking the price
- Buyer transfers the sale price to the contract
- Buyer confirms delivery of an item and the contract handles the transfers
- Buyer gets the stake back
- Seller gets the stake back and the purchase price
- Node.JS v8 with npm
npm install
- For convenience, install Truffle globally: npm install -g truffle@0.0.0, replacing 0.0.0 by the Truffle version from package.json
- Install Ganache (Formerly, testrpc), either:
- UI version of version 1.1.0 or
- Console version:
npm install -g ganache-cli@6.1.0
and then (from another terminal tab):ganache-cli
truffle compile
npm test
. To also generate a code coverage report, runnpm run test-cov
instead.